deleteGuardrail method
Deletes a guardrail.
-
To delete a guardrail, only specify the ARN of the guardrail in the
guardrailIdentifierfield. If you delete a guardrail, all of its versions will be deleted. -
To delete a version of a guardrail, specify the ARN of the guardrail in
the
guardrailIdentifierfield and the version in theguardrailVersionfield.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceInUseException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter guardrailIdentifier :
The unique identifier of the guardrail. This can be an ID or the ARN.
Parameter guardrailVersion :
The version of the guardrail.
Implementation
Future<void> deleteGuardrail({
required String guardrailIdentifier,
String? guardrailVersion,
}) async {
final $query = <String, List<String>>{
if (guardrailVersion != null) 'guardrailVersion': [guardrailVersion],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/guardrails/${Uri.encodeComponent(guardrailIdentifier)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
}