Skip to content

delete_guardrail

Operation

delete_guardrail

delete_guardrail(request: DeleteGuardrailInput | DeleteGuardrailInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteGuardrailInputDict]) -> DeleteGuardrailOutput

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.

Parameters:

Name Type Description Default
request DeleteGuardrailInput | DeleteGuardrailInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[DeleteGuardrailInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteGuardrailOutput

An instance of DeleteGuardrailOutput.

delete_guardrail async

delete_guardrail(request: DeleteGuardrailInput | DeleteGuardrailInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteGuardrailInputDict]) -> DeleteGuardrailOutput

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.

Parameters:

Name Type Description Default
request DeleteGuardrailInput | DeleteGuardrailInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[DeleteGuardrailInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteGuardrailOutput

An instance of DeleteGuardrailOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

DeleteGuardrailInputDict

Bases: TypedDict

Dictionary form of DeleteGuardrailInput.

Attributes

guardrail_identifier instance-attribute
guardrail_identifier: Required[str]

The unique identifier of the guardrail. This can be an ID or the ARN.

guardrail_version instance-attribute
guardrail_version: str | None

The version of the guardrail.

DeleteGuardrailInput dataclass

Bases: _SerdeShape

Dataclass for DeleteGuardrailInput structure.

Attributes

guardrail_identifier class-attribute instance-attribute
guardrail_identifier: str | None = ...

The unique identifier of the guardrail. This can be an ID or the ARN.

guardrail_version class-attribute instance-attribute
guardrail_version: str | None = ...

The version of the guardrail.

Output

DeleteGuardrailOutput dataclass

Bases: _SerdeShape

Dataclass for DeleteGuardrailOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.