Skip to content

create_guardrail_version

Operation

create_guardrail_version

create_guardrail_version(request: CreateGuardrailVersionInput | CreateGuardrailVersionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateGuardrailVersionInputDict]) -> CreateGuardrailVersionOutput

Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.

Parameters:

Name Type Description Default
request CreateGuardrailVersionInput | CreateGuardrailVersionInputDict | 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[CreateGuardrailVersionInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateGuardrailVersionOutput

An instance of CreateGuardrailVersionOutput.

create_guardrail_version async

create_guardrail_version(request: CreateGuardrailVersionInput | CreateGuardrailVersionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateGuardrailVersionInputDict]) -> CreateGuardrailVersionOutput

Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.

Parameters:

Name Type Description Default
request CreateGuardrailVersionInput | CreateGuardrailVersionInputDict | 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[CreateGuardrailVersionInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateGuardrailVersionOutput

An instance of CreateGuardrailVersionOutput.

Input

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

CreateGuardrailVersionInputDict

Bases: TypedDict

Dictionary form of CreateGuardrailVersionInput.

Attributes

client_request_token instance-attribute
client_request_token: str | None

A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency in the Amazon S3 User Guide.

This field is autopopulated if not provided.

description instance-attribute
description: str | None

A description of the guardrail version.

guardrail_identifier instance-attribute
guardrail_identifier: Required[str]

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

CreateGuardrailVersionInput dataclass

Bases: _SerdeShape

Dataclass for CreateGuardrailVersionInput structure.

Attributes

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

A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency in the Amazon S3 User Guide.

This field is autopopulated if not provided.

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

A description of the guardrail version.

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

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

Output

CreateGuardrailVersionOutput dataclass

Bases: _SerdeShape

Dataclass for CreateGuardrailVersionOutput structure.

Attributes

guardrail_id instance-attribute
guardrail_id: str

The unique identifier of the guardrail.

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.

version instance-attribute
version: str

The number of the version of the guardrail.