AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Classes

NameDescription
Class AccessDeniedException

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

Class AnyToolChoice

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

Class ApplyGuardrailRequest

Container for the parameters to the ApplyGuardrail operation. The action to apply a guardrail.

For troubleshooting some of the common errors you might encounter when using the ApplyGuardrail API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Class ApplyGuardrailResponse

This is the response object from the ApplyGuardrail operation.

Class AsyncInvokeOutputDataConfig

Asynchronous invocation output data settings.

Class AsyncInvokeS3OutputDataConfig

Asynchronous invocation output data settings.

Class AsyncInvokeSummary

A summary of an asynchronous invocation.

Class AutoToolChoice

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

Class BedrockRuntimePaginatorFactory

Paginators for the BedrockRuntime service

Class ConflictException

Error occurred because of a conflict while performing an operation.

Class ContentBlock

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

Class ContentBlockDelta

A block of content in a streaming response.

Class ContentBlockDeltaEvent

The content block delta event.

Class ContentBlockStart

Content block start information.

Class ContentBlockStartEvent

Content block start event.

Class ContentBlockStopEvent

A content block stop event.

Class ConverseMetrics

Metrics for a call to Converse.

Class ConverseOutput

The output from a call to Converse.

Class ConverseRequest

Container for the parameters to the Converse operation. Sends messages to the specified Amazon Bedrock model. Converse provides a consistent interface that works with all models that support messages. This allows you to write code once and use it with different models. If a model has unique inference parameters, you can also pass those unique parameters to the model.

Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.

You can submit a prompt by including it in the messages field, specifying the modelId of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.

You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the promptVariables field. You can append more messages to the prompt by using the messages field. If you use a prompt from Prompt management, you can't include the following fields in the request: additionalModelRequestFields, inferenceConfig, system, or toolConfig. Instead, these fields must be defined through Prompt management. For more information, see Use a prompt from Prompt management.

For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide

For example code, see Converse API examples in the Amazon Bedrock User Guide.

This operation requires permission for the bedrock:InvokeModel action.

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the base inference actions (InvokeModel and InvokeModelWithResponseStream). For more information see Deny access for inference on specific models.

For troubleshooting some of the common errors you might encounter when using the Converse API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Class ConverseResponse

This is the response object from the Converse operation.

Class ConverseStreamMetadataEvent

A conversation stream metadata event.

Class ConverseStreamMetrics

Metrics for the stream.

Class ConverseStreamOutput

The messages output stream

Class ConverseStreamRequest

Container for the parameters to the ConverseStream operation. Sends messages to the specified Amazon Bedrock model and returns the response in a stream. ConverseStream provides a consistent API that works with all Amazon Bedrock models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model.

To find out if a model supports streaming, call GetFoundationModel and check the responseStreamingSupported field in the response.

The CLI doesn't support streaming operations in Amazon Bedrock, including ConverseStream.

Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.

You can submit a prompt by including it in the messages field, specifying the modelId of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.

You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the promptVariables field. You can append more messages to the prompt by using the messages field. If you use a prompt from Prompt management, you can't include the following fields in the request: additionalModelRequestFields, inferenceConfig, system, or toolConfig. Instead, these fields must be defined through Prompt management. For more information, see Use a prompt from Prompt management.

For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide

For example code, see Conversation streaming example in the Amazon Bedrock User Guide.

This operation requires permission for the bedrock:InvokeModelWithResponseStream action.

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the base inference actions (InvokeModel and InvokeModelWithResponseStream). For more information see Deny access for inference on specific models.

For troubleshooting some of the common errors you might encounter when using the ConverseStream API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Class ConverseStreamResponse

This is the response object from the ConverseStream operation.

Class ConverseStreamTrace

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

Class ConverseTrace

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

Class DocumentBlock

A document to include in a message.

Class DocumentSource

Contains the content of a document.

Class GetAsyncInvokeRequest

Container for the parameters to the GetAsyncInvoke operation. Retrieve information about an asynchronous invocation.

Class GetAsyncInvokeResponse

This is the response object from the GetAsyncInvoke operation.

Class GuardrailAssessment

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

Class GuardrailConfiguration

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

Class GuardrailContentBlock

The content block to be evaluated by the guardrail.

Class GuardrailContentFilter

The content filter for a guardrail.

Class GuardrailContentPolicyAssessment

An assessment of a content policy for a guardrail.

Class GuardrailContextualGroundingFilter

The details for the guardrails contextual grounding filter.

Class GuardrailContextualGroundingPolicyAssessment

The policy assessment details for the guardrails contextual grounding filter.

Class GuardrailConverseContentBlock

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

Class GuardrailConverseImageBlock

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

Class GuardrailConverseImageSource

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

Class GuardrailConverseTextBlock

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

Class GuardrailCoverage

The action of the guardrail coverage details.

Class GuardrailCustomWord

A custom word configured in a guardrail.

Class GuardrailImageBlock

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

Class GuardrailImageCoverage

The details of the guardrail image coverage.

Class GuardrailImageSource

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

Class GuardrailInvocationMetrics

The invocation metrics for the guardrail.

Class GuardrailManagedWord

A managed word configured in a guardrail.

Class GuardrailOutputContent

The output content produced by the guardrail.

Class GuardrailPiiEntityFilter

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

Class GuardrailRegexFilter

A Regex filter configured in a guardrail.

Class GuardrailSensitiveInformationPolicyAssessment

The assessment for aPersonally Identifiable Information (PII) policy.

Class GuardrailStreamConfiguration

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

Class GuardrailTextBlock

The text block to be evaluated by the guardrail.

Class GuardrailTextCharactersCoverage

The guardrail coverage for the text characters.

Class GuardrailTopic

Information about a topic guardrail.

Class GuardrailTopicPolicyAssessment

A behavior assessment of a topic policy.

Class GuardrailTraceAssessment

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

Class GuardrailUsage

The details on the use of the guardrail.

Class GuardrailWordPolicyAssessment

The word policy assessment.

Class ImageBlock

Image content for a message.

Class ImageSource

The source for an image.

Class 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.

Class InternalServerException

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

Class InvokeModelRequest

Container for the parameters to the InvokeModel operation. Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. You use model inference to generate text, images, and embeddings.

For example code, see Invoke model code examples in the Amazon Bedrock User Guide.

This operation requires permission for the bedrock:InvokeModel action.

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models.

For troubleshooting some of the common errors you might encounter when using the InvokeModel API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Class InvokeModelResponse

This is the response object from the InvokeModel operation.

Class InvokeModelWithResponseStreamRequest

Container for the parameters to the InvokeModelWithResponseStream operation. Invoke the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. The response is returned in a stream.

To see if a model supports streaming, call GetFoundationModel and check the responseStreamingSupported field in the response.

The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeModelWithResponseStream.

For example code, see Invoke model with streaming code example in the Amazon Bedrock User Guide.

This operation requires permissions to perform the bedrock:InvokeModelWithResponseStream action.

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models.

For troubleshooting some of the common errors you might encounter when using the InvokeModelWithResponseStream API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Class InvokeModelWithResponseStreamResponse

This is the response object from the InvokeModelWithResponseStream operation.

Class ListAsyncInvokesRequest

Container for the parameters to the ListAsyncInvokes operation. Lists asynchronous invocations.

Class ListAsyncInvokesResponse

This is the response object from the ListAsyncInvokes operation.

Class Message

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

Class MessageStartEvent

The start of a message.

Class MessageStopEvent

The stop event for a message.

Class ModelErrorException

The request failed due to an error while processing the model.

Class ModelNotReadyException

The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behavior in the AWS SDKs and Tools reference guide.

Class ModelStreamErrorException

An error occurred while streaming the response. Retry your request.

Class ModelTimeoutException

The request took too long to process. Processing time exceeded the model timeout length.

Class PayloadPart

Payload content included in the response.

Class PerformanceConfiguration

Performance settings for a model.

Class PromptRouterTrace

A prompt router trace.

Class 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.

Class 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.

Class 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.

Class ReasoningTextBlock

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

Class ResourceNotFoundException

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

Class ResponseStream

Definition of content in the response stream.

Class S3Location

A storage location in an S3 bucket.

Class ServiceQuotaExceededException

Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.

Class ServiceUnavailableException

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

Class 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.

Class StartAsyncInvokeRequest

Container for the parameters to the StartAsyncInvoke operation. Starts an asynchronous invocation.

This operation requires permission for the bedrock:InvokeModel action.

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models.

Class StartAsyncInvokeResponse

This is the response object from the StartAsyncInvoke operation.

Class SystemContentBlock

A system content block.

Class Tag

A tag.

Class ThrottlingException

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

Class TokenUsage

The tokens used in a message API inference call.

Class 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.

Class 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.

Class 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.

Class ToolInputSchema

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

Class ToolResultBlock

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

Class ToolResultContentBlock

The tool result content block.

Class ToolSpecification

The specification for the tool.

Class 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.

Class ToolUseBlockDelta

The delta for a tool use block.

Class ToolUseBlockStart

The start of a tool use block.

Class ValidationException

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

Class VideoBlock

A video block.

Class 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.

Interfaces

NameDescription
Interface IBedrockRuntimePaginatorFactory

Paginators for the BedrockRuntime service

Interface IListAsyncInvokesPaginator

Paginator for the ListAsyncInvokes operation