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.
Implementation for accessing Bedrock
Describes the API operations for creating, managing, fine-turning, and evaluating Amazon Bedrock models.Namespace: Amazon.Bedrock
Assembly: AWSSDK.Bedrock.dll
Version: 3.x.y.z
public class AmazonBedrockClient : AmazonServiceClient IAmazonBedrock, IAmazonService, IDisposable
The AmazonBedrockClient type exposes the following members
Name | Description | |
---|---|---|
AmazonBedrockClient() |
Constructs AmazonBedrockClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonBedrockClient(RegionEndpoint) |
Constructs AmazonBedrockClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonBedrockClient(AmazonBedrockConfig) |
Constructs AmazonBedrockClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonBedrockClient(AWSCredentials) |
Constructs AmazonBedrockClient with AWS Credentials |
|
AmazonBedrockClient(AWSCredentials, RegionEndpoint) |
Constructs AmazonBedrockClient with AWS Credentials |
|
AmazonBedrockClient(AWSCredentials, AmazonBedrockConfig) |
Constructs AmazonBedrockClient with AWS Credentials and an AmazonBedrockClient Configuration object. |
|
AmazonBedrockClient(string, string) |
Constructs AmazonBedrockClient with AWS Access Key ID and AWS Secret Key |
|
AmazonBedrockClient(string, string, RegionEndpoint) |
Constructs AmazonBedrockClient with AWS Access Key ID and AWS Secret Key |
|
AmazonBedrockClient(string, string, AmazonBedrockConfig) |
Constructs AmazonBedrockClient with AWS Access Key ID, AWS Secret Key and an AmazonBedrockClient Configuration object. |
|
AmazonBedrockClient(string, string, string) |
Constructs AmazonBedrockClient with AWS Access Key ID and AWS Secret Key |
|
AmazonBedrockClient(string, string, string, RegionEndpoint) |
Constructs AmazonBedrockClient with AWS Access Key ID and AWS Secret Key |
|
AmazonBedrockClient(string, string, string, AmazonBedrockConfig) |
Constructs AmazonBedrockClient with AWS Access Key ID, AWS Secret Key and an AmazonBedrockClient Configuration object. |
Name | Type | Description | |
---|---|---|---|
Config | Amazon.Runtime.IClientConfig | Inherited from Amazon.Runtime.AmazonServiceClient. | |
Paginators | Amazon.Bedrock.Model.IBedrockPaginatorFactory |
Paginators for the service |
Name | Description | |
---|---|---|
BatchDeleteEvaluationJob(BatchDeleteEvaluationJobRequest) |
Creates a batch deletion job. A model evaluation job can only be deleted if it has
following status |
|
BatchDeleteEvaluationJobAsync(BatchDeleteEvaluationJobRequest, CancellationToken) |
Creates a batch deletion job. A model evaluation job can only be deleted if it has
following status |
|
CreateEvaluationJob(CreateEvaluationJobRequest) |
API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers. To learn more about the requirements for creating a model evaluation job see, Model evaluation. |
|
CreateEvaluationJobAsync(CreateEvaluationJobRequest, CancellationToken) |
API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers. To learn more about the requirements for creating a model evaluation job see, Model evaluation. |
|
CreateGuardrail(CreateGuardrailRequest) |
Creates a guardrail to block topics and to implement safeguards for your generative AI applications. You can configure the following policies in a guardrail to avoid undesirable and harmful content, filter out denied topics and words, and remove sensitive information for privacy protection.
In addition to the above policies, you can also configure the messages to be returned to the user if a user input or model response is in violation of the policies defined in the guardrail. For more information, see Guardrails for Amazon Bedrock in the Amazon Bedrock User Guide. |
|
CreateGuardrailAsync(CreateGuardrailRequest, CancellationToken) |
Creates a guardrail to block topics and to implement safeguards for your generative AI applications. You can configure the following policies in a guardrail to avoid undesirable and harmful content, filter out denied topics and words, and remove sensitive information for privacy protection.
In addition to the above policies, you can also configure the messages to be returned to the user if a user input or model response is in violation of the policies defined in the guardrail. For more information, see Guardrails for Amazon Bedrock in the Amazon Bedrock User Guide. |
|
CreateGuardrailVersion(CreateGuardrailVersionRequest) |
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. |
|
CreateGuardrailVersionAsync(CreateGuardrailVersionRequest, CancellationToken) |
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. |
|
CreateModelCopyJob(CreateModelCopyJobRequest) |
Copies a model to another region so that it can be used there. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide. |
|
CreateModelCopyJobAsync(CreateModelCopyJobRequest, CancellationToken) |
Copies a model to another region so that it can be used there. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide. |
|
CreateModelCustomizationJob(CreateModelCustomizationJobRequest) |
Creates a fine-tuning job to customize a base model. You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes. For information on the format of training and validation data, see Prepare the datasets.
Model-customization jobs are asynchronous and the completion time depends on the
base model and the training/validation data size. To monitor a job, use the For more information, see Custom models in the Amazon Bedrock User Guide. |
|
CreateModelCustomizationJobAsync(CreateModelCustomizationJobRequest, CancellationToken) |
Creates a fine-tuning job to customize a base model. You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes. For information on the format of training and validation data, see Prepare the datasets.
Model-customization jobs are asynchronous and the completion time depends on the
base model and the training/validation data size. To monitor a job, use the For more information, see Custom models in the Amazon Bedrock User Guide. |
|
CreateModelImportJob(CreateModelImportJobRequest) |
Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker. For more information, see Import a customized model |
|
CreateModelImportJobAsync(CreateModelImportJobRequest, CancellationToken) |
Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker. For more information, see Import a customized model |
|
CreateModelInvocationJob(CreateModelInvocationJobRequest) |
Creates a batch inference job to invoke a model on multiple prompts. Format your data according to Format your inference data and upload it to an Amazon S3 bucket. For more information, see Process multiple prompts with batch inference.
The response returns a |
|
CreateModelInvocationJobAsync(CreateModelInvocationJobRequest, CancellationToken) |
Creates a batch inference job to invoke a model on multiple prompts. Format your data according to Format your inference data and upload it to an Amazon S3 bucket. For more information, see Process multiple prompts with batch inference.
The response returns a |
|
CreateProvisionedModelThroughput(CreateProvisionedModelThroughputRequest) |
Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
|
CreateProvisionedModelThroughputAsync(CreateProvisionedModelThroughputRequest, CancellationToken) |
Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
|
DeleteCustomModel(DeleteCustomModelRequest) |
Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide. |
|
DeleteCustomModelAsync(DeleteCustomModelRequest, CancellationToken) |
Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide. |
|
DeleteGuardrail(DeleteGuardrailRequest) |
Deletes a guardrail.
|
|
DeleteGuardrailAsync(DeleteGuardrailRequest, CancellationToken) |
Deletes a guardrail.
|
|
DeleteImportedModel(DeleteImportedModelRequest) |
Deletes a custom model that you imported earlier. For more information, see Import a customized model in the Amazon Bedrock User Guide. |
|
DeleteImportedModelAsync(DeleteImportedModelRequest, CancellationToken) |
Deletes a custom model that you imported earlier. For more information, see Import a customized model in the Amazon Bedrock User Guide. |
|
DeleteModelInvocationLoggingConfiguration(DeleteModelInvocationLoggingConfigurationRequest) |
Delete the invocation logging. |
|
DeleteModelInvocationLoggingConfigurationAsync(DeleteModelInvocationLoggingConfigurationRequest, CancellationToken) |
Delete the invocation logging. |
|
DeleteProvisionedModelThroughput(DeleteProvisionedModelThroughputRequest) |
Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
|
DeleteProvisionedModelThroughputAsync(DeleteProvisionedModelThroughputRequest, CancellationToken) |
Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
|
DetermineServiceOperationEndpoint(AmazonWebServiceRequest) |
Returns the endpoint that will be used for a particular request. |
|
Dispose() | Inherited from Amazon.Runtime.AmazonServiceClient. | |
GetCustomModel(GetCustomModelRequest) |
Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide. |
|
GetCustomModelAsync(GetCustomModelRequest, CancellationToken) |
Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide. |
|
GetEvaluationJob(GetEvaluationJobRequest) |
Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluation. |
|
GetEvaluationJobAsync(GetEvaluationJobRequest, CancellationToken) |
Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluation. |
|
GetFoundationModel(GetFoundationModelRequest) |
Get details about a Amazon Bedrock foundation model. |
|
GetFoundationModelAsync(GetFoundationModelRequest, CancellationToken) |
Get details about a Amazon Bedrock foundation model. |
|
GetGuardrail(GetGuardrailRequest) |
Gets details about a guardrail. If you don't specify a version, the response returns
details for the |
|
GetGuardrailAsync(GetGuardrailRequest, CancellationToken) |
Gets details about a guardrail. If you don't specify a version, the response returns
details for the |
|
GetImportedModel(GetImportedModelRequest) |
Gets properties associated with a customized model you imported. |
|
GetImportedModelAsync(GetImportedModelRequest, CancellationToken) |
Gets properties associated with a customized model you imported. |
|
GetInferenceProfile(GetInferenceProfileRequest) |
Gets information about an inference profile. For more information, see the Amazon Bedrock User Guide. |
|
GetInferenceProfileAsync(GetInferenceProfileRequest, CancellationToken) |
Gets information about an inference profile. For more information, see the Amazon Bedrock User Guide. |
|
GetModelCopyJob(GetModelCopyJobRequest) |
Retrieves information about a model copy job. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide. |
|
GetModelCopyJobAsync(GetModelCopyJobRequest, CancellationToken) |
Retrieves information about a model copy job. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide. |
|
GetModelCustomizationJob(GetModelCustomizationJobRequest) |
Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide. |
|
GetModelCustomizationJobAsync(GetModelCustomizationJobRequest, CancellationToken) |
Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide. |
|
GetModelImportJob(GetModelImportJobRequest) |
Retrieves the properties associated with import model job, including the status of the job. For more information, see Import a customized model in the Amazon Bedrock User Guide. |
|
GetModelImportJobAsync(GetModelImportJobRequest, CancellationToken) |
Retrieves the properties associated with import model job, including the status of the job. For more information, see Import a customized model in the Amazon Bedrock User Guide. |
|
GetModelInvocationJob(GetModelInvocationJobRequest) |
Gets details about a batch inference job. For more information, see View details about a batch inference job |
|
GetModelInvocationJobAsync(GetModelInvocationJobRequest, CancellationToken) |
Gets details about a batch inference job. For more information, see View details about a batch inference job |
|
GetModelInvocationLoggingConfiguration(GetModelInvocationLoggingConfigurationRequest) |
Get the current configuration values for model invocation logging. |
|
GetModelInvocationLoggingConfigurationAsync(GetModelInvocationLoggingConfigurationRequest, CancellationToken) |
Get the current configuration values for model invocation logging. |
|
GetProvisionedModelThroughput(GetProvisionedModelThroughputRequest) |
Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
|
GetProvisionedModelThroughputAsync(GetProvisionedModelThroughputRequest, CancellationToken) |
Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
|
ListCustomModels(ListCustomModelsRequest) |
Returns a list of the custom models that you have created with the For more information, see Custom models in the Amazon Bedrock User Guide. |
|
ListCustomModelsAsync(ListCustomModelsRequest, CancellationToken) |
Returns a list of the custom models that you have created with the For more information, see Custom models in the Amazon Bedrock User Guide. |
|
ListEvaluationJobs(ListEvaluationJobsRequest) |
Lists model evaluation jobs. |
|
ListEvaluationJobsAsync(ListEvaluationJobsRequest, CancellationToken) |
Lists model evaluation jobs. |
|
ListFoundationModels(ListFoundationModelsRequest) |
Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide. |
|
ListFoundationModelsAsync(ListFoundationModelsRequest, CancellationToken) |
Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide. |
|
ListGuardrails(ListGuardrailsRequest) |
Lists details about all the guardrails in an account. To list the
You can set the maximum number of results to return in a response in the |
|
ListGuardrailsAsync(ListGuardrailsRequest, CancellationToken) |
Lists details about all the guardrails in an account. To list the
You can set the maximum number of results to return in a response in the |
|
ListImportedModels(ListImportedModelsRequest) |
Returns a list of models you've imported. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide. |
|
ListImportedModelsAsync(ListImportedModelsRequest, CancellationToken) |
Returns a list of models you've imported. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide. |
|
ListInferenceProfiles(ListInferenceProfilesRequest) |
Returns a list of inference profiles that you can use. |
|
ListInferenceProfilesAsync(ListInferenceProfilesRequest, CancellationToken) |
Returns a list of inference profiles that you can use. |
|
ListModelCopyJobs(ListModelCopyJobsRequest) |
Returns a list of model copy jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide. |
|
ListModelCopyJobsAsync(ListModelCopyJobsRequest, CancellationToken) |
Returns a list of model copy jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide. |
|
ListModelCustomizationJobs(ListModelCustomizationJobsRequest) |
Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Custom models in the Amazon Bedrock User Guide. |
|
ListModelCustomizationJobsAsync(ListModelCustomizationJobsRequest, CancellationToken) |
Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Custom models in the Amazon Bedrock User Guide. |
|
ListModelImportJobs(ListModelImportJobsRequest) |
Returns a list of import jobs you've submitted. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide. |
|
ListModelImportJobsAsync(ListModelImportJobsRequest, CancellationToken) |
Returns a list of import jobs you've submitted. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide. |
|
ListModelInvocationJobs(ListModelInvocationJobsRequest) |
Lists all batch inference jobs in the account. For more information, see View details about a batch inference job. |
|
ListModelInvocationJobsAsync(ListModelInvocationJobsRequest, CancellationToken) |
Lists all batch inference jobs in the account. For more information, see View details about a batch inference job. |
|
ListProvisionedModelThroughputs(ListProvisionedModelThroughputsRequest) |
Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
|
ListProvisionedModelThroughputsAsync(ListProvisionedModelThroughputsRequest, CancellationToken) |
Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
|
ListTagsForResource(ListTagsForResourceRequest) |
List the tags associated with the specified resource. For more information, see Tagging resources in the Amazon Bedrock User Guide. |
|
ListTagsForResourceAsync(ListTagsForResourceRequest, CancellationToken) |
List the tags associated with the specified resource. For more information, see Tagging resources in the Amazon Bedrock User Guide. |
|
PutModelInvocationLoggingConfiguration(PutModelInvocationLoggingConfigurationRequest) |
Set the configuration values for model invocation logging. |
|
PutModelInvocationLoggingConfigurationAsync(PutModelInvocationLoggingConfigurationRequest, CancellationToken) |
Set the configuration values for model invocation logging. |
|
StopEvaluationJob(StopEvaluationJobRequest) |
Stops an in progress model evaluation job. |
|
StopEvaluationJobAsync(StopEvaluationJobRequest, CancellationToken) |
Stops an in progress model evaluation job. |
|
StopModelCustomizationJob(StopModelCustomizationJobRequest) |
Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide. |
|
StopModelCustomizationJobAsync(StopModelCustomizationJobRequest, CancellationToken) |
Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide. |
|
StopModelInvocationJob(StopModelInvocationJobRequest) |
Stops a batch inference job. You're only charged for tokens that were already processed. For more information, see Stop a batch inference job. |
|
StopModelInvocationJobAsync(StopModelInvocationJobRequest, CancellationToken) |
Stops a batch inference job. You're only charged for tokens that were already processed. For more information, see Stop a batch inference job. |
|
TagResource(TagResourceRequest) |
Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide. |
|
TagResourceAsync(TagResourceRequest, CancellationToken) |
Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide. |
|
UntagResource(UntagResourceRequest) |
Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide. |
|
UntagResourceAsync(UntagResourceRequest, CancellationToken) |
Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide. |
|
UpdateGuardrail(UpdateGuardrailRequest) |
Updates a guardrail with the values you specify.
|
|
UpdateGuardrailAsync(UpdateGuardrailRequest, CancellationToken) |
Updates a guardrail with the values you specify.
|
|
UpdateProvisionedModelThroughput(UpdateProvisionedModelThroughputRequest) |
Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
|
UpdateProvisionedModelThroughputAsync(UpdateProvisionedModelThroughputRequest, CancellationToken) |
Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
Name | Description | |
---|---|---|
AfterResponseEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
BeforeRequestEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
ExceptionEvent | Inherited from Amazon.Runtime.AmazonServiceClient. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5