Module types

Source
Expand description

Data structures used by operation inputs/outputs.

Modules§

builders
Builders
error
Error types that Amazon Bedrock Runtime can respond with.

Structs§

AnyToolChoice

The model must request at least one tool (no text is generated). For example, {"any" : {}}.

AsyncInvokeS3OutputDataConfig

Asynchronous invocation output data settings.

AsyncInvokeSummary

A summary of an asynchronous invocation.

AutoToolChoice

The Model automatically decides if a tool should be called or whether to generate text instead. For example, {"auto" : {}}.

BidirectionalInputPayloadPart

Payload content for the bidirectional input. The input is an audio stream.

BidirectionalOutputPayloadPart

Output from the bidirectional stream. The output is speech and a text transcription.

CachePointBlock

Defines a section of content to be cached for reuse in subsequent API calls.

Citation

Contains information about a citation that references a specific source document. Citations provide traceability between the model's generated response and the source documents that informed that response.

CitationSourceContentDelta

Contains incremental updates to the source content text during streaming responses, allowing clients to build up the cited content progressively.

CitationsConfig

Configuration settings for enabling and controlling document citations in Converse API responses. When enabled, the model can include citation information that links generated content back to specific source documents.

CitationsContentBlock

A content block that contains both generated text and associated citation information. This block type is returned when document citations are enabled, providing traceability between the generated content and the source documents that informed the response.

CitationsDelta

Contains incremental updates to citation information during streaming responses. This allows clients to build up citation data progressively as the response is generated.

ContentBlockDeltaEvent

The content block delta event.

ContentBlockStartEvent

Content block start event.

ContentBlockStopEvent

A content block stop event.

ConverseMetrics

Metrics for a call to Converse.

ConverseStreamMetadataEvent

A conversation stream metadata event.

ConverseStreamMetrics

Metrics for the stream.

ConverseStreamTrace

The trace object in a response from ConverseStream. Currently, you can only trace guardrails.

ConverseTrace

The trace object in a response from Converse. Currently, you can only trace guardrails.

DocumentBlock

A document to include in a message.

DocumentCharLocation

Specifies a character-level location within a document, providing precise positioning information for cited content using start and end character indices.

DocumentChunkLocation

Specifies a chunk-level location within a document, providing positioning information for cited content using logical document segments or chunks.

DocumentPageLocation

Specifies a page-level location within a document, providing positioning information for cited content using page numbers.

GuardrailAssessment

A behavior assessment of the guardrail policies used in a call to the Converse API.

GuardrailConfiguration

Configuration information for a guardrail that you use with the Converse operation.

GuardrailContentFilter

The content filter for a guardrail.

GuardrailContentPolicyAssessment

An assessment of a content policy for a guardrail.

GuardrailContextualGroundingFilter

The details for the guardrails contextual grounding filter.

GuardrailContextualGroundingPolicyAssessment

The policy assessment details for the guardrails contextual grounding filter.

GuardrailConverseImageBlock

An image block that contains images that you want to assess with a guardrail.

GuardrailConverseTextBlock

A text block that contains text that you want to assess with a guardrail. For more information, see GuardrailConverseContentBlock.

GuardrailCoverage

The action of the guardrail coverage details.

GuardrailCustomWord

A custom word configured in a guardrail.

GuardrailImageBlock

Contain an image which user wants guarded. This block is accepted by the guardrails independent API.

GuardrailImageCoverage

The details of the guardrail image coverage.

GuardrailInvocationMetrics

The invocation metrics for the guardrail.

GuardrailManagedWord

A managed word configured in a guardrail.

GuardrailOutputContent

The output content produced by the guardrail.

GuardrailPiiEntityFilter

A Personally Identifiable Information (PII) entity configured in a guardrail.

GuardrailRegexFilter

A Regex filter configured in a guardrail.

GuardrailSensitiveInformationPolicyAssessment

The assessment for aPersonally Identifiable Information (PII) policy.

GuardrailStreamConfiguration

Configuration information for a guardrail that you use with the ConverseStream action.

GuardrailTextBlock

The text block to be evaluated by the guardrail.

GuardrailTextCharactersCoverage

The guardrail coverage for the text characters.

GuardrailTopic

Information about a topic guardrail.

GuardrailTopicPolicyAssessment

A behavior assessment of a topic policy.

GuardrailTraceAssessment

A Top level guardrail trace object. For more information, see ConverseTrace.

GuardrailUsage

The details on the use of the guardrail.

GuardrailWordPolicyAssessment

The word policy assessment.

ImageBlock

Image content for a message.

InferenceConfiguration

Base inference parameters to pass to a model in a call to Converse or ConverseStream. For more information, see Inference parameters for foundation models.

If you need to pass additional parameters that the model supports, use the additionalModelRequestFields request field in the call to Converse or ConverseStream. For more information, see Model parameters.

Message

A message input, or returned from, a call to Converse or ConverseStream.

MessageStartEvent

The start of a message.

MessageStopEvent

The stop event for a message.

PayloadPart

Payload content included in the response.

PerformanceConfiguration

Performance settings for a model.

PromptRouterTrace

A prompt router trace.

ReasoningTextBlock

Contains the reasoning that the model used to return the output.

S3Location

A storage location in an Amazon S3 bucket.

SpecificToolChoice

The model must request a specific tool. For example, {"tool" : {"name" : "Your tool name"}}.

This field is only supported by Anthropic Claude 3 models.

Tag

A tag.

TokenUsage

The tokens used in a message API inference call.

ToolConfiguration

Configuration information for the tools that you pass to a model. For more information, see Tool use (function calling) in the Amazon Bedrock User Guide.

ToolResultBlock

A tool result block that contains the results for a tool request that the model previously made.

ToolSpecification

The specification for the tool.

ToolUseBlock

A tool use content block. Contains information about a tool that the model is requesting be run., The model uses the result from the tool to generate a response.

ToolUseBlockDelta

The delta for a tool use block.

ToolUseBlockStart

The start of a tool use block.

VideoBlock

A video block.

Enums§

AsyncInvokeOutputDataConfig

Asynchronous invocation output data settings.

AsyncInvokeStatus
When writing a match expression against AsyncInvokeStatus, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
CachePointType
When writing a match expression against CachePointType, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
CitationGeneratedContent

Contains the generated text content that corresponds to or is supported by a citation from a source document.

CitationLocation

Specifies the precise location within a source document where cited content can be found. This can include character-level positions, page numbers, or document chunks depending on the document type and indexing method.

CitationSourceContent

Contains the actual text content from a source document that is being cited or referenced in the model's response.

ContentBlock

A block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.

ContentBlockDelta

A block of content in a streaming response.

ContentBlockStart

Content block start information.

ConversationRole
When writing a match expression against ConversationRole, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
ConverseOutput

The output from a call to Converse.

ConverseStreamOutput

The messages output stream

DocumentContentBlock

Contains the actual content of a document that can be processed by the model and potentially cited in the response.

DocumentFormat
When writing a match expression against DocumentFormat, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
DocumentSource

Contains the content of a document.

GuardrailAction
When writing a match expression against GuardrailAction, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailContentBlock

The content block to be evaluated by the guardrail.

GuardrailContentFilterConfidence
When writing a match expression against GuardrailContentFilterConfidence, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailContentFilterStrength
When writing a match expression against GuardrailContentFilterStrength, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailContentFilterType
When writing a match expression against GuardrailContentFilterType, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailContentPolicyAction
When writing a match expression against GuardrailContentPolicyAction, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailContentQualifier
When writing a match expression against GuardrailContentQualifier, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailContentSource
When writing a match expression against GuardrailContentSource, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailContextualGroundingFilterType
When writing a match expression against GuardrailContextualGroundingFilterType, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailContextualGroundingPolicyAction
When writing a match expression against GuardrailContextualGroundingPolicyAction, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailConverseContentBlock

A content block for selective guarding with the Converse or ConverseStream API operations.

GuardrailConverseContentQualifier
When writing a match expression against GuardrailConverseContentQualifier, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailConverseImageFormat
When writing a match expression against GuardrailConverseImageFormat, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailConverseImageSource

The image source (image bytes) of the guardrail converse image source.

GuardrailImageFormat
When writing a match expression against GuardrailImageFormat, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailImageSource

The image source (image bytes) of the guardrail image source. Object used in independent api.

GuardrailManagedWordType
When writing a match expression against GuardrailManagedWordType, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailOutputScope
When writing a match expression against GuardrailOutputScope, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailPiiEntityType
When writing a match expression against GuardrailPiiEntityType, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailSensitiveInformationPolicyAction
When writing a match expression against GuardrailSensitiveInformationPolicyAction, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailStreamProcessingMode
When writing a match expression against GuardrailStreamProcessingMode, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailTopicPolicyAction
When writing a match expression against GuardrailTopicPolicyAction, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailTopicType
When writing a match expression against GuardrailTopicType, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailTrace
When writing a match expression against GuardrailTrace, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
GuardrailWordPolicyAction
When writing a match expression against GuardrailWordPolicyAction, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
ImageFormat
When writing a match expression against ImageFormat, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
ImageSource

The source for an image.

InvokeModelWithBidirectionalStreamInput

Payload content, the speech chunk, for the bidirectional input of the invocation step.

InvokeModelWithBidirectionalStreamOutput

Output from the bidirectional stream that was used for model invocation.

PerformanceConfigLatency
When writing a match expression against PerformanceConfigLatency, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
PromptVariableValues

Contains a map of variables in a prompt from Prompt management to an object containing the values to fill in for them when running model invocation. For more information, see How Prompt management works.

ReasoningContentBlock

Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

ReasoningContentBlockDelta

Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

ResponseStream

Definition of content in the response stream.

SortAsyncInvocationBy
When writing a match expression against SortAsyncInvocationBy, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
SortOrder
When writing a match expression against SortOrder, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
StopReason
When writing a match expression against StopReason, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
SystemContentBlock

A system content block.

Tool

Information about a tool that you can use with the Converse API. For more information, see Tool use (function calling) in the Amazon Bedrock User Guide.

ToolChoice

Determines which tools the model should request in a call to Converse or ConverseStream. ToolChoice is only supported by Anthropic Claude 3 models and by Mistral AI Mistral Large.

ToolInputSchema

The schema for the tool. The top level schema type must be object.

ToolResultContentBlock

The tool result content block.

ToolResultStatus
When writing a match expression against ToolResultStatus, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
Trace
When writing a match expression against Trace, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
VideoFormat
When writing a match expression against VideoFormat, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.
VideoSource

A video source. You can upload a smaller video as a base64-encoded string as long as the encoded file is less than 25MB. You can also transfer videos up to 1GB in size from an S3 bucket.