Skip to content

Bedrock  >  Operations  >  create_guardrail_version

create_guardrail_version

Operation

create_guardrail_version async

create_guardrail_version(input: CreateGuardrailVersionInput, plugins: list[Plugin] | None = None) -> 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
input CreateGuardrailVersionInput

An instance of CreateGuardrailVersionInput.

required
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

Returns:

Type Description
CreateGuardrailVersionOutput

An instance of CreateGuardrailVersionOutput.

Input

CreateGuardrailVersionInput dataclass

Dataclass for CreateGuardrailVersionInput structure.

Attributes

client_request_token class-attribute instance-attribute
client_request_token: str | None = 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.

description class-attribute instance-attribute
description: str | None = field(repr=False, default=None)

A description of the guardrail version.

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

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

Output

CreateGuardrailVersionOutput dataclass

Dataclass for CreateGuardrailVersionOutput structure.

Attributes

guardrail_id instance-attribute
guardrail_id: str

The unique identifier of the guardrail.

version instance-attribute
version: str

The number of the version of the guardrail.