deleteGuardrail method

Future<void> deleteGuardrail({
  1. required String guardrailIdentifier,
  2. String? guardrailVersion,
})

Deletes a guardrail.

  • To delete a guardrail, only specify the ARN of the guardrail in the guardrailIdentifier field. 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 guardrailIdentifier field and the version in the guardrailVersion field.

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,
  );
}