Bedrock ******* Client ====== class Bedrock.Client A low-level client representing Amazon Bedrock Describes the API operations for creating, managing, fine-turning, and evaluating Amazon Bedrock models. import boto3 client = boto3.client('bedrock') These are the available methods: * batch_delete_evaluation_job * can_paginate * cancel_automated_reasoning_policy_build_workflow * close * create_automated_reasoning_policy * create_automated_reasoning_policy_test_case * create_automated_reasoning_policy_version * create_custom_model * create_custom_model_deployment * create_evaluation_job * create_foundation_model_agreement * create_guardrail * create_guardrail_version * create_inference_profile * create_marketplace_model_endpoint * create_model_copy_job * create_model_customization_job * create_model_import_job * create_model_invocation_job * create_prompt_router * create_provisioned_model_throughput * delete_automated_reasoning_policy * delete_automated_reasoning_policy_build_workflow * delete_automated_reasoning_policy_test_case * delete_custom_model * delete_custom_model_deployment * delete_foundation_model_agreement * delete_guardrail * delete_imported_model * delete_inference_profile * delete_marketplace_model_endpoint * delete_model_invocation_logging_configuration * delete_prompt_router * delete_provisioned_model_throughput * deregister_marketplace_model_endpoint * export_automated_reasoning_policy_version * get_automated_reasoning_policy * get_automated_reasoning_policy_annotations * get_automated_reasoning_policy_build_workflow * get_automated_reasoning_policy_build_workflow_result_assets * get_automated_reasoning_policy_next_scenario * get_automated_reasoning_policy_test_case * get_automated_reasoning_policy_test_result * get_custom_model * get_custom_model_deployment * get_evaluation_job * get_foundation_model * get_foundation_model_availability * get_guardrail * get_imported_model * get_inference_profile * get_marketplace_model_endpoint * get_model_copy_job * get_model_customization_job * get_model_import_job * get_model_invocation_job * get_model_invocation_logging_configuration * get_paginator * get_prompt_router * get_provisioned_model_throughput * get_use_case_for_model_access * get_waiter * list_automated_reasoning_policies * list_automated_reasoning_policy_build_workflows * list_automated_reasoning_policy_test_cases * list_automated_reasoning_policy_test_results * list_custom_model_deployments * list_custom_models * list_evaluation_jobs * list_foundation_model_agreement_offers * list_foundation_models * list_guardrails * list_imported_models * list_inference_profiles * list_marketplace_model_endpoints * list_model_copy_jobs * list_model_customization_jobs * list_model_import_jobs * list_model_invocation_jobs * list_prompt_routers * list_provisioned_model_throughputs * list_tags_for_resource * put_model_invocation_logging_configuration * put_use_case_for_model_access * register_marketplace_model_endpoint * start_automated_reasoning_policy_build_workflow * start_automated_reasoning_policy_test_workflow * stop_evaluation_job * stop_model_customization_job * stop_model_invocation_job * tag_resource * untag_resource * update_automated_reasoning_policy * update_automated_reasoning_policy_annotations * update_automated_reasoning_policy_test_case * update_guardrail * update_marketplace_model_endpoint * update_provisioned_model_throughput Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * ListAutomatedReasoningPolicies * ListAutomatedReasoningPolicyBuildWorkflows * ListAutomatedReasoningPolicyTestCases * ListAutomatedReasoningPolicyTestResults * ListCustomModelDeployments * ListCustomModels * ListEvaluationJobs * ListGuardrails * ListImportedModels * ListInferenceProfiles * ListMarketplaceModelEndpoints * ListModelCopyJobs * ListModelCustomizationJobs * ListModelImportJobs * ListModelInvocationJobs * ListPromptRouters * ListProvisionedModelThroughputs Bedrock / Paginator / ListCustomModels ListCustomModels **************** class Bedrock.Paginator.ListCustomModels paginator = client.get_paginator('list_custom_models') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_custom_models()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( creationTimeBefore=datetime(2015, 1, 1), creationTimeAfter=datetime(2015, 1, 1), nameContains='string', baseModelArnEquals='string', foundationModelArnEquals='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', isOwned=True|False, modelStatus='Active'|'Creating'|'Failed', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **creationTimeBefore** (*datetime*) -- Return custom models created before the specified time. * **creationTimeAfter** (*datetime*) -- Return custom models created after the specified time. * **nameContains** (*string*) -- Return custom models only if the job name contains these characters. * **baseModelArnEquals** (*string*) -- Return custom models only if the base model Amazon Resource Name (ARN) matches this parameter. * **foundationModelArnEquals** (*string*) -- Return custom models only if the foundation model Amazon Resource Name (ARN) matches this parameter. * **sortBy** (*string*) -- The field to sort by in the returned list of models. * **sortOrder** (*string*) -- The sort order of the results. * **isOwned** (*boolean*) -- Return custom models depending on if the current account owns them ( "true") or if they were shared with the current account ( "false"). * **modelStatus** (*string*) -- The status of them model to filter results by. Possible values include: * "Creating" - Include only models that are currently being created and validated. * "Active" - Include only models that have been successfully created and are ready for use. * "Failed" - Include only models where the creation process failed. If you don't specify a status, the API returns models in all states. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'modelSummaries': [ { 'modelArn': 'string', 'modelName': 'string', 'creationTime': datetime(2015, 1, 1), 'baseModelArn': 'string', 'baseModelName': 'string', 'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION'|'IMPORTED', 'ownerAccountId': 'string', 'modelStatus': 'Active'|'Creating'|'Failed' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **modelSummaries** *(list) --* Model summaries. * *(dict) --* Summary information for a custom model. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the custom model. * **modelName** *(string) --* The name of the custom model. * **creationTime** *(datetime) --* Creation time of the model. * **baseModelArn** *(string) --* The base model Amazon Resource Name (ARN). * **baseModelName** *(string) --* The base model name. * **customizationType** *(string) --* Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models. * **ownerAccountId** *(string) --* The unique identifier of the account that owns the model. * **modelStatus** *(string) --* The current status of the custom model. Possible values include: * "Creating" - The model is being created and validated. * "Active" - The model has been successfully created and is ready for use. * "Failed" - The model creation process failed. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListMarketplaceModelEndpoints ListMarketplaceModelEndpoints ***************************** class Bedrock.Paginator.ListMarketplaceModelEndpoints paginator = client.get_paginator('list_marketplace_model_endpoints') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_marketplace_model_endpoints()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( modelSourceEquals='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **modelSourceEquals** (*string*) -- If specified, only endpoints for the given model source identifier are returned. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'marketplaceModelEndpoints': [ { 'endpointArn': 'string', 'modelSourceIdentifier': 'string', 'status': 'REGISTERED'|'INCOMPATIBLE_ENDPOINT', 'statusMessage': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **marketplaceModelEndpoints** *(list) --* An array of endpoint summaries. * *(dict) --* Provides a summary of an endpoint for a model from Amazon Bedrock Marketplace. * **endpointArn** *(string) --* The Amazon Resource Name (ARN) of the endpoint. * **modelSourceIdentifier** *(string) --* The ARN of the model from Amazon Bedrock Marketplace that is deployed on this endpoint. * **status** *(string) --* The overall status of the endpoint in Amazon Bedrock Marketplace. * **statusMessage** *(string) --* Additional information about the overall status, if available. * **createdAt** *(datetime) --* The timestamp when the endpoint was created. * **updatedAt** *(datetime) --* The timestamp when the endpoint was last updated. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListProvisionedModelThroughputs ListProvisionedModelThroughputs ******************************* class Bedrock.Paginator.ListProvisionedModelThroughputs paginator = client.get_paginator('list_provisioned_model_throughputs') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_provisioned_model_throughputs()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='Creating'|'InService'|'Updating'|'Failed', modelArnEquals='string', nameContains='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **creationTimeAfter** (*datetime*) -- A filter that returns Provisioned Throughputs created after the specified time. * **creationTimeBefore** (*datetime*) -- A filter that returns Provisioned Throughputs created before the specified time. * **statusEquals** (*string*) -- A filter that returns Provisioned Throughputs if their statuses matches the value that you specify. * **modelArnEquals** (*string*) -- A filter that returns Provisioned Throughputs whose model Amazon Resource Name (ARN) is equal to the value that you specify. * **nameContains** (*string*) -- A filter that returns Provisioned Throughputs if their name contains the expression that you specify. * **sortBy** (*string*) -- The field by which to sort the returned list of Provisioned Throughputs. * **sortOrder** (*string*) -- The sort order of the results. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'provisionedModelSummaries': [ { 'provisionedModelName': 'string', 'provisionedModelArn': 'string', 'modelArn': 'string', 'desiredModelArn': 'string', 'foundationModelArn': 'string', 'modelUnits': 123, 'desiredModelUnits': 123, 'status': 'Creating'|'InService'|'Updating'|'Failed', 'commitmentDuration': 'OneMonth'|'SixMonths', 'commitmentExpirationTime': datetime(2015, 1, 1), 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **provisionedModelSummaries** *(list) --* A list of summaries, one for each Provisioned Throughput in the response. * *(dict) --* A summary of information about a Provisioned Throughput. This data type is used in the following API operations: * ListProvisionedThroughputs response * **provisionedModelName** *(string) --* The name of the Provisioned Throughput. * **provisionedModelArn** *(string) --* The Amazon Resource Name (ARN) of the Provisioned Throughput. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the model associated with the Provisioned Throughput. * **desiredModelArn** *(string) --* The Amazon Resource Name (ARN) of the model requested to be associated to this Provisioned Throughput. This value differs from the "modelArn" if updating hasn't completed. * **foundationModelArn** *(string) --* The Amazon Resource Name (ARN) of the base model for which the Provisioned Throughput was created, or of the base model that the custom model for which the Provisioned Throughput was created was customized. * **modelUnits** *(integer) --* The number of model units allocated to the Provisioned Throughput. * **desiredModelUnits** *(integer) --* The number of model units that was requested to be allocated to the Provisioned Throughput. * **status** *(string) --* The status of the Provisioned Throughput. * **commitmentDuration** *(string) --* The duration for which the Provisioned Throughput was committed. * **commitmentExpirationTime** *(datetime) --* The timestamp for when the commitment term of the Provisioned Throughput expires. * **creationTime** *(datetime) --* The time that the Provisioned Throughput was created. * **lastModifiedTime** *(datetime) --* The time that the Provisioned Throughput was last modified. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListModelImportJobs ListModelImportJobs ******************* class Bedrock.Paginator.ListModelImportJobs paginator = client.get_paginator('list_model_import_jobs') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_model_import_jobs()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='InProgress'|'Completed'|'Failed', nameContains='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **creationTimeAfter** (*datetime*) -- Return import jobs that were created after the specified time. * **creationTimeBefore** (*datetime*) -- Return import jobs that were created before the specified time. * **statusEquals** (*string*) -- Return imported jobs with the specified status. * **nameContains** (*string*) -- Return imported jobs only if the job name contains these characters. * **sortBy** (*string*) -- The field to sort by in the returned list of imported jobs. * **sortOrder** (*string*) -- Specifies whether to sort the results in ascending or descending order. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'modelImportJobSummaries': [ { 'jobArn': 'string', 'jobName': 'string', 'status': 'InProgress'|'Completed'|'Failed', 'lastModifiedTime': datetime(2015, 1, 1), 'creationTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'importedModelArn': 'string', 'importedModelName': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **modelImportJobSummaries** *(list) --* Import job summaries. * *(dict) --* Information about the import job. * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the import job. * **jobName** *(string) --* The name of the import job. * **status** *(string) --* The status of the imported job. * **lastModifiedTime** *(datetime) --* The time when the import job was last modified. * **creationTime** *(datetime) --* The time import job was created. * **endTime** *(datetime) --* The time when import job ended. * **importedModelArn** *(string) --* The Amazon resource Name (ARN) of the imported model. * **importedModelName** *(string) --* The name of the imported model. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListImportedModels ListImportedModels ****************** class Bedrock.Paginator.ListImportedModels paginator = client.get_paginator('list_imported_models') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_imported_models()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( creationTimeBefore=datetime(2015, 1, 1), creationTimeAfter=datetime(2015, 1, 1), nameContains='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **creationTimeBefore** (*datetime*) -- Return imported models that created before the specified time. * **creationTimeAfter** (*datetime*) -- Return imported models that were created after the specified time. * **nameContains** (*string*) -- Return imported models only if the model name contains these characters. * **sortBy** (*string*) -- The field to sort by in the returned list of imported models. * **sortOrder** (*string*) -- Specifies whetehr to sort the results in ascending or descending order. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'modelSummaries': [ { 'modelArn': 'string', 'modelName': 'string', 'creationTime': datetime(2015, 1, 1), 'instructSupported': True|False, 'modelArchitecture': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **modelSummaries** *(list) --* Model summaries. * *(dict) --* Information about the imported model. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the imported model. * **modelName** *(string) --* Name of the imported model. * **creationTime** *(datetime) --* Creation time of the imported model. * **instructSupported** *(boolean) --* Specifies if the imported model supports converse. * **modelArchitecture** *(string) --* The architecture of the imported model. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListAutomatedReasoningPolicies ListAutomatedReasoningPolicies ****************************** class Bedrock.Paginator.ListAutomatedReasoningPolicies paginator = client.get_paginator('list_automated_reasoning_policies') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_automated_reasoning_policies()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( policyArn='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **policyArn** (*string*) -- Optional filter to list only the policy versions with the specified Amazon Resource Name (ARN). If not provided, the DRAFT versions for all policies are listed. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'automatedReasoningPolicySummaries': [ { 'policyArn': 'string', 'name': 'string', 'description': 'string', 'version': 'string', 'policyId': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **automatedReasoningPolicySummaries** *(list) --* A list of Automated Reasoning policy summaries. * *(dict) --* Contains summary information about an Automated Reasoning policy, including metadata and timestamps. * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the policy. * **name** *(string) --* The name of the policy. * **description** *(string) --* The description of the policy. * **version** *(string) --* The version of the policy. * **policyId** *(string) --* The unique identifier of the policy. * **createdAt** *(datetime) --* The timestamp when the policy was created. * **updatedAt** *(datetime) --* The timestamp when the policy was last updated. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListAutomatedReasoningPolicyTestCases ListAutomatedReasoningPolicyTestCases ************************************* class Bedrock.Paginator.ListAutomatedReasoningPolicyTestCases paginator = client.get_paginator('list_automated_reasoning_policy_test_cases') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_automated_reasoning_policy_test_cases()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( policyArn='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to list tests. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'testCases': [ { 'testCaseId': 'string', 'guardContent': 'string', 'queryContent': 'string', 'expectedAggregatedFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'confidenceThreshold': 123.0 }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **testCases** *(list) --* A list of tests for the specified policy. * *(dict) --* Represents a test for validating an Automated Reasoning policy. tests contain sample inputs and expected outcomes to verify policy behavior. * **testCaseId** *(string) --* The unique identifier of the test. * **guardContent** *(string) --* The output content to be validated by the policy, typically representing a foundation model response. * **queryContent** *(string) --* The input query or prompt that generated the content. This provides context for the validation. * **expectedAggregatedFindingsResult** *(string) --* The expected result of the Automated Reasoning check for this test. * **createdAt** *(datetime) --* The timestamp when the test was created. * **updatedAt** *(datetime) --* The timestamp when the test was last updated. * **confidenceThreshold** *(float) --* The minimum confidence level for logic validation. Content meeting this threshold is considered high- confidence and can be validated. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListModelCopyJobs ListModelCopyJobs ***************** class Bedrock.Paginator.ListModelCopyJobs paginator = client.get_paginator('list_model_copy_jobs') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_model_copy_jobs()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='InProgress'|'Completed'|'Failed', sourceAccountEquals='string', sourceModelArnEquals='string', targetModelNameContains='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **creationTimeAfter** (*datetime*) -- Filters for model copy jobs created after the specified time. * **creationTimeBefore** (*datetime*) -- Filters for model copy jobs created before the specified time. * **statusEquals** (*string*) -- Filters for model copy jobs whose status matches the value that you specify. * **sourceAccountEquals** (*string*) -- Filters for model copy jobs in which the account that the source model belongs to is equal to the value that you specify. * **sourceModelArnEquals** (*string*) -- Filters for model copy jobs in which the Amazon Resource Name (ARN) of the source model to is equal to the value that you specify. * **targetModelNameContains** (*string*) -- Filters for model copy jobs in which the name of the copied model contains the string that you specify. * **sortBy** (*string*) -- The field to sort by in the returned list of model copy jobs. * **sortOrder** (*string*) -- Specifies whether to sort the results in ascending or descending order. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'modelCopyJobSummaries': [ { 'jobArn': 'string', 'status': 'InProgress'|'Completed'|'Failed', 'creationTime': datetime(2015, 1, 1), 'targetModelArn': 'string', 'targetModelName': 'string', 'sourceAccountId': 'string', 'sourceModelArn': 'string', 'targetModelKmsKeyArn': 'string', 'targetModelTags': [ { 'key': 'string', 'value': 'string' }, ], 'failureMessage': 'string', 'sourceModelName': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **modelCopyJobSummaries** *(list) --* A list of information about each model copy job. * *(dict) --* Contains details about each model copy job. This data type is used in the following API operations: * ListModelCopyJobs response * **jobArn** *(string) --* The Amazon Resoource Name (ARN) of the model copy job. * **status** *(string) --* The status of the model copy job. * **creationTime** *(datetime) --* The time that the model copy job was created. * **targetModelArn** *(string) --* The Amazon Resource Name (ARN) of the copied model. * **targetModelName** *(string) --* The name of the copied model. * **sourceAccountId** *(string) --* The unique identifier of the account that the model being copied originated from. * **sourceModelArn** *(string) --* The Amazon Resource Name (ARN) of the original model being copied. * **targetModelKmsKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key used to encrypt the copied model. * **targetModelTags** *(list) --* Tags associated with the copied model. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* Key for the tag. * **value** *(string) --* Value for the tag. * **failureMessage** *(string) --* If a model fails to be copied, a message describing why the job failed is included here. * **sourceModelName** *(string) --* The name of the original model being copied. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListPromptRouters ListPromptRouters ***************** class Bedrock.Paginator.ListPromptRouters paginator = client.get_paginator('list_prompt_routers') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_prompt_routers()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( type='custom'|'default', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **type** (*string*) -- The type of the prompt routers, such as whether it's default or custom. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'promptRouterSummaries': [ { 'promptRouterName': 'string', 'routingCriteria': { 'responseQualityDifference': 123.0 }, 'description': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'promptRouterArn': 'string', 'models': [ { 'modelArn': 'string' }, ], 'fallbackModel': { 'modelArn': 'string' }, 'status': 'AVAILABLE', 'type': 'custom'|'default' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **promptRouterSummaries** *(list) --* A list of prompt router summaries. * *(dict) --* Details about a prompt router. * **promptRouterName** *(string) --* The router's name. * **routingCriteria** *(dict) --* The router's routing criteria. * **responseQualityDifference** *(float) --* The criteria's response quality difference. * **description** *(string) --* The router's description. * **createdAt** *(datetime) --* When the router was created. * **updatedAt** *(datetime) --* When the router was updated. * **promptRouterArn** *(string) --* The router's ARN. * **models** *(list) --* The router's models. * *(dict) --* The target model for a prompt router. * **modelArn** *(string) --* The target model's ARN. * **fallbackModel** *(dict) --* The router's fallback model. * **modelArn** *(string) --* The target model's ARN. * **status** *(string) --* The router's status. * **type** *(string) --* The summary's type. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListModelInvocationJobs ListModelInvocationJobs *********************** class Bedrock.Paginator.ListModelInvocationJobs paginator = client.get_paginator('list_model_invocation_jobs') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_model_invocation_jobs()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( submitTimeAfter=datetime(2015, 1, 1), submitTimeBefore=datetime(2015, 1, 1), statusEquals='Submitted'|'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'PartiallyCompleted'|'Expired'|'Validating'|'Scheduled', nameContains='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **submitTimeAfter** (*datetime*) -- Specify a time to filter for batch inference jobs that were submitted after the time you specify. * **submitTimeBefore** (*datetime*) -- Specify a time to filter for batch inference jobs that were submitted before the time you specify. * **statusEquals** (*string*) -- Specify a status to filter for batch inference jobs whose statuses match the string you specify. The following statuses are possible: * Submitted – This job has been submitted to a queue for validation. * Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following: * Your IAM service role has access to the Amazon S3 buckets containing your files. * Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the "modelInput" value matches the request body for the model. * Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock. * Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn. * Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request. * InProgress – This job has begun. You can start viewing the results in the output S3 location. * Completed – This job has successfully completed. View the output files in the output S3 location. * PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location. * Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web ServicesSupport Center. * Stopped – This job was stopped by a user. * Stopping – This job is being stopped by a user. * **nameContains** (*string*) -- Specify a string to filter for batch inference jobs whose names contain the string. * **sortBy** (*string*) -- An attribute by which to sort the results. * **sortOrder** (*string*) -- Specifies whether to sort the results by ascending or descending order. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'invocationJobSummaries': [ { 'jobArn': 'string', 'jobName': 'string', 'modelId': 'string', 'clientRequestToken': 'string', 'roleArn': 'string', 'status': 'Submitted'|'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'PartiallyCompleted'|'Expired'|'Validating'|'Scheduled', 'message': 'string', 'submitTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'inputDataConfig': { 's3InputDataConfig': { 's3InputFormat': 'JSONL', 's3Uri': 'string', 's3BucketOwner': 'string' } }, 'outputDataConfig': { 's3OutputDataConfig': { 's3Uri': 'string', 's3EncryptionKeyId': 'string', 's3BucketOwner': 'string' } }, 'vpcConfig': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, 'timeoutDurationInHours': 123, 'jobExpirationTime': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **invocationJobSummaries** *(list) --* A list of items, each of which contains a summary about a batch inference job. * *(dict) --* A summary of a batch inference job. * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the batch inference job. * **jobName** *(string) --* The name of the batch inference job. * **modelId** *(string) --* The unique identifier of the foundation model used for model inference. * **clientRequestToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference. * **status** *(string) --* The status of the batch inference job. The following statuses are possible: * Submitted – This job has been submitted to a queue for validation. * Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following: * Your IAM service role has access to the Amazon S3 buckets containing your files. * Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the "modelInput" value matches the request body for the model. * Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock. * Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn. * Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request. * InProgress – This job has begun. You can start viewing the results in the output S3 location. * Completed – This job has successfully completed. View the output files in the output S3 location. * PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location. * Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web ServicesSupport Center. * Stopped – This job was stopped by a user. * Stopping – This job is being stopped by a user. * **message** *(string) --* If the batch inference job failed, this field contains a message describing why the job failed. * **submitTime** *(datetime) --* The time at which the batch inference job was submitted. * **lastModifiedTime** *(datetime) --* The time at which the batch inference job was last modified. * **endTime** *(datetime) --* The time at which the batch inference job ended. * **inputDataConfig** *(dict) --* Details about the location of the input to the batch inference job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3InputDataConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3InputDataConfig** *(dict) --* Contains the configuration of the S3 location of the input data. * **s3InputFormat** *(string) --* The format of the input data. * **s3Uri** *(string) --* The S3 location of the input data. * **s3BucketOwner** *(string) --* The ID of the Amazon Web Services account that owns the S3 bucket containing the input data. * **outputDataConfig** *(dict) --* Details about the location of the output of the batch inference job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3OutputDataConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3OutputDataConfig** *(dict) --* Contains the configuration of the S3 location of the output data. * **s3Uri** *(string) --* The S3 location of the output data. * **s3EncryptionKeyId** *(string) --* The unique identifier of the key that encrypts the S3 location of the output data. * **s3BucketOwner** *(string) --* The ID of the Amazon Web Services account that owns the S3 bucket containing the output data. * **vpcConfig** *(dict) --* The configuration of the Virtual Private Cloud (VPC) for the data in the batch inference job. For more information, see Protect batch inference jobs using a VPC. * **subnetIds** *(list) --* An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* An array of IDs for each security group in the VPC to use. * *(string) --* * **timeoutDurationInHours** *(integer) --* The number of hours after which the batch inference job was set to time out. * **jobExpirationTime** *(datetime) --* The time at which the batch inference job times or timed out. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListAutomatedReasoningPolicyBuildWorkflows ListAutomatedReasoningPolicyBuildWorkflows ****************************************** class Bedrock.Paginator.ListAutomatedReasoningPolicyBuildWorkflows paginator = client.get_paginator('list_automated_reasoning_policy_build_workflows') paginate(**kwargs) Creates an iterator that will paginate through responses from " Bedrock.Client.list_automated_reasoning_policy_build_workflows( )". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( policyArn='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflows you want to list. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'automatedReasoningPolicyBuildWorkflowSummaries': [ { 'policyArn': 'string', 'buildWorkflowId': 'string', 'status': 'SCHEDULED'|'CANCEL_REQUESTED'|'PREPROCESSING'|'BUILDING'|'TESTING'|'COMPLETED'|'FAILED'|'CANCELLED', 'buildWorkflowType': 'INGEST_CONTENT'|'REFINE_POLICY'|'IMPORT_POLICY', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **automatedReasoningPolicyBuildWorkflowSummaries** *(list) --* A list of build workflow summaries, each containing key information about a build workflow including its status and timestamps. * *(dict) --* Provides a summary of a policy build workflow, including its current status, timing information, and key identifiers. * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy associated with this build workflow. * **buildWorkflowId** *(string) --* The unique identifier of the build workflow. * **status** *(string) --* The current status of the build workflow (e.g., RUNNING, COMPLETED, FAILED, CANCELLED). * **buildWorkflowType** *(string) --* The type of build workflow (e.g., DOCUMENT_INGESTION, POLICY_REPAIR). * **createdAt** *(datetime) --* The timestamp when the build workflow was created. * **updatedAt** *(datetime) --* The timestamp when the build workflow was last updated. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListAutomatedReasoningPolicyTestResults ListAutomatedReasoningPolicyTestResults *************************************** class Bedrock.Paginator.ListAutomatedReasoningPolicyTestResults paginator = client.get_paginator('list_automated_reasoning_policy_test_results') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_automated_reasoning_policy_test_results()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( policyArn='string', buildWorkflowId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy whose test results you want to list. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The unique identifier of the build workflow whose test results you want to list. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'testResults': [ { 'testCase': { 'testCaseId': 'string', 'guardContent': 'string', 'queryContent': 'string', 'expectedAggregatedFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'confidenceThreshold': 123.0 }, 'policyArn': 'string', 'testRunStatus': 'NOT_STARTED'|'SCHEDULED'|'IN_PROGRESS'|'COMPLETED'|'FAILED', 'testFindings': [ { 'valid': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'claimsTrueScenario': { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, 'supportingRules': [ { 'id': 'string', 'policyVersionArn': 'string' }, ], 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'invalid': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'contradictingRules': [ { 'id': 'string', 'policyVersionArn': 'string' }, ], 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'satisfiable': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'claimsTrueScenario': { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, 'claimsFalseScenario': { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'impossible': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'contradictingRules': [ { 'id': 'string', 'policyVersionArn': 'string' }, ], 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'translationAmbiguous': { 'options': [ { 'translations': [ { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, ] }, ], 'differenceScenarios': [ { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, ] }, 'tooComplex': {}, 'noTranslations': {} }, ], 'testRunResult': 'PASSED'|'FAILED', 'aggregatedTestFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **testResults** *(list) --* A list of test results, each containing information about how the policy performed on specific test scenarios. * *(dict) --* Contains the results of testing an Automated Reasoning policy against various scenarios and validation checks. * **testCase** *(dict) --* Represents a test for validating an Automated Reasoning policy. tests contain sample inputs and expected outcomes to verify policy behavior. * **testCaseId** *(string) --* The unique identifier of the test. * **guardContent** *(string) --* The output content to be validated by the policy, typically representing a foundation model response. * **queryContent** *(string) --* The input query or prompt that generated the content. This provides context for the validation. * **expectedAggregatedFindingsResult** *(string) --* The expected result of the Automated Reasoning check for this test. * **createdAt** *(datetime) --* The timestamp when the test was created. * **updatedAt** *(datetime) --* The timestamp when the test was last updated. * **confidenceThreshold** *(float) --* The minimum confidence level for logic validation. Content meeting this threshold is considered high- confidence and can be validated. * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy that was tested. * **testRunStatus** *(string) --* The overall status of the test run (e.g., COMPLETED, FAILED, IN_PROGRESS). * **testFindings** *(list) --* Detailed findings from the test run, including any issues, violations, or unexpected behaviors discovered. * *(dict) --* Represents the result of an Automated Reasoning validation check, indicating whether the content is logically valid, invalid, or falls into other categories based on the policy rules. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "valid", "invalid", "satisfiable", "impossible", "translationAmbiguous", "tooComplex", "noTranslations". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **valid** *(dict) --* Indicates that the claims are true. The claims are implied by the premises and the Automated Reasoning policy. Given the Automated Reasoning policy and premises, it is not possible for these claims to be false. * **translation** *(dict) --* The logical translation of the input that this finding validates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **claimsTrueScenario** *(dict) --* An example scenario demonstrating how the claims are logically true. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **supportingRules** *(list) --* The automated reasoning policy rules that support why this result is considered valid. * *(dict) --* References a specific automated reasoning policy rule that was applied during evaluation. * **id** *(string) --* The unique identifier of the automated reasoning rule. * **policyVersionArn** *(string) --* The ARN of the automated reasoning policy version that contains this rule. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **invalid** *(dict) --* Indicates that the claims are false. The claims are not implied by the premises and Automated Reasoning policy. Furthermore, there exist different claims that are consistent with the premises and Automated Reasoning policy. * **translation** *(dict) --* The logical translation of the input that this finding invalidates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **contradictingRules** *(list) --* The automated reasoning policy rules that contradict the claims in the input. * *(dict) --* References a specific automated reasoning policy rule that was applied during evaluation. * **id** *(string) --* The unique identifier of the automated reasoning rule. * **policyVersionArn** *(string) --* The ARN of the automated reasoning policy version that contains this rule. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **satisfiable** *(dict) --* Indicates that the claims can be true or false. It depends on what assumptions are made for the claim to be implied from the premises and Automated Reasoning policy rules. In this situation, different assumptions can make input claims false and alternative claims true. * **translation** *(dict) --* The logical translation of the input that this finding evaluates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **claimsTrueScenario** *(dict) --* An example scenario demonstrating how the claims could be logically true. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claimsFalseScenario** *(dict) --* An example scenario demonstrating how the claims could be logically false. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **impossible** *(dict) --* Indicates that Automated Reasoning cannot make a statement about the claims. This can happen if the premises are logically incorrect, or if there is a conflict within the Automated Reasoning policy itself. * **translation** *(dict) --* The logical translation of the input that this finding evaluates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **contradictingRules** *(list) --* The automated reasoning policy rules that contradict the claims and/or premises in the input. * *(dict) --* References a specific automated reasoning policy rule that was applied during evaluation. * **id** *(string) --* The unique identifier of the automated reasoning rule. * **policyVersionArn** *(string) --* The ARN of the automated reasoning policy version that contains this rule. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **translationAmbiguous** *(dict) --* Indicates that an ambiguity was detected in the translation, making it unsound to continue with validity checking. Additional context or follow- up questions might be needed to get translation to succeed. * **options** *(list) --* Different logical interpretations that were detected during translation of the input. * *(dict) --* Represents one possible logical interpretation of ambiguous input content. * **translations** *(list) --* Different logical interpretations that were detected during translation of the input. * *(dict) --* Contains the logical translation of natural language input into formal logical statements, including premises, claims, and confidence scores. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **differenceScenarios** *(list) --* Scenarios showing how the different translation options differ in meaning. * *(dict) --* Represents a logical scenario where claims can be evaluated as true or false, containing specific logical assignments. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **tooComplex** *(dict) --* Indicates that the input contains too much information for Automated Reasoning to process within its latency limits. * **noTranslations** *(dict) --* Identifies that some or all of the input prompt wasn't translated into logic. This can happen if the input isn't relevant to the Automated Reasoning policy, or if the policy doesn't have variables to model relevant input. * **testRunResult** *(string) --* The overall result of the test run, indicating whether the policy passed or failed validation. * **aggregatedTestFindingsResult** *(string) --* A summary of all test findings, aggregated to provide an overall assessment of policy quality and correctness. * **updatedAt** *(datetime) --* The timestamp when the test results were last updated. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListGuardrails ListGuardrails ************** class Bedrock.Paginator.ListGuardrails paginator = client.get_paginator('list_guardrails') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_guardrails()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( guardrailIdentifier='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **guardrailIdentifier** (*string*) -- The unique identifier of the guardrail. This can be an ID or the ARN. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'guardrails': [ { 'id': 'string', 'arn': 'string', 'status': 'CREATING'|'UPDATING'|'VERSIONING'|'READY'|'FAILED'|'DELETING', 'name': 'string', 'description': 'string', 'version': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'crossRegionDetails': { 'guardrailProfileId': 'string', 'guardrailProfileArn': 'string' } }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **guardrails** *(list) --* A list of objects, each of which contains details about a guardrail. * *(dict) --* Contains details about a guardrail. This data type is used in the following API operations: * ListGuardrails response body * **id** *(string) --* The unique identifier of the guardrail. * **arn** *(string) --* The ARN of the guardrail. * **status** *(string) --* The status of the guardrail. * **name** *(string) --* The name of the guardrail. * **description** *(string) --* A description of the guardrail. * **version** *(string) --* The version of the guardrail. * **createdAt** *(datetime) --* The date and time at which the guardrail was created. * **updatedAt** *(datetime) --* The date and time at which the guardrail was last updated. * **crossRegionDetails** *(dict) --* Details about the system-defined guardrail profile that you're using with your guardrail, including the guardrail profile ID and Amazon Resource Name (ARN). * **guardrailProfileId** *(string) --* The ID of the guardrail profile that your guardrail is using. Profile availability depends on your current Amazon Web Services Region. For more information, see the Amazon Bedrock User Guide. * **guardrailProfileArn** *(string) --* The Amazon Resource Name (ARN) of the guardrail profile that you're using with your guardrail. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListCustomModelDeployments ListCustomModelDeployments ************************** class Bedrock.Paginator.ListCustomModelDeployments paginator = client.get_paginator('list_custom_model_deployments') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_custom_model_deployments()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( createdBefore=datetime(2015, 1, 1), createdAfter=datetime(2015, 1, 1), nameContains='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', statusEquals='Creating'|'Active'|'Failed', modelArnEquals='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **createdBefore** (*datetime*) -- Filters deployments created before the specified date and time. * **createdAfter** (*datetime*) -- Filters deployments created after the specified date and time. * **nameContains** (*string*) -- Filters deployments whose names contain the specified string. * **sortBy** (*string*) -- The field to sort the results by. The only supported value is "CreationTime". * **sortOrder** (*string*) -- The sort order for the results. Valid values are "Ascending" and "Descending". Default is "Descending". * **statusEquals** (*string*) -- Filters deployments by status. Valid values are "CREATING", "ACTIVE", and "FAILED". * **modelArnEquals** (*string*) -- Filters deployments by the Amazon Resource Name (ARN) of the associated custom model. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'modelDeploymentSummaries': [ { 'customModelDeploymentArn': 'string', 'customModelDeploymentName': 'string', 'modelArn': 'string', 'createdAt': datetime(2015, 1, 1), 'status': 'Creating'|'Active'|'Failed', 'lastUpdatedAt': datetime(2015, 1, 1), 'failureMessage': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **modelDeploymentSummaries** *(list) --* A list of custom model deployment summaries. * *(dict) --* Contains summary information about a custom model deployment, including its ARN, name, status, and associated custom model. * **customModelDeploymentArn** *(string) --* The Amazon Resource Name (ARN) of the custom model deployment. * **customModelDeploymentName** *(string) --* The name of the custom model deployment. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the custom model associated with this deployment. * **createdAt** *(datetime) --* The date and time when the custom model deployment was created. * **status** *(string) --* The status of the custom model deployment. Possible values are "CREATING", "ACTIVE", and "FAILED". * **lastUpdatedAt** *(datetime) --* The date and time when the custom model deployment was last modified. * **failureMessage** *(string) --* If the deployment status is "FAILED", this field contains a message describing the failure reason. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListInferenceProfiles ListInferenceProfiles ********************* class Bedrock.Paginator.ListInferenceProfiles paginator = client.get_paginator('list_inference_profiles') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_inference_profiles()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( typeEquals='SYSTEM_DEFINED'|'APPLICATION', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **typeEquals** (*string*) -- Filters for inference profiles that match the type you specify. * "SYSTEM_DEFINED" – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles. * "APPLICATION" – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'inferenceProfileSummaries': [ { 'inferenceProfileName': 'string', 'description': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'inferenceProfileArn': 'string', 'models': [ { 'modelArn': 'string' }, ], 'inferenceProfileId': 'string', 'status': 'ACTIVE', 'type': 'SYSTEM_DEFINED'|'APPLICATION' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **inferenceProfileSummaries** *(list) --* A list of information about each inference profile that you can use. * *(dict) --* Contains information about an inference profile. * **inferenceProfileName** *(string) --* The name of the inference profile. * **description** *(string) --* The description of the inference profile. * **createdAt** *(datetime) --* The time at which the inference profile was created. * **updatedAt** *(datetime) --* The time at which the inference profile was last updated. * **inferenceProfileArn** *(string) --* The Amazon Resource Name (ARN) of the inference profile. * **models** *(list) --* A list of information about each model in the inference profile. * *(dict) --* Contains information about a model. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the model. * **inferenceProfileId** *(string) --* The unique identifier of the inference profile. * **status** *(string) --* The status of the inference profile. "ACTIVE" means that the inference profile is ready to be used. * **type** *(string) --* The type of the inference profile. The following types are possible: * "SYSTEM_DEFINED" – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles. * "APPLICATION" – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListModelCustomizationJobs ListModelCustomizationJobs ************************** class Bedrock.Paginator.ListModelCustomizationJobs paginator = client.get_paginator('list_model_customization_jobs') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_model_customization_jobs()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped', nameContains='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **creationTimeAfter** (*datetime*) -- Return customization jobs created after the specified time. * **creationTimeBefore** (*datetime*) -- Return customization jobs created before the specified time. * **statusEquals** (*string*) -- Return customization jobs with the specified status. * **nameContains** (*string*) -- Return customization jobs only if the job name contains these characters. * **sortBy** (*string*) -- The field to sort by in the returned list of jobs. * **sortOrder** (*string*) -- The sort order of the results. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'modelCustomizationJobSummaries': [ { 'jobArn': 'string', 'baseModelArn': 'string', 'jobName': 'string', 'status': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped', 'statusDetails': { 'validationDetails': { 'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) }, 'dataProcessingDetails': { 'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) }, 'trainingDetails': { 'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) } }, 'lastModifiedTime': datetime(2015, 1, 1), 'creationTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'customModelArn': 'string', 'customModelName': 'string', 'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION'|'IMPORTED' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **modelCustomizationJobSummaries** *(list) --* Job summaries. * *(dict) --* Information about one customization job * **jobArn** *(string) --* Amazon Resource Name (ARN) of the customization job. * **baseModelArn** *(string) --* Amazon Resource Name (ARN) of the base model. * **jobName** *(string) --* Name of the customization job. * **status** *(string) --* Status of the customization job. * **statusDetails** *(dict) --* Details about the status of the data processing sub- task of the job. * **validationDetails** *(dict) --* The status details for the validation sub-task of the job. * **status** *(string) --* The status of the validation sub-task of the job. * **creationTime** *(datetime) --* The start time of the validation sub-task of the job. * **lastModifiedTime** *(datetime) --* The latest update to the validation sub-task of the job. * **dataProcessingDetails** *(dict) --* The status details for the data processing sub-task of the job. * **status** *(string) --* The status of the data processing sub-task of the job. * **creationTime** *(datetime) --* The start time of the data processing sub-task of the job. * **lastModifiedTime** *(datetime) --* The latest update to the data processing sub-task of the job. * **trainingDetails** *(dict) --* The status details for the training sub-task of the job. * **status** *(string) --* The status of the training sub-task of the job. * **creationTime** *(datetime) --* The start time of the training sub-task of the job. * **lastModifiedTime** *(datetime) --* The latest update to the training sub-task of the job. * **lastModifiedTime** *(datetime) --* Time that the customization job was last modified. * **creationTime** *(datetime) --* Creation time of the custom model. * **endTime** *(datetime) --* Time that the customization job ended. * **customModelArn** *(string) --* Amazon Resource Name (ARN) of the custom model. * **customModelName** *(string) --* Name of the custom model. * **customizationType** *(string) --* Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models. * **NextToken** *(string) --* A token to resume pagination. Bedrock / Paginator / ListEvaluationJobs ListEvaluationJobs ****************** class Bedrock.Paginator.ListEvaluationJobs paginator = client.get_paginator('list_evaluation_jobs') paginate(**kwargs) Creates an iterator that will paginate through responses from "Bedrock.Client.list_evaluation_jobs()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'Deleting', applicationTypeEquals='ModelEvaluation'|'RagEvaluation', nameContains='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **creationTimeAfter** (*datetime*) -- A filter to only list evaluation jobs created after a specified time. * **creationTimeBefore** (*datetime*) -- A filter to only list evaluation jobs created before a specified time. * **statusEquals** (*string*) -- A filter to only list evaluation jobs that are of a certain status. * **applicationTypeEquals** (*string*) -- A filter to only list evaluation jobs that are either model evaluations or knowledge base evaluations. * **nameContains** (*string*) -- A filter to only list evaluation jobs that contain a specified string in the job name. * **sortBy** (*string*) -- Specifies a creation time to sort the list of evaluation jobs by when they were created. * **sortOrder** (*string*) -- Specifies whether to sort the list of evaluation jobs by either ascending or descending order. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'jobSummaries': [ { 'jobArn': 'string', 'jobName': 'string', 'status': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'Deleting', 'creationTime': datetime(2015, 1, 1), 'jobType': 'Human'|'Automated', 'evaluationTaskTypes': [ 'Summarization'|'Classification'|'QuestionAndAnswer'|'Generation'|'Custom', ], 'modelIdentifiers': [ 'string', ], 'ragIdentifiers': [ 'string', ], 'evaluatorModelIdentifiers': [ 'string', ], 'customMetricsEvaluatorModelIdentifiers': [ 'string', ], 'inferenceConfigSummary': { 'modelConfigSummary': { 'bedrockModelIdentifiers': [ 'string', ], 'precomputedInferenceSourceIdentifiers': [ 'string', ] }, 'ragConfigSummary': { 'bedrockKnowledgeBaseIdentifiers': [ 'string', ], 'precomputedRagSourceIdentifiers': [ 'string', ] } }, 'applicationType': 'ModelEvaluation'|'RagEvaluation' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **jobSummaries** *(list) --* A list of summaries of the evaluation jobs. * *(dict) --* Summary information of an evaluation job. * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the evaluation job. * **jobName** *(string) --* The name for the evaluation job. * **status** *(string) --* The current status of the evaluation job. * **creationTime** *(datetime) --* The time the evaluation job was created. * **jobType** *(string) --* Specifies whether the evaluation job is automated or human-based. * **evaluationTaskTypes** *(list) --* The type of task for model evaluation. * *(string) --* * **modelIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the model(s) used for the evaluation job. * *(string) --* * **ragIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the knowledge base resources used for a knowledge base evaluation job. * *(string) --* * **evaluatorModelIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the models used to compute the metrics for a knowledge base evaluation job. * *(string) --* * **customMetricsEvaluatorModelIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the models used to compute custom metrics in an Amazon Bedrock evaluation job. * *(string) --* * **inferenceConfigSummary** *(dict) --* Identifies the models, Knowledge Bases, or other RAG sources evaluated in a model or Knowledge Base evaluation job. * **modelConfigSummary** *(dict) --* A summary of the models used in an Amazon Bedrock model evaluation job. These resources can be models in Amazon Bedrock or models outside of Amazon Bedrock that you use to generate your own inference response data. * **bedrockModelIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the models used for the evaluation job. * *(string) --* * **precomputedInferenceSourceIdentifiers** *(list) --* A label that identifies the models used for a model evaluation job where you provide your own inference response data. * *(string) --* * **ragConfigSummary** *(dict) --* A summary of the RAG resources used in an Amazon Bedrock Knowledge Base evaluation job. These resources can be Knowledge Bases in Amazon Bedrock or RAG sources outside of Amazon Bedrock that you use to generate your own inference response data. * **bedrockKnowledgeBaseIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the Knowledge Base resources used for a Knowledge Base evaluation job where Amazon Bedrock invokes the Knowledge Base for you. * *(string) --* * **precomputedRagSourceIdentifiers** *(list) --* A label that identifies the RAG sources used for a Knowledge Base evaluation job where you provide your own inference response data. * *(string) --* * **applicationType** *(string) --* Specifies whether the evaluation job is for evaluating a model or evaluating a knowledge base (retrieval and response generation). * **NextToken** *(string) --* A token to resume pagination. Bedrock / Client / update_automated_reasoning_policy_test_case update_automated_reasoning_policy_test_case ******************************************* Bedrock.Client.update_automated_reasoning_policy_test_case(**kwargs) Updates an existing Automated Reasoning policy test. You can modify the content, query, expected result, and confidence threshold. See also: AWS API Documentation **Request Syntax** response = client.update_automated_reasoning_policy_test_case( policyArn='string', testCaseId='string', guardContent='string', queryContent='string', lastUpdatedAt=datetime(2015, 1, 1), expectedAggregatedFindingsResult='VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', confidenceThreshold=123.0, kmsKeyArn='string', clientRequestToken='string' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy that contains the test. * **testCaseId** (*string*) -- **[REQUIRED]** The unique identifier of the test to update. * **guardContent** (*string*) -- **[REQUIRED]** The updated content to be validated by the Automated Reasoning policy. * **queryContent** (*string*) -- The updated input query or prompt that generated the content. * **lastUpdatedAt** (*datetime*) -- **[REQUIRED]** The timestamp when the test was last updated. This is used as a concurrency token to prevent conflicting modifications. * **expectedAggregatedFindingsResult** (*string*) -- **[REQUIRED]** The updated expected result of the Automated Reasoning check. * **confidenceThreshold** (*float*) -- The updated minimum confidence level for logic validation. If null is provided, the threshold will be removed. * **kmsKeyArn** (*string*) -- The KMS key ARN for encrypting the test at rest. If not provided, the key will not be updated. Use "DISCARD" to remove the key. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. This field is autopopulated if not provided. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'testCaseId': 'string' } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the policy that contains the updated test. * **testCaseId** *(string) --* The unique identifier of the updated test. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ResourceInUseException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / put_use_case_for_model_access put_use_case_for_model_access ***************************** Bedrock.Client.put_use_case_for_model_access(**kwargs) Put usecase for model access. See also: AWS API Documentation **Request Syntax** response = client.put_use_case_for_model_access( formData=b'bytes' ) Parameters: **formData** (*bytes*) -- **[REQUIRED]** Put customer profile Request. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_inference_profiles list_inference_profiles *********************** Bedrock.Client.list_inference_profiles(**kwargs) Returns a list of inference profiles that you can use. For more information, see Increase throughput and resilience with cross- region inference in Amazon Bedrock. in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.list_inference_profiles( maxResults=123, nextToken='string', typeEquals='SYSTEM_DEFINED'|'APPLICATION' ) Parameters: * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. * **typeEquals** (*string*) -- Filters for inference profiles that match the type you specify. * "SYSTEM_DEFINED" – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles. * "APPLICATION" – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions. Return type: dict Returns: **Response Syntax** { 'inferenceProfileSummaries': [ { 'inferenceProfileName': 'string', 'description': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'inferenceProfileArn': 'string', 'models': [ { 'modelArn': 'string' }, ], 'inferenceProfileId': 'string', 'status': 'ACTIVE', 'type': 'SYSTEM_DEFINED'|'APPLICATION' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **inferenceProfileSummaries** *(list) --* A list of information about each inference profile that you can use. * *(dict) --* Contains information about an inference profile. * **inferenceProfileName** *(string) --* The name of the inference profile. * **description** *(string) --* The description of the inference profile. * **createdAt** *(datetime) --* The time at which the inference profile was created. * **updatedAt** *(datetime) --* The time at which the inference profile was last updated. * **inferenceProfileArn** *(string) --* The Amazon Resource Name (ARN) of the inference profile. * **models** *(list) --* A list of information about each model in the inference profile. * *(dict) --* Contains information about a model. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the model. * **inferenceProfileId** *(string) --* The unique identifier of the inference profile. * **status** *(string) --* The status of the inference profile. "ACTIVE" means that the inference profile is ready to be used. * **type** *(string) --* The type of the inference profile. The following types are possible: * "SYSTEM_DEFINED" – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles. * "APPLICATION" – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / deregister_marketplace_model_endpoint deregister_marketplace_model_endpoint ************************************* Bedrock.Client.deregister_marketplace_model_endpoint(**kwargs) Deregisters an endpoint for a model from Amazon Bedrock Marketplace. This operation removes the endpoint's association with Amazon Bedrock but does not delete the underlying Amazon SageMaker endpoint. See also: AWS API Documentation **Request Syntax** response = client.deregister_marketplace_model_endpoint( endpointArn='string' ) Parameters: **endpointArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the endpoint you want to deregister. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.ServiceUnavailableException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_marketplace_model_endpoint create_marketplace_model_endpoint ********************************* Bedrock.Client.create_marketplace_model_endpoint(**kwargs) Creates an endpoint for a model from Amazon Bedrock Marketplace. The endpoint is hosted by Amazon SageMaker. See also: AWS API Documentation **Request Syntax** response = client.create_marketplace_model_endpoint( modelSourceIdentifier='string', endpointConfig={ 'sageMaker': { 'initialInstanceCount': 123, 'instanceType': 'string', 'executionRole': 'string', 'kmsEncryptionKey': 'string', 'vpc': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] } } }, acceptEula=True|False, endpointName='string', clientRequestToken='string', tags=[ { 'key': 'string', 'value': 'string' }, ] ) Parameters: * **modelSourceIdentifier** (*string*) -- **[REQUIRED]** The ARN of the model from Amazon Bedrock Marketplace that you want to deploy to the endpoint. * **endpointConfig** (*dict*) -- **[REQUIRED]** The configuration for the endpoint, including the number and type of instances to use. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "sageMaker". * **sageMaker** *(dict) --* The configuration specific to Amazon SageMaker for the endpoint. * **initialInstanceCount** *(integer) --* **[REQUIRED]** The number of Amazon EC2 compute instances to deploy for initial endpoint creation. * **instanceType** *(string) --* **[REQUIRED]** The Amazon EC2 compute instance type to deploy for hosting the model. * **executionRole** *(string) --* **[REQUIRED]** The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on Amazon EC2 compute instances or for batch transform jobs. * **kmsEncryptionKey** *(string) --* The Amazon Web Services KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the Amazon EC2 compute instance that hosts the endpoint. * **vpc** *(dict) --* The VPC configuration for the endpoint. * **subnetIds** *(list) --* **[REQUIRED]** An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* **[REQUIRED]** An array of IDs for each security group in the VPC to use. * *(string) --* * **acceptEula** (*boolean*) -- Indicates whether you accept the end-user license agreement (EULA) for the model. Set to "true" to accept the EULA. * **endpointName** (*string*) -- **[REQUIRED]** The name of the endpoint. This name must be unique within your Amazon Web Services account and region. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is listed as not required because Amazon Web Services SDKs automatically generate it for you and set this parameter. If you're not using the Amazon Web Services SDK or the CLI, you must provide this token or the action will fail. This field is autopopulated if not provided. * **tags** (*list*) -- An array of key-value pairs to apply to the underlying Amazon SageMaker endpoint. You can use these tags to organize and identify your Amazon Web Services resources. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. Return type: dict Returns: **Response Syntax** { 'marketplaceModelEndpoint': { 'endpointArn': 'string', 'modelSourceIdentifier': 'string', 'status': 'REGISTERED'|'INCOMPATIBLE_ENDPOINT', 'statusMessage': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'endpointConfig': { 'sageMaker': { 'initialInstanceCount': 123, 'instanceType': 'string', 'executionRole': 'string', 'kmsEncryptionKey': 'string', 'vpc': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] } } }, 'endpointStatus': 'string', 'endpointStatusMessage': 'string' } } **Response Structure** * *(dict) --* * **marketplaceModelEndpoint** *(dict) --* Details about the created endpoint. * **endpointArn** *(string) --* The Amazon Resource Name (ARN) of the endpoint. * **modelSourceIdentifier** *(string) --* The ARN of the model from Amazon Bedrock Marketplace that is deployed on this endpoint. * **status** *(string) --* The overall status of the endpoint in Amazon Bedrock Marketplace (e.g., ACTIVE, INACTIVE). * **statusMessage** *(string) --* Additional information about the overall status, if available. * **createdAt** *(datetime) --* The timestamp when the endpoint was registered. * **updatedAt** *(datetime) --* The timestamp when the endpoint was last updated. * **endpointConfig** *(dict) --* The configuration of the endpoint, including the number and type of instances used. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "sageMaker". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **sageMaker** *(dict) --* The configuration specific to Amazon SageMaker for the endpoint. * **initialInstanceCount** *(integer) --* The number of Amazon EC2 compute instances to deploy for initial endpoint creation. * **instanceType** *(string) --* The Amazon EC2 compute instance type to deploy for hosting the model. * **executionRole** *(string) --* The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on Amazon EC2 compute instances or for batch transform jobs. * **kmsEncryptionKey** *(string) --* The Amazon Web Services KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the Amazon EC2 compute instance that hosts the endpoint. * **vpc** *(dict) --* The VPC configuration for the endpoint. * **subnetIds** *(list) --* An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* An array of IDs for each security group in the VPC to use. * *(string) --* * **endpointStatus** *(string) --* The current status of the endpoint (e.g., Creating, InService, Updating, Failed). * **endpointStatusMessage** *(string) --* Additional information about the endpoint status, if available. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / put_model_invocation_logging_configuration put_model_invocation_logging_configuration ****************************************** Bedrock.Client.put_model_invocation_logging_configuration(**kwargs) Set the configuration values for model invocation logging. See also: AWS API Documentation **Request Syntax** response = client.put_model_invocation_logging_configuration( loggingConfig={ 'cloudWatchConfig': { 'logGroupName': 'string', 'roleArn': 'string', 'largeDataDeliveryS3Config': { 'bucketName': 'string', 'keyPrefix': 'string' } }, 's3Config': { 'bucketName': 'string', 'keyPrefix': 'string' }, 'textDataDeliveryEnabled': True|False, 'imageDataDeliveryEnabled': True|False, 'embeddingDataDeliveryEnabled': True|False, 'videoDataDeliveryEnabled': True|False } ) Parameters: **loggingConfig** (*dict*) -- **[REQUIRED]** The logging configuration values to set. * **cloudWatchConfig** *(dict) --* CloudWatch logging configuration. * **logGroupName** *(string) --* **[REQUIRED]** The log group name. * **roleArn** *(string) --* **[REQUIRED]** The role Amazon Resource Name (ARN). * **largeDataDeliveryS3Config** *(dict) --* S3 configuration for delivering a large amount of data. * **bucketName** *(string) --* **[REQUIRED]** S3 bucket name. * **keyPrefix** *(string) --* S3 prefix. * **s3Config** *(dict) --* S3 configuration for storing log data. * **bucketName** *(string) --* **[REQUIRED]** S3 bucket name. * **keyPrefix** *(string) --* S3 prefix. * **textDataDeliveryEnabled** *(boolean) --* Set to include text data in the log delivery. * **imageDataDeliveryEnabled** *(boolean) --* Set to include image data in the log delivery. * **embeddingDataDeliveryEnabled** *(boolean) --* Set to include embeddings data in the log delivery. * **videoDataDeliveryEnabled** *(boolean) --* Set to include video data in the log delivery. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_paginator get_paginator ************* Bedrock.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. Bedrock / Client / get_model_copy_job get_model_copy_job ****************** Bedrock.Client.get_model_copy_job(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.get_model_copy_job( jobArn='string' ) Parameters: **jobArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the model copy job. Return type: dict Returns: **Response Syntax** { 'jobArn': 'string', 'status': 'InProgress'|'Completed'|'Failed', 'creationTime': datetime(2015, 1, 1), 'targetModelArn': 'string', 'targetModelName': 'string', 'sourceAccountId': 'string', 'sourceModelArn': 'string', 'targetModelKmsKeyArn': 'string', 'targetModelTags': [ { 'key': 'string', 'value': 'string' }, ], 'failureMessage': 'string', 'sourceModelName': 'string' } **Response Structure** * *(dict) --* * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the model copy job. * **status** *(string) --* The status of the model copy job. * **creationTime** *(datetime) --* The time at which the model copy job was created. * **targetModelArn** *(string) --* The Amazon Resource Name (ARN) of the copied model. * **targetModelName** *(string) --* The name of the copied model. * **sourceAccountId** *(string) --* The unique identifier of the account that the model being copied originated from. * **sourceModelArn** *(string) --* The Amazon Resource Name (ARN) of the original model being copied. * **targetModelKmsKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key encrypting the copied model. * **targetModelTags** *(list) --* The tags associated with the copied model. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* Key for the tag. * **value** *(string) --* Value for the tag. * **failureMessage** *(string) --* An error message for why the model copy job failed. * **sourceModelName** *(string) --* The name of the original model being copied. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_evaluation_jobs list_evaluation_jobs ******************** Bedrock.Client.list_evaluation_jobs(**kwargs) Lists all existing evaluation jobs. See also: AWS API Documentation **Request Syntax** response = client.list_evaluation_jobs( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'Deleting', applicationTypeEquals='ModelEvaluation'|'RagEvaluation', nameContains='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending' ) Parameters: * **creationTimeAfter** (*datetime*) -- A filter to only list evaluation jobs created after a specified time. * **creationTimeBefore** (*datetime*) -- A filter to only list evaluation jobs created before a specified time. * **statusEquals** (*string*) -- A filter to only list evaluation jobs that are of a certain status. * **applicationTypeEquals** (*string*) -- A filter to only list evaluation jobs that are either model evaluations or knowledge base evaluations. * **nameContains** (*string*) -- A filter to only list evaluation jobs that contain a specified string in the job name. * **maxResults** (*integer*) -- The maximum number of results to return. * **nextToken** (*string*) -- Continuation token from the previous response, for Amazon Bedrock to list the next set of results. * **sortBy** (*string*) -- Specifies a creation time to sort the list of evaluation jobs by when they were created. * **sortOrder** (*string*) -- Specifies whether to sort the list of evaluation jobs by either ascending or descending order. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'jobSummaries': [ { 'jobArn': 'string', 'jobName': 'string', 'status': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'Deleting', 'creationTime': datetime(2015, 1, 1), 'jobType': 'Human'|'Automated', 'evaluationTaskTypes': [ 'Summarization'|'Classification'|'QuestionAndAnswer'|'Generation'|'Custom', ], 'modelIdentifiers': [ 'string', ], 'ragIdentifiers': [ 'string', ], 'evaluatorModelIdentifiers': [ 'string', ], 'customMetricsEvaluatorModelIdentifiers': [ 'string', ], 'inferenceConfigSummary': { 'modelConfigSummary': { 'bedrockModelIdentifiers': [ 'string', ], 'precomputedInferenceSourceIdentifiers': [ 'string', ] }, 'ragConfigSummary': { 'bedrockKnowledgeBaseIdentifiers': [ 'string', ], 'precomputedRagSourceIdentifiers': [ 'string', ] } }, 'applicationType': 'ModelEvaluation'|'RagEvaluation' }, ] } **Response Structure** * *(dict) --* * **nextToken** *(string) --* Continuation token from the previous response, for Amazon Bedrock to list the next set of results. * **jobSummaries** *(list) --* A list of summaries of the evaluation jobs. * *(dict) --* Summary information of an evaluation job. * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the evaluation job. * **jobName** *(string) --* The name for the evaluation job. * **status** *(string) --* The current status of the evaluation job. * **creationTime** *(datetime) --* The time the evaluation job was created. * **jobType** *(string) --* Specifies whether the evaluation job is automated or human-based. * **evaluationTaskTypes** *(list) --* The type of task for model evaluation. * *(string) --* * **modelIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the model(s) used for the evaluation job. * *(string) --* * **ragIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the knowledge base resources used for a knowledge base evaluation job. * *(string) --* * **evaluatorModelIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the models used to compute the metrics for a knowledge base evaluation job. * *(string) --* * **customMetricsEvaluatorModelIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the models used to compute custom metrics in an Amazon Bedrock evaluation job. * *(string) --* * **inferenceConfigSummary** *(dict) --* Identifies the models, Knowledge Bases, or other RAG sources evaluated in a model or Knowledge Base evaluation job. * **modelConfigSummary** *(dict) --* A summary of the models used in an Amazon Bedrock model evaluation job. These resources can be models in Amazon Bedrock or models outside of Amazon Bedrock that you use to generate your own inference response data. * **bedrockModelIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the models used for the evaluation job. * *(string) --* * **precomputedInferenceSourceIdentifiers** *(list) --* A label that identifies the models used for a model evaluation job where you provide your own inference response data. * *(string) --* * **ragConfigSummary** *(dict) --* A summary of the RAG resources used in an Amazon Bedrock Knowledge Base evaluation job. These resources can be Knowledge Bases in Amazon Bedrock or RAG sources outside of Amazon Bedrock that you use to generate your own inference response data. * **bedrockKnowledgeBaseIdentifiers** *(list) --* The Amazon Resource Names (ARNs) of the Knowledge Base resources used for a Knowledge Base evaluation job where Amazon Bedrock invokes the Knowledge Base for you. * *(string) --* * **precomputedRagSourceIdentifiers** *(list) --* A label that identifies the RAG sources used for a Knowledge Base evaluation job where you provide your own inference response data. * *(string) --* * **applicationType** *(string) --* Specifies whether the evaluation job is for evaluating a model or evaluating a knowledge base (retrieval and response generation). **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_imported_models list_imported_models ******************** Bedrock.Client.list_imported_models(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.list_imported_models( creationTimeBefore=datetime(2015, 1, 1), creationTimeAfter=datetime(2015, 1, 1), nameContains='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending' ) Parameters: * **creationTimeBefore** (*datetime*) -- Return imported models that created before the specified time. * **creationTimeAfter** (*datetime*) -- Return imported models that were created after the specified time. * **nameContains** (*string*) -- Return imported models only if the model name contains these characters. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. * **sortBy** (*string*) -- The field to sort by in the returned list of imported models. * **sortOrder** (*string*) -- Specifies whetehr to sort the results in ascending or descending order. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'modelSummaries': [ { 'modelArn': 'string', 'modelName': 'string', 'creationTime': datetime(2015, 1, 1), 'instructSupported': True|False, 'modelArchitecture': 'string' }, ] } **Response Structure** * *(dict) --* * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. * **modelSummaries** *(list) --* Model summaries. * *(dict) --* Information about the imported model. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the imported model. * **modelName** *(string) --* Name of the imported model. * **creationTime** *(datetime) --* Creation time of the imported model. * **instructSupported** *(boolean) --* Specifies if the imported model supports converse. * **modelArchitecture** *(string) --* The architecture of the imported model. **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_provisioned_model_throughputs list_provisioned_model_throughputs ********************************** Bedrock.Client.list_provisioned_model_throughputs(**kwargs) Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.list_provisioned_model_throughputs( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='Creating'|'InService'|'Updating'|'Failed', modelArnEquals='string', nameContains='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending' ) Parameters: * **creationTimeAfter** (*datetime*) -- A filter that returns Provisioned Throughputs created after the specified time. * **creationTimeBefore** (*datetime*) -- A filter that returns Provisioned Throughputs created before the specified time. * **statusEquals** (*string*) -- A filter that returns Provisioned Throughputs if their statuses matches the value that you specify. * **modelArnEquals** (*string*) -- A filter that returns Provisioned Throughputs whose model Amazon Resource Name (ARN) is equal to the value that you specify. * **nameContains** (*string*) -- A filter that returns Provisioned Throughputs if their name contains the expression that you specify. * **maxResults** (*integer*) -- THe maximum number of results to return in the response. If there are more results than the number you specified, the response returns a "nextToken" value. To see the next batch of results, send the "nextToken" value in another list request. * **nextToken** (*string*) -- If there are more results than the number you specified in the "maxResults" field, the response returns a "nextToken" value. To see the next batch of results, specify the "nextToken" value in this field. * **sortBy** (*string*) -- The field by which to sort the returned list of Provisioned Throughputs. * **sortOrder** (*string*) -- The sort order of the results. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'provisionedModelSummaries': [ { 'provisionedModelName': 'string', 'provisionedModelArn': 'string', 'modelArn': 'string', 'desiredModelArn': 'string', 'foundationModelArn': 'string', 'modelUnits': 123, 'desiredModelUnits': 123, 'status': 'Creating'|'InService'|'Updating'|'Failed', 'commitmentDuration': 'OneMonth'|'SixMonths', 'commitmentExpirationTime': datetime(2015, 1, 1), 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) }, ] } **Response Structure** * *(dict) --* * **nextToken** *(string) --* If there are more results than the number you specified in the "maxResults" field, this value is returned. To see the next batch of results, include this value in the "nextToken" field in another list request. * **provisionedModelSummaries** *(list) --* A list of summaries, one for each Provisioned Throughput in the response. * *(dict) --* A summary of information about a Provisioned Throughput. This data type is used in the following API operations: * ListProvisionedThroughputs response * **provisionedModelName** *(string) --* The name of the Provisioned Throughput. * **provisionedModelArn** *(string) --* The Amazon Resource Name (ARN) of the Provisioned Throughput. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the model associated with the Provisioned Throughput. * **desiredModelArn** *(string) --* The Amazon Resource Name (ARN) of the model requested to be associated to this Provisioned Throughput. This value differs from the "modelArn" if updating hasn't completed. * **foundationModelArn** *(string) --* The Amazon Resource Name (ARN) of the base model for which the Provisioned Throughput was created, or of the base model that the custom model for which the Provisioned Throughput was created was customized. * **modelUnits** *(integer) --* The number of model units allocated to the Provisioned Throughput. * **desiredModelUnits** *(integer) --* The number of model units that was requested to be allocated to the Provisioned Throughput. * **status** *(string) --* The status of the Provisioned Throughput. * **commitmentDuration** *(string) --* The duration for which the Provisioned Throughput was committed. * **commitmentExpirationTime** *(datetime) --* The timestamp for when the commitment term of the Provisioned Throughput expires. * **creationTime** *(datetime) --* The time that the Provisioned Throughput was created. * **lastModifiedTime** *(datetime) --* The time that the Provisioned Throughput was last modified. **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_prompt_routers list_prompt_routers ******************* Bedrock.Client.list_prompt_routers(**kwargs) Retrieves a list of prompt routers. See also: AWS API Documentation **Request Syntax** response = client.list_prompt_routers( maxResults=123, nextToken='string', type='custom'|'default' ) Parameters: * **maxResults** (*integer*) -- The maximum number of prompt routers to return in one page of results. * **nextToken** (*string*) -- Specify the pagination token from a previous request to retrieve the next page of results. * **type** (*string*) -- The type of the prompt routers, such as whether it's default or custom. Return type: dict Returns: **Response Syntax** { 'promptRouterSummaries': [ { 'promptRouterName': 'string', 'routingCriteria': { 'responseQualityDifference': 123.0 }, 'description': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'promptRouterArn': 'string', 'models': [ { 'modelArn': 'string' }, ], 'fallbackModel': { 'modelArn': 'string' }, 'status': 'AVAILABLE', 'type': 'custom'|'default' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **promptRouterSummaries** *(list) --* A list of prompt router summaries. * *(dict) --* Details about a prompt router. * **promptRouterName** *(string) --* The router's name. * **routingCriteria** *(dict) --* The router's routing criteria. * **responseQualityDifference** *(float) --* The criteria's response quality difference. * **description** *(string) --* The router's description. * **createdAt** *(datetime) --* When the router was created. * **updatedAt** *(datetime) --* When the router was updated. * **promptRouterArn** *(string) --* The router's ARN. * **models** *(list) --* The router's models. * *(dict) --* The target model for a prompt router. * **modelArn** *(string) --* The target model's ARN. * **fallbackModel** *(dict) --* The router's fallback model. * **modelArn** *(string) --* The target model's ARN. * **status** *(string) --* The router's status. * **type** *(string) --* The summary's type. * **nextToken** *(string) --* Specify the pagination token from a previous request to retrieve the next page of results. **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_provisioned_model_throughput create_provisioned_model_throughput *********************************** Bedrock.Client.create_provisioned_model_throughput(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.create_provisioned_model_throughput( clientRequestToken='string', modelUnits=123, provisionedModelName='string', modelId='string', commitmentDuration='OneMonth'|'SixMonths', tags=[ { 'key': 'string', 'value': 'string' }, ] ) Parameters: * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. 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. * **modelUnits** (*integer*) -- **[REQUIRED]** Number of model units to allocate. A model unit delivers a specific throughput level for the specified model. The throughput level of a model unit specifies the total number of input and output tokens that it can process and generate within a span of one minute. By default, your account has no model units for purchasing Provisioned Throughputs with commitment. You must first visit the Amazon Web Services support center to request MUs. For model unit quotas, see Provisioned Throughput quotas in the Amazon Bedrock User Guide. For more information about what an MU specifies, contact your Amazon Web Services account manager. * **provisionedModelName** (*string*) -- **[REQUIRED]** The name for this Provisioned Throughput. * **modelId** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) or name of the model to associate with this Provisioned Throughput. For a list of models for which you can purchase Provisioned Throughput, see Amazon Bedrock model IDs for purchasing Provisioned Throughput in the Amazon Bedrock User Guide. * **commitmentDuration** (*string*) -- The commitment duration requested for the Provisioned Throughput. Billing occurs hourly and is discounted for longer commitment terms. To request a no-commit Provisioned Throughput, omit this field. Custom models support all levels of commitment. To see which base models support no commitment, see Supported regions and models for Provisioned Throughput in the Amazon Bedrock User Guide * **tags** (*list*) -- Tags to associate with this Provisioned Throughput. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. Return type: dict Returns: **Response Syntax** { 'provisionedModelArn': 'string' } **Response Structure** * *(dict) --* * **provisionedModelArn** *(string) --* The Amazon Resource Name (ARN) for this Provisioned Throughput. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_model_copy_jobs list_model_copy_jobs ******************** Bedrock.Client.list_model_copy_jobs(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.list_model_copy_jobs( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='InProgress'|'Completed'|'Failed', sourceAccountEquals='string', sourceModelArnEquals='string', targetModelNameContains='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending' ) Parameters: * **creationTimeAfter** (*datetime*) -- Filters for model copy jobs created after the specified time. * **creationTimeBefore** (*datetime*) -- Filters for model copy jobs created before the specified time. * **statusEquals** (*string*) -- Filters for model copy jobs whose status matches the value that you specify. * **sourceAccountEquals** (*string*) -- Filters for model copy jobs in which the account that the source model belongs to is equal to the value that you specify. * **sourceModelArnEquals** (*string*) -- Filters for model copy jobs in which the Amazon Resource Name (ARN) of the source model to is equal to the value that you specify. * **targetModelNameContains** (*string*) -- Filters for model copy jobs in which the name of the copied model contains the string that you specify. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. * **sortBy** (*string*) -- The field to sort by in the returned list of model copy jobs. * **sortOrder** (*string*) -- Specifies whether to sort the results in ascending or descending order. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'modelCopyJobSummaries': [ { 'jobArn': 'string', 'status': 'InProgress'|'Completed'|'Failed', 'creationTime': datetime(2015, 1, 1), 'targetModelArn': 'string', 'targetModelName': 'string', 'sourceAccountId': 'string', 'sourceModelArn': 'string', 'targetModelKmsKeyArn': 'string', 'targetModelTags': [ { 'key': 'string', 'value': 'string' }, ], 'failureMessage': 'string', 'sourceModelName': 'string' }, ] } **Response Structure** * *(dict) --* * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. * **modelCopyJobSummaries** *(list) --* A list of information about each model copy job. * *(dict) --* Contains details about each model copy job. This data type is used in the following API operations: * ListModelCopyJobs response * **jobArn** *(string) --* The Amazon Resoource Name (ARN) of the model copy job. * **status** *(string) --* The status of the model copy job. * **creationTime** *(datetime) --* The time that the model copy job was created. * **targetModelArn** *(string) --* The Amazon Resource Name (ARN) of the copied model. * **targetModelName** *(string) --* The name of the copied model. * **sourceAccountId** *(string) --* The unique identifier of the account that the model being copied originated from. * **sourceModelArn** *(string) --* The Amazon Resource Name (ARN) of the original model being copied. * **targetModelKmsKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key used to encrypt the copied model. * **targetModelTags** *(list) --* Tags associated with the copied model. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* Key for the tag. * **value** *(string) --* Value for the tag. * **failureMessage** *(string) --* If a model fails to be copied, a message describing why the job failed is included here. * **sourceModelName** *(string) --* The name of the original model being copied. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_automated_reasoning_policy_annotations get_automated_reasoning_policy_annotations ****************************************** Bedrock.Client.get_automated_reasoning_policy_annotations(**kwargs) Retrieves the current annotations for an Automated Reasoning policy build workflow. Annotations contain corrections to the rules, variables and types to be applied to the policy. See also: AWS API Documentation **Request Syntax** response = client.get_automated_reasoning_policy_annotations( policyArn='string', buildWorkflowId='string' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy whose annotations you want to retrieve. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The unique identifier of the build workflow whose annotations you want to retrieve. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'name': 'string', 'buildWorkflowId': 'string', 'annotations': [ { 'addType': { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] }, 'updateType': { 'name': 'string', 'newName': 'string', 'description': 'string', 'values': [ { 'addTypeValue': { 'value': 'string', 'description': 'string' }, 'updateTypeValue': { 'value': 'string', 'newValue': 'string', 'description': 'string' }, 'deleteTypeValue': { 'value': 'string' } }, ] }, 'deleteType': { 'name': 'string' }, 'addVariable': { 'name': 'string', 'type': 'string', 'description': 'string' }, 'updateVariable': { 'name': 'string', 'newName': 'string', 'description': 'string' }, 'deleteVariable': { 'name': 'string' }, 'addRule': { 'expression': 'string' }, 'updateRule': { 'ruleId': 'string', 'expression': 'string' }, 'deleteRule': { 'ruleId': 'string' }, 'addRuleFromNaturalLanguage': { 'naturalLanguage': 'string' }, 'updateFromRulesFeedback': { 'ruleIds': [ 'string', ], 'feedback': 'string' }, 'updateFromScenarioFeedback': { 'ruleIds': [ 'string', ], 'scenarioExpression': 'string', 'feedback': 'string' }, 'ingestContent': { 'content': 'string' } }, ], 'annotationSetHash': 'string', 'updatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy. * **name** *(string) --* The name of the Automated Reasoning policy. * **buildWorkflowId** *(string) --* The unique identifier of the build workflow. * **annotations** *(list) --* The current set of annotations containing rules, variables, and types extracted from the source documents. These can be modified before finalizing the policy. * *(dict) --* Contains the various operations that can be performed on an Automated Reasoning policy, including adding, updating, and deleting rules, variables, and types. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "addType", "updateType", "deleteType", "addVariable", "updateVariable", "deleteVariable", "addRule", "updateRule", "deleteRule", "addRuleFromNaturalLanguage", "updateFromRulesFeedback", "updateFromScenarioFeedback", "ingestContent". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **addType** *(dict) --* An operation to add a new custom type to the policy, defining a set of possible values for policy variables. * **name** *(string) --* The name of the new custom type. This name will be used to reference the type in variable definitions and rules. * **description** *(string) --* A description of what the custom type represents and how it should be used in the policy. * **values** *(list) --* The list of possible values that variables of this type can take, each with its own description and identifier. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **updateType** *(dict) --* An operation to modify an existing custom type in the policy, such as changing its name, description, or allowed values. * **name** *(string) --* The current name of the custom type to update. * **newName** *(string) --* The new name for the custom type, if you want to rename it. If not provided, the name remains unchanged. * **description** *(string) --* The new description for the custom type, replacing the previous description. * **values** *(list) --* The updated list of values for the custom type, which can include additions, modifications, or removals. * *(dict) --* An annotation for managing values within custom types, including adding, updating, or removing specific type values. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "addTypeValue", "updateTypeValue", "deleteTypeValue". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **addTypeValue** *(dict) --* An operation to add a new value to an existing custom type. * **value** *(string) --* The identifier or name of the new value to add to the type. * **description** *(string) --* A description of what this new type value represents and when it should be used. * **updateTypeValue** *(dict) --* An operation to modify an existing value within a custom type. * **value** *(string) --* The current identifier or name of the type value to update. * **newValue** *(string) --* The new identifier or name for the type value, if you want to rename it. * **description** *(string) --* The new description for the type value, replacing the previous description. * **deleteTypeValue** *(dict) --* An operation to remove a value from an existing custom type. * **value** *(string) --* The identifier or name of the value to remove from the type. * **deleteType** *(dict) --* An operation to remove a custom type from the policy. The type must not be referenced by any variables or rules. * **name** *(string) --* The name of the custom type to delete from the policy. The type must not be referenced by any variables or rules. * **addVariable** *(dict) --* An operation to add a new variable to the policy, which can be used in rule expressions to represent dynamic values. * **name** *(string) --* The name of the new variable. This name will be used to reference the variable in rule expressions. * **type** *(string) --* The type of the variable, which can be a built-in type (like string or number) or a custom type defined in the policy. * **description** *(string) --* A description of what the variable represents and how it should be used in rules. * **updateVariable** *(dict) --* An operation to modify an existing variable in the policy, such as changing its name, type, or description. * **name** *(string) --* The current name of the variable to update. * **newName** *(string) --* The new name for the variable, if you want to rename it. If not provided, the name remains unchanged. * **description** *(string) --* The new description for the variable, replacing the previous description. * **deleteVariable** *(dict) --* An operation to remove a variable from the policy. The variable must not be referenced by any rules. * **name** *(string) --* The name of the variable to delete from the policy. The variable must not be referenced by any rules. * **addRule** *(dict) --* An operation to add a new logical rule to the policy using formal mathematical expressions. * **expression** *(string) --* The formal logical expression that defines the rule, using mathematical notation and referencing policy variables and types. * **updateRule** *(dict) --* An operation to modify an existing rule in the policy, such as changing its logical expression or conditions. * **ruleId** *(string) --* The unique identifier of the rule to update. * **expression** *(string) --* The new formal logical expression for the rule, replacing the previous expression. * **deleteRule** *(dict) --* An operation to remove a rule from the policy. * **ruleId** *(string) --* The unique identifier of the rule to delete from the policy. * **addRuleFromNaturalLanguage** *(dict) --* An operation to add a new rule by converting natural language descriptions into formal logical expressions. * **naturalLanguage** *(string) --* The natural language description of the rule that should be converted into a formal logical expression. * **updateFromRulesFeedback** *(dict) --* An operation to update the policy based on feedback about how specific rules performed during testing or validation. * **ruleIds** *(list) --* The list of rule identifiers that the feedback applies to. * *(string) --* * **feedback** *(string) --* The feedback information about rule performance, including suggestions for improvements or corrections. * **updateFromScenarioFeedback** *(dict) --* An operation to update the policy based on feedback about how it performed on specific test scenarios. * **ruleIds** *(list) --* The list of rule identifiers that were involved in the scenario being evaluated. * *(string) --* * **scenarioExpression** *(string) --* The logical expression that defines the test scenario that generated this feedback. * **feedback** *(string) --* The feedback information about scenario performance, including any issues or improvements identified. * **ingestContent** *(dict) --* An operation to process and incorporate new content into the policy, extracting additional rules and concepts. * **content** *(string) --* The new content to be analyzed and incorporated into the policy, such as additional documents or rule descriptions. * **annotationSetHash** *(string) --* A hash value representing the current state of the annotations. This is used for optimistic concurrency control when updating annotations. * **updatedAt** *(datetime) --* The timestamp when the annotations were last updated. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_automated_reasoning_policy_test_cases list_automated_reasoning_policy_test_cases ****************************************** Bedrock.Client.list_automated_reasoning_policy_test_cases(**kwargs) Lists tests for an Automated Reasoning policy. We recommend using pagination to ensure that the operation returns quickly and successfully. See also: AWS API Documentation **Request Syntax** response = client.list_automated_reasoning_policy_test_cases( policyArn='string', nextToken='string', maxResults=123 ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to list tests. * **nextToken** (*string*) -- The pagination token from a previous request to retrieve the next page of results. * **maxResults** (*integer*) -- The maximum number of tests to return in a single call. Return type: dict Returns: **Response Syntax** { 'testCases': [ { 'testCaseId': 'string', 'guardContent': 'string', 'queryContent': 'string', 'expectedAggregatedFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'confidenceThreshold': 123.0 }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **testCases** *(list) --* A list of tests for the specified policy. * *(dict) --* Represents a test for validating an Automated Reasoning policy. tests contain sample inputs and expected outcomes to verify policy behavior. * **testCaseId** *(string) --* The unique identifier of the test. * **guardContent** *(string) --* The output content to be validated by the policy, typically representing a foundation model response. * **queryContent** *(string) --* The input query or prompt that generated the content. This provides context for the validation. * **expectedAggregatedFindingsResult** *(string) --* The expected result of the Automated Reasoning check for this test. * **createdAt** *(datetime) --* The timestamp when the test was created. * **updatedAt** *(datetime) --* The timestamp when the test was last updated. * **confidenceThreshold** *(float) --* The minimum confidence level for logic validation. Content meeting this threshold is considered high- confidence and can be validated. * **nextToken** *(string) --* The pagination token to use in a subsequent request to retrieve the next page of results. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_prompt_router get_prompt_router ***************** Bedrock.Client.get_prompt_router(**kwargs) Retrieves details about a prompt router. See also: AWS API Documentation **Request Syntax** response = client.get_prompt_router( promptRouterArn='string' ) Parameters: **promptRouterArn** (*string*) -- **[REQUIRED]** The prompt router's ARN Return type: dict Returns: **Response Syntax** { 'promptRouterName': 'string', 'routingCriteria': { 'responseQualityDifference': 123.0 }, 'description': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'promptRouterArn': 'string', 'models': [ { 'modelArn': 'string' }, ], 'fallbackModel': { 'modelArn': 'string' }, 'status': 'AVAILABLE', 'type': 'custom'|'default' } **Response Structure** * *(dict) --* * **promptRouterName** *(string) --* The router's name. * **routingCriteria** *(dict) --* The router's routing criteria. * **responseQualityDifference** *(float) --* The criteria's response quality difference. * **description** *(string) --* The router's description. * **createdAt** *(datetime) --* When the router was created. * **updatedAt** *(datetime) --* When the router was updated. * **promptRouterArn** *(string) --* The prompt router's ARN * **models** *(list) --* The router's models. * *(dict) --* The target model for a prompt router. * **modelArn** *(string) --* The target model's ARN. * **fallbackModel** *(dict) --* The router's fallback model. * **modelArn** *(string) --* The target model's ARN. * **status** *(string) --* The router's status. * **type** *(string) --* The router's type. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / can_paginate can_paginate ************ Bedrock.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. Bedrock / Client / get_automated_reasoning_policy_test_case get_automated_reasoning_policy_test_case **************************************** Bedrock.Client.get_automated_reasoning_policy_test_case(**kwargs) Retrieves details about a specific Automated Reasoning policy test. See also: AWS API Documentation **Request Syntax** response = client.get_automated_reasoning_policy_test_case( policyArn='string', testCaseId='string' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy that contains the test. * **testCaseId** (*string*) -- **[REQUIRED]** The unique identifier of the test to retrieve. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'testCase': { 'testCaseId': 'string', 'guardContent': 'string', 'queryContent': 'string', 'expectedAggregatedFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'confidenceThreshold': 123.0 } } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the policy that contains the test. * **testCase** *(dict) --* The test details including the content, query, expected result, and metadata. * **testCaseId** *(string) --* The unique identifier of the test. * **guardContent** *(string) --* The output content to be validated by the policy, typically representing a foundation model response. * **queryContent** *(string) --* The input query or prompt that generated the content. This provides context for the validation. * **expectedAggregatedFindingsResult** *(string) --* The expected result of the Automated Reasoning check for this test. * **createdAt** *(datetime) --* The timestamp when the test was created. * **updatedAt** *(datetime) --* The timestamp when the test was last updated. * **confidenceThreshold** *(float) --* The minimum confidence level for logic validation. Content meeting this threshold is considered high-confidence and can be validated. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / stop_model_customization_job stop_model_customization_job **************************** Bedrock.Client.stop_model_customization_job(**kwargs) Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.stop_model_customization_job( jobIdentifier='string' ) Parameters: **jobIdentifier** (*string*) -- **[REQUIRED]** Job identifier of the job to stop. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_guardrail create_guardrail **************** Bedrock.Client.create_guardrail(**kwargs) 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. * **Content filters** - Adjust filter strengths to block input prompts or model responses containing harmful content. * **Denied topics** - Define a set of topics that are undesirable in the context of your application. These topics will be blocked if detected in user queries or model responses. * **Word filters** - Configure filters to block undesirable words, phrases, and profanity. Such words can include offensive terms, competitor names etc. * **Sensitive information filters** - Block or mask sensitive information such as personally identifiable information (PII) or custom regex in user inputs and model responses. 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 Amazon Bedrock Guardrails in the *Amazon Bedrock User Guide*. See also: AWS API Documentation **Request Syntax** response = client.create_guardrail( name='string', description='string', topicPolicyConfig={ 'topicsConfig': [ { 'name': 'string', 'definition': 'string', 'examples': [ 'string', ], 'type': 'DENY', 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'tierConfig': { 'tierName': 'CLASSIC'|'STANDARD' } }, contentPolicyConfig={ 'filtersConfig': [ { 'type': 'SEXUAL'|'VIOLENCE'|'HATE'|'INSULTS'|'MISCONDUCT'|'PROMPT_ATTACK', 'inputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH', 'outputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH', 'inputModalities': [ 'TEXT'|'IMAGE', ], 'outputModalities': [ 'TEXT'|'IMAGE', ], 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'tierConfig': { 'tierName': 'CLASSIC'|'STANDARD' } }, wordPolicyConfig={ 'wordsConfig': [ { 'text': 'string', 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'managedWordListsConfig': [ { 'type': 'PROFANITY', 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ] }, sensitiveInformationPolicyConfig={ 'piiEntitiesConfig': [ { 'type': 'ADDRESS'|'AGE'|'AWS_ACCESS_KEY'|'AWS_SECRET_KEY'|'CA_HEALTH_NUMBER'|'CA_SOCIAL_INSURANCE_NUMBER'|'CREDIT_DEBIT_CARD_CVV'|'CREDIT_DEBIT_CARD_EXPIRY'|'CREDIT_DEBIT_CARD_NUMBER'|'DRIVER_ID'|'EMAIL'|'INTERNATIONAL_BANK_ACCOUNT_NUMBER'|'IP_ADDRESS'|'LICENSE_PLATE'|'MAC_ADDRESS'|'NAME'|'PASSWORD'|'PHONE'|'PIN'|'SWIFT_CODE'|'UK_NATIONAL_HEALTH_SERVICE_NUMBER'|'UK_NATIONAL_INSURANCE_NUMBER'|'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER'|'URL'|'USERNAME'|'US_BANK_ACCOUNT_NUMBER'|'US_BANK_ROUTING_NUMBER'|'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER'|'US_PASSPORT_NUMBER'|'US_SOCIAL_SECURITY_NUMBER'|'VEHICLE_IDENTIFICATION_NUMBER', 'action': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'outputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'regexesConfig': [ { 'name': 'string', 'description': 'string', 'pattern': 'string', 'action': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'outputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ] }, contextualGroundingPolicyConfig={ 'filtersConfig': [ { 'type': 'GROUNDING'|'RELEVANCE', 'threshold': 123.0, 'action': 'BLOCK'|'NONE', 'enabled': True|False }, ] }, automatedReasoningPolicyConfig={ 'policies': [ 'string', ], 'confidenceThreshold': 123.0 }, crossRegionConfig={ 'guardrailProfileIdentifier': 'string' }, blockedInputMessaging='string', blockedOutputsMessaging='string', kmsKeyId='string', tags=[ { 'key': 'string', 'value': 'string' }, ], clientRequestToken='string' ) Parameters: * **name** (*string*) -- **[REQUIRED]** The name to give the guardrail. * **description** (*string*) -- A description of the guardrail. * **topicPolicyConfig** (*dict*) -- The topic policies to configure for the guardrail. * **topicsConfig** *(list) --* **[REQUIRED]** A list of policies related to topics that the guardrail should deny. * *(dict) --* Details about topics for the guardrail to identify and deny. * **name** *(string) --* **[REQUIRED]** The name of the topic to deny. * **definition** *(string) --* **[REQUIRED]** A definition of the topic to deny. * **examples** *(list) --* A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic. * *(string) --* * **type** *(string) --* **[REQUIRED]** Specifies to deny the topic. * **inputAction** *(string) --* Specifies the action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **tierConfig** *(dict) --* The tier that your guardrail uses for denied topic filters. * **tierName** *(string) --* **[REQUIRED]** The tier that your guardrail uses for denied topic filters. Valid values include: * "CLASSIC" tier – Provides established guardrails functionality supporting English, French, and Spanish languages. * "STANDARD" tier – Provides a more robust solution than the "CLASSIC" tier and has more comprehensive language support. This tier requires that your guardrail use cross-Region inference. * **contentPolicyConfig** (*dict*) -- The content filter policies to configure for the guardrail. * **filtersConfig** *(list) --* **[REQUIRED]** Contains the type of the content filter and how strongly it should apply to prompts and model responses. * *(dict) --* Contains filter strengths for harmful content. Guardrails support the following content filters to detect and filter harmful user inputs and FM-generated outputs. * **Hate** – Describes language or a statement that discriminates, criticizes, insults, denounces, or dehumanizes a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin). * **Insults** – Describes language or a statement that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying. * **Sexual** – Describes language or a statement that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex. * **Violence** – Describes language or a statement that includes glorification of or threats to inflict physical pain, hurt, or injury toward a person, group or thing. Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as *Hate* with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as *Hate* with HIGH confidence, *Insults* with LOW confidence, *Sexual* with NONE confidence, and *Violence* with MEDIUM confidence. For more information, see Guardrails content filters. * **type** *(string) --* **[REQUIRED]** The harmful category that the content filter is applied to. * **inputStrength** *(string) --* **[REQUIRED]** The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces. * **outputStrength** *(string) --* **[REQUIRED]** The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces. * **inputModalities** *(list) --* The input modalities selected for the guardrail content filter configuration. * *(string) --* * **outputModalities** *(list) --* The output modalities selected for the guardrail content filter configuration. * *(string) --* * **inputAction** *(string) --* Specifies the action to take when harmful content is detected. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **tierConfig** *(dict) --* The tier that your guardrail uses for content filters. * **tierName** *(string) --* **[REQUIRED]** The tier that your guardrail uses for content filters. Valid values include: * "CLASSIC" tier – Provides established guardrails functionality supporting English, French, and Spanish languages. * "STANDARD" tier – Provides a more robust solution than the "CLASSIC" tier and has more comprehensive language support. This tier requires that your guardrail use cross-Region inference. * **wordPolicyConfig** (*dict*) -- The word policy you configure for the guardrail. * **wordsConfig** *(list) --* A list of words to configure for the guardrail. * *(dict) --* A word to configure for the guardrail. * **text** *(string) --* **[REQUIRED]** Text of the word configured for the guardrail to block. * **inputAction** *(string) --* Specifies the action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the intput. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **managedWordListsConfig** *(list) --* A list of managed words to configure for the guardrail. * *(dict) --* The managed word list to configure for the guardrail. * **type** *(string) --* **[REQUIRED]** The managed word type to configure for the guardrail. * **inputAction** *(string) --* Specifies the action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **sensitiveInformationPolicyConfig** (*dict*) -- The sensitive information policy to configure for the guardrail. * **piiEntitiesConfig** *(list) --* A list of PII entities to configure to the guardrail. * *(dict) --* The PII entity to configure for the guardrail. * **type** *(string) --* **[REQUIRED]** Configure guardrail type when the PII entity is detected. The following PIIs are used to block or mask sensitive information: * **General** * **ADDRESS** A physical address, such as "100 Main Street, Anytown, USA" or "Suite #12, Building 123". An address can include information such as the street, building, location, city, state, country, county, zip code, precinct, and neighborhood. * **AGE** An individual's age, including the quantity and unit of time. For example, in the phrase "I am 40 years old," Guardrails recognizes "40 years" as an age. * **NAME** An individual's name. This entity type does not include titles, such as Dr., Mr., Mrs., or Miss. guardrails doesn't apply this entity type to names that are part of organizations or addresses. For example, guardrails recognizes the "John Doe Organization" as an organization, and it recognizes "Jane Doe Street" as an address. * **EMAIL** An email address, such as *marymajor@email.com*. * **PHONE** A phone number. This entity type also includes fax and pager numbers. * **USERNAME** A user name that identifies an account, such as a login name, screen name, nick name, or handle. * **PASSWORD** An alphanumeric string that is used as a password, such as "**very20special#pass**". * **DRIVER_ID** The number assigned to a driver's license, which is an official document permitting an individual to operate one or more motorized vehicles on a public road. A driver's license number consists of alphanumeric characters. * **LICENSE_PLATE** A license plate for a vehicle is issued by the state or country where the vehicle is registered. The format for passenger vehicles is typically five to eight digits, consisting of upper- case letters and numbers. The format varies depending on the location of the issuing state or country. * **VEHICLE_IDENTIFICATION_NUMBER** A Vehicle Identification Number (VIN) uniquely identifies a vehicle. VIN content and format are defined in the *ISO 3779* specification. Each country has specific codes and formats for VINs. * **Finance** * **CREDIT_DEBIT_CARD_CVV** A three-digit card verification code (CVV) that is present on VISA, MasterCard, and Discover credit and debit cards. For American Express credit or debit cards, the CVV is a four-digit numeric code. * **CREDIT_DEBIT_CARD_EXPIRY** The expiration date for a credit or debit card. This number is usually four digits long and is often formatted as *month/year* or *MM/YY*. Guardrails recognizes expiration dates such as *01/21*, *01/2021*, and *Jan 2021*. * **CREDIT_DEBIT_CARD_NUMBER** The number for a credit or debit card. These numbers can vary from 13 to 16 digits in length. However, Amazon Comprehend also recognizes credit or debit card numbers when only the last four digits are present. * **PIN** A four-digit personal identification number (PIN) with which you can access your bank account. * **INTERNATIONAL_BANK_ACCOUNT_NUMBER** An International Bank Account Number has specific formats in each country. For more information, see www.iban.com/structure. * **SWIFT_CODE** A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify a particular bank or branch. Banks use these codes for money transfers such as international wire transfers. SWIFT codes consist of eight or 11 characters. The 11-digit codes refer to specific branches, while eight-digit codes (or 11-digit codes ending in 'XXX') refer to the head or primary office. * **IT** * **IP_ADDRESS** An IPv4 address, such as *198.51.100.0*. * **MAC_ADDRESS** A *media access control* (MAC) address is a unique identifier assigned to a network interface controller (NIC). * **URL** A web address, such as *www.example.com*. * **AWS_ACCESS_KEY** A unique identifier that's associated with a secret access key; you use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically. * **AWS_SECRET_KEY** A unique identifier that's associated with an access key. You use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically. * **USA specific** * **US_BANK_ACCOUNT_NUMBER** A US bank account number, which is typically 10 to 12 digits long. * **US_BANK_ROUTING_NUMBER** A US bank account routing number. These are typically nine digits long, * **US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER** A US Individual Taxpayer Identification Number (ITIN) is a nine-digit number that starts with a "9" and contain a "7" or "8" as the fourth digit. An ITIN can be formatted with a space or a dash after the third and forth digits. * **US_PASSPORT_NUMBER** A US passport number. Passport numbers range from six to nine alphanumeric characters. * **US_SOCIAL_SECURITY_NUMBER** A US Social Security Number (SSN) is a nine-digit number that is issued to US citizens, permanent residents, and temporary working residents. * **Canada specific** * **CA_HEALTH_NUMBER** A Canadian Health Service Number is a 10-digit unique identifier, required for individuals to access healthcare benefits. * **CA_SOCIAL_INSURANCE_NUMBER** A Canadian Social Insurance Number (SIN) is a nine-digit unique identifier, required for individuals to access government programs and benefits. The SIN is formatted as three groups of three digits, such as *123-456-789*. A SIN can be validated through a simple check-digit process called the Luhn algorithm. * **UK Specific** * **UK_NATIONAL_HEALTH_SERVICE_NUMBER** A UK National Health Service Number is a 10-17 digit number, such as *485 777 3456*. The current system formats the 10-digit number with spaces after the third and sixth digits. The final digit is an error-detecting checksum. * **UK_NATIONAL_INSURANCE_NUMBER** A UK National Insurance Number (NINO) provides individuals with access to National Insurance (social security) benefits. It is also used for some purposes in the UK tax system. The number is nine digits long and starts with two letters, followed by six numbers and one letter. A NINO can be formatted with a space or a dash after the two letters and after the second, forth, and sixth digits. * **UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER** A UK Unique Taxpayer Reference (UTR) is a 10-digit number that identifies a taxpayer or a business. * **Custom** * **Regex filter** - You can use a regular expressions to define patterns for a guardrail to recognize and act upon such as serial number, booking ID etc.. * **action** *(string) --* **[REQUIRED]** Configure guardrail action when the PII entity is detected. * **inputAction** *(string) --* Specifies the action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "ANONYMIZE" – Mask the content and replace it with identifier tags. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "ANONYMIZE" – Mask the content and replace it with identifier tags. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **regexesConfig** *(list) --* A list of regular expressions to configure to the guardrail. * *(dict) --* The regular expression to configure for the guardrail. * **name** *(string) --* **[REQUIRED]** The name of the regular expression to configure for the guardrail. * **description** *(string) --* The description of the regular expression to configure for the guardrail. * **pattern** *(string) --* **[REQUIRED]** The regular expression pattern to configure for the guardrail. * **action** *(string) --* **[REQUIRED]** The guardrail action to configure when matching regular expression is detected. * **inputAction** *(string) --* Specifies the action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **contextualGroundingPolicyConfig** (*dict*) -- The contextual grounding policy configuration used to create a guardrail. * **filtersConfig** *(list) --* **[REQUIRED]** The filter configuration details for the guardrails contextual grounding policy. * *(dict) --* The filter configuration details for the guardrails contextual grounding filter. * **type** *(string) --* **[REQUIRED]** The filter details for the guardrails contextual grounding filter. * **threshold** *(float) --* **[REQUIRED]** The threshold details for the guardrails contextual grounding filter. * **action** *(string) --* Specifies the action to take when content fails the contextual grounding evaluation. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **enabled** *(boolean) --* Specifies whether to enable contextual grounding evaluation. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **automatedReasoningPolicyConfig** (*dict*) -- Optional configuration for integrating Automated Reasoning policies with the new guardrail. * **policies** *(list) --* **[REQUIRED]** The list of Automated Reasoning policy ARNs to include in the guardrail configuration. * *(string) --* * **confidenceThreshold** *(float) --* The confidence threshold for triggering guardrail actions based on Automated Reasoning policy violations. * **crossRegionConfig** (*dict*) -- The system-defined guardrail profile that you're using with your guardrail. Guardrail profiles define the destination Amazon Web Services Regions where guardrail inference requests can be automatically routed. For more information, see the Amazon Bedrock User Guide. * **guardrailProfileIdentifier** *(string) --* **[REQUIRED]** The ID or Amazon Resource Name (ARN) of the guardrail profile that your guardrail is using. Guardrail profile availability depends on your current Amazon Web Services Region. For more information, see the Amazon Bedrock User Guide. * **blockedInputMessaging** (*string*) -- **[REQUIRED]** The message to return when the guardrail blocks a prompt. * **blockedOutputsMessaging** (*string*) -- **[REQUIRED]** The message to return when the guardrail blocks a model response. * **kmsKeyId** (*string*) -- The ARN of the KMS key that you use to encrypt the guardrail. * **tags** (*list*) -- The tags that you want to attach to the guardrail. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. * **clientRequestToken** (*string*) -- 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. Return type: dict Returns: **Response Syntax** { 'guardrailId': 'string', 'guardrailArn': 'string', 'version': 'string', 'createdAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **guardrailId** *(string) --* The unique identifier of the guardrail that was created. * **guardrailArn** *(string) --* The ARN of the guardrail. * **version** *(string) --* The version of the guardrail that was created. This value will always be "DRAFT". * **createdAt** *(datetime) --* The time at which the guardrail was created. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / update_marketplace_model_endpoint update_marketplace_model_endpoint ********************************* Bedrock.Client.update_marketplace_model_endpoint(**kwargs) Updates the configuration of an existing endpoint for a model from Amazon Bedrock Marketplace. See also: AWS API Documentation **Request Syntax** response = client.update_marketplace_model_endpoint( endpointArn='string', endpointConfig={ 'sageMaker': { 'initialInstanceCount': 123, 'instanceType': 'string', 'executionRole': 'string', 'kmsEncryptionKey': 'string', 'vpc': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] } } }, clientRequestToken='string' ) Parameters: * **endpointArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the endpoint you want to update. * **endpointConfig** (*dict*) -- **[REQUIRED]** The new configuration for the endpoint, including the number and type of instances to use. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "sageMaker". * **sageMaker** *(dict) --* The configuration specific to Amazon SageMaker for the endpoint. * **initialInstanceCount** *(integer) --* **[REQUIRED]** The number of Amazon EC2 compute instances to deploy for initial endpoint creation. * **instanceType** *(string) --* **[REQUIRED]** The Amazon EC2 compute instance type to deploy for hosting the model. * **executionRole** *(string) --* **[REQUIRED]** The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on Amazon EC2 compute instances or for batch transform jobs. * **kmsEncryptionKey** *(string) --* The Amazon Web Services KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the Amazon EC2 compute instance that hosts the endpoint. * **vpc** *(dict) --* The VPC configuration for the endpoint. * **subnetIds** *(list) --* **[REQUIRED]** An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* **[REQUIRED]** An array of IDs for each security group in the VPC to use. * *(string) --* * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is listed as not required because Amazon Web Services SDKs automatically generate it for you and set this parameter. If you're not using the Amazon Web Services SDK or the CLI, you must provide this token or the action will fail. This field is autopopulated if not provided. Return type: dict Returns: **Response Syntax** { 'marketplaceModelEndpoint': { 'endpointArn': 'string', 'modelSourceIdentifier': 'string', 'status': 'REGISTERED'|'INCOMPATIBLE_ENDPOINT', 'statusMessage': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'endpointConfig': { 'sageMaker': { 'initialInstanceCount': 123, 'instanceType': 'string', 'executionRole': 'string', 'kmsEncryptionKey': 'string', 'vpc': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] } } }, 'endpointStatus': 'string', 'endpointStatusMessage': 'string' } } **Response Structure** * *(dict) --* * **marketplaceModelEndpoint** *(dict) --* Details about the updated endpoint. * **endpointArn** *(string) --* The Amazon Resource Name (ARN) of the endpoint. * **modelSourceIdentifier** *(string) --* The ARN of the model from Amazon Bedrock Marketplace that is deployed on this endpoint. * **status** *(string) --* The overall status of the endpoint in Amazon Bedrock Marketplace (e.g., ACTIVE, INACTIVE). * **statusMessage** *(string) --* Additional information about the overall status, if available. * **createdAt** *(datetime) --* The timestamp when the endpoint was registered. * **updatedAt** *(datetime) --* The timestamp when the endpoint was last updated. * **endpointConfig** *(dict) --* The configuration of the endpoint, including the number and type of instances used. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "sageMaker". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **sageMaker** *(dict) --* The configuration specific to Amazon SageMaker for the endpoint. * **initialInstanceCount** *(integer) --* The number of Amazon EC2 compute instances to deploy for initial endpoint creation. * **instanceType** *(string) --* The Amazon EC2 compute instance type to deploy for hosting the model. * **executionRole** *(string) --* The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on Amazon EC2 compute instances or for batch transform jobs. * **kmsEncryptionKey** *(string) --* The Amazon Web Services KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the Amazon EC2 compute instance that hosts the endpoint. * **vpc** *(dict) --* The VPC configuration for the endpoint. * **subnetIds** *(list) --* An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* An array of IDs for each security group in the VPC to use. * *(string) --* * **endpointStatus** *(string) --* The current status of the endpoint (e.g., Creating, InService, Updating, Failed). * **endpointStatusMessage** *(string) --* Additional information about the endpoint status, if available. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_automated_reasoning_policy_version create_automated_reasoning_policy_version ***************************************** Bedrock.Client.create_automated_reasoning_policy_version(**kwargs) Creates a new version of an existing Automated Reasoning policy. This allows you to iterate on your policy rules while maintaining previous versions for rollback or comparison purposes. See also: AWS API Documentation **Request Syntax** response = client.create_automated_reasoning_policy_version( policyArn='string', clientRequestToken='string', lastUpdatedDefinitionHash='string', tags=[ { 'key': 'string', 'value': 'string' }, ] ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to create a version. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. This field is autopopulated if not provided. * **lastUpdatedDefinitionHash** (*string*) -- **[REQUIRED]** The hash of the current policy definition used as a concurrency token to ensure the policy hasn't been modified since you last retrieved it. * **tags** (*list*) -- A list of tags to associate with the policy version. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'version': 'string', 'name': 'string', 'description': 'string', 'definitionHash': 'string', 'createdAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The versioned Amazon Resource Name (ARN) of the policy version. * **version** *(string) --* The version number of the policy version. * **name** *(string) --* The name of the policy version. * **description** *(string) --* The description of the policy version. * **definitionHash** *(string) --* The hash of the policy definition for this version. * **createdAt** *(datetime) --* The timestamp when the policy version was created. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / register_marketplace_model_endpoint register_marketplace_model_endpoint *********************************** Bedrock.Client.register_marketplace_model_endpoint(**kwargs) Registers an existing Amazon SageMaker endpoint with Amazon Bedrock Marketplace, allowing it to be used with Amazon Bedrock APIs. See also: AWS API Documentation **Request Syntax** response = client.register_marketplace_model_endpoint( endpointIdentifier='string', modelSourceIdentifier='string' ) Parameters: * **endpointIdentifier** (*string*) -- **[REQUIRED]** The ARN of the Amazon SageMaker endpoint you want to register with Amazon Bedrock Marketplace. * **modelSourceIdentifier** (*string*) -- **[REQUIRED]** The ARN of the model from Amazon Bedrock Marketplace that is deployed on the endpoint. Return type: dict Returns: **Response Syntax** { 'marketplaceModelEndpoint': { 'endpointArn': 'string', 'modelSourceIdentifier': 'string', 'status': 'REGISTERED'|'INCOMPATIBLE_ENDPOINT', 'statusMessage': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'endpointConfig': { 'sageMaker': { 'initialInstanceCount': 123, 'instanceType': 'string', 'executionRole': 'string', 'kmsEncryptionKey': 'string', 'vpc': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] } } }, 'endpointStatus': 'string', 'endpointStatusMessage': 'string' } } **Response Structure** * *(dict) --* * **marketplaceModelEndpoint** *(dict) --* Details about the registered endpoint. * **endpointArn** *(string) --* The Amazon Resource Name (ARN) of the endpoint. * **modelSourceIdentifier** *(string) --* The ARN of the model from Amazon Bedrock Marketplace that is deployed on this endpoint. * **status** *(string) --* The overall status of the endpoint in Amazon Bedrock Marketplace (e.g., ACTIVE, INACTIVE). * **statusMessage** *(string) --* Additional information about the overall status, if available. * **createdAt** *(datetime) --* The timestamp when the endpoint was registered. * **updatedAt** *(datetime) --* The timestamp when the endpoint was last updated. * **endpointConfig** *(dict) --* The configuration of the endpoint, including the number and type of instances used. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "sageMaker". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **sageMaker** *(dict) --* The configuration specific to Amazon SageMaker for the endpoint. * **initialInstanceCount** *(integer) --* The number of Amazon EC2 compute instances to deploy for initial endpoint creation. * **instanceType** *(string) --* The Amazon EC2 compute instance type to deploy for hosting the model. * **executionRole** *(string) --* The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on Amazon EC2 compute instances or for batch transform jobs. * **kmsEncryptionKey** *(string) --* The Amazon Web Services KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the Amazon EC2 compute instance that hosts the endpoint. * **vpc** *(dict) --* The VPC configuration for the endpoint. * **subnetIds** *(list) --* An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* An array of IDs for each security group in the VPC to use. * *(string) --* * **endpointStatus** *(string) --* The current status of the endpoint (e.g., Creating, InService, Updating, Failed). * **endpointStatusMessage** *(string) --* Additional information about the endpoint status, if available. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.ServiceUnavailableException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_custom_model create_custom_model ******************* Bedrock.Client.create_custom_model(**kwargs) Creates a new custom model in Amazon Bedrock. After the model is active, you can use it for inference. To use the model for inference, you must purchase Provisioned Throughput for it. You can't use On-demand inference with these custom models. For more information about Provisioned Throughput, see Provisioned Throughput. The model appears in "ListCustomModels" with a "customizationType" of "imported". To track the status of the new model, you use the "GetCustomModel" API operation. The model can be in the following states: * "Creating" - Initial state during validation and registration * "Active" - Model is ready for use in inference * "Failed" - Creation process encountered an error **Related APIs** * GetCustomModel * ListCustomModels * DeleteCustomModel See also: AWS API Documentation **Request Syntax** response = client.create_custom_model( modelName='string', modelSourceConfig={ 's3DataSource': { 's3Uri': 'string' } }, modelKmsKeyArn='string', roleArn='string', modelTags=[ { 'key': 'string', 'value': 'string' }, ], clientRequestToken='string' ) Parameters: * **modelName** (*string*) -- **[REQUIRED]** A unique name for the custom model. * **modelSourceConfig** (*dict*) -- **[REQUIRED]** The data source for the model. The Amazon S3 URI in the model source must be for the Amazon-managed Amazon S3 bucket containing your model artifacts. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "s3DataSource". * **s3DataSource** *(dict) --* The Amazon S3 data source of the model to import. * **s3Uri** *(string) --* **[REQUIRED]** The URI of the Amazon S3 data source. * **modelKmsKeyArn** (*string*) -- The Amazon Resource Name (ARN) of the customer managed KMS key to encrypt the custom model. If you don't provide a KMS key, Amazon Bedrock uses an Amazon Web Services-managed KMS key to encrypt the model. If you provide a customer managed KMS key, your Amazon Bedrock service role must have permissions to use it. For more information see Encryption of imported models. * **roleArn** (*string*) -- The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock assumes to perform tasks on your behalf. This role must have permissions to access the Amazon S3 bucket containing your model artifacts and the KMS key (if specified). For more information, see Setting up an IAM service role for importing models in the Amazon Bedrock User Guide. * **modelTags** (*list*) -- A list of key-value pairs to associate with the custom model resource. You can use these tags to organize and identify your resources. For more information, see Tagging resources in the Amazon Bedrock User Guide. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. Return type: dict Returns: **Response Syntax** { 'modelArn': 'string' } **Response Structure** * *(dict) --* * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the new custom model. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_imported_model get_imported_model ****************** Bedrock.Client.get_imported_model(**kwargs) Gets properties associated with a customized model you imported. See also: AWS API Documentation **Request Syntax** response = client.get_imported_model( modelIdentifier='string' ) Parameters: **modelIdentifier** (*string*) -- **[REQUIRED]** Name or Amazon Resource Name (ARN) of the imported model. Return type: dict Returns: **Response Syntax** { 'modelArn': 'string', 'modelName': 'string', 'jobName': 'string', 'jobArn': 'string', 'modelDataSource': { 's3DataSource': { 's3Uri': 'string' } }, 'creationTime': datetime(2015, 1, 1), 'modelArchitecture': 'string', 'modelKmsKeyArn': 'string', 'instructSupported': True|False, 'customModelUnits': { 'customModelUnitsPerModelCopy': 123, 'customModelUnitsVersion': 'string' } } **Response Structure** * *(dict) --* * **modelArn** *(string) --* The Amazon Resource Name (ARN) associated with this imported model. * **modelName** *(string) --* The name of the imported model. * **jobName** *(string) --* Job name associated with the imported model. * **jobArn** *(string) --* Job Amazon Resource Name (ARN) associated with the imported model. * **modelDataSource** *(dict) --* The data source for this imported model. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3DataSource". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3DataSource** *(dict) --* The Amazon S3 data source of the model to import. * **s3Uri** *(string) --* The URI of the Amazon S3 data source. * **creationTime** *(datetime) --* Creation time of the imported model. * **modelArchitecture** *(string) --* The architecture of the imported model. * **modelKmsKeyArn** *(string) --* The imported model is encrypted at rest using this key. * **instructSupported** *(boolean) --* Specifies if the imported model supports converse. * **customModelUnits** *(dict) --* Information about the hardware utilization for a single copy of the model. * **customModelUnitsPerModelCopy** *(integer) --* The number of custom model units used to host a model copy. * **customModelUnitsVersion** *(string) --* The version of the custom model unit. Use to determine the billing rate for the custom model unit. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_custom_model_deployment delete_custom_model_deployment ****************************** Bedrock.Client.delete_custom_model_deployment(**kwargs) Deletes a custom model deployment. This operation stops the deployment and removes it from your account. After deletion, the deployment ARN can no longer be used for inference requests. The following actions are related to the "DeleteCustomModelDeployment" operation: * CreateCustomModelDeployment * GetCustomModelDeployment * ListCustomModelDeployments See also: AWS API Documentation **Request Syntax** response = client.delete_custom_model_deployment( customModelDeploymentIdentifier='string' ) Parameters: **customModelDeploymentIdentifier** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) or name of the custom model deployment to delete. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_custom_model get_custom_model **************** Bedrock.Client.get_custom_model(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.get_custom_model( modelIdentifier='string' ) Parameters: **modelIdentifier** (*string*) -- **[REQUIRED]** Name or Amazon Resource Name (ARN) of the custom model. Return type: dict Returns: **Response Syntax** { 'modelArn': 'string', 'modelName': 'string', 'jobName': 'string', 'jobArn': 'string', 'baseModelArn': 'string', 'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION'|'IMPORTED', 'modelKmsKeyArn': 'string', 'hyperParameters': { 'string': 'string' }, 'trainingDataConfig': { 's3Uri': 'string', 'invocationLogsConfig': { 'usePromptResponse': True|False, 'invocationLogSource': { 's3Uri': 'string' }, 'requestMetadataFilters': { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' }, 'andAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ], 'orAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ] } } }, 'validationDataConfig': { 'validators': [ { 's3Uri': 'string' }, ] }, 'outputDataConfig': { 's3Uri': 'string' }, 'trainingMetrics': { 'trainingLoss': ... }, 'validationMetrics': [ { 'validationLoss': ... }, ], 'creationTime': datetime(2015, 1, 1), 'customizationConfig': { 'distillationConfig': { 'teacherModelConfig': { 'teacherModelIdentifier': 'string', 'maxResponseLengthForInference': 123 } } }, 'modelStatus': 'Active'|'Creating'|'Failed', 'failureMessage': 'string' } **Response Structure** * *(dict) --* * **modelArn** *(string) --* Amazon Resource Name (ARN) associated with this model. * **modelName** *(string) --* Model name associated with this model. * **jobName** *(string) --* Job name associated with this model. * **jobArn** *(string) --* Job Amazon Resource Name (ARN) associated with this model. For models that you create with the CreateCustomModel API operation, this is "NULL". * **baseModelArn** *(string) --* Amazon Resource Name (ARN) of the base model. * **customizationType** *(string) --* The type of model customization. * **modelKmsKeyArn** *(string) --* The custom model is encrypted at rest using this key. * **hyperParameters** *(dict) --* Hyperparameter values associated with this model. For details on the format for different models, see Custom model hyperparameters. * *(string) --* * *(string) --* * **trainingDataConfig** *(dict) --* Contains information about the training dataset. * **s3Uri** *(string) --* The S3 URI where the training data is stored. * **invocationLogsConfig** *(dict) --* Settings for using invocation logs to customize a model. * **usePromptResponse** *(boolean) --* Whether to use the model's response for training, or just the prompt. The default value is "False". * **invocationLogSource** *(dict) --* The source of the invocation logs. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3Uri". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3Uri** *(string) --* The URI of an invocation log in a bucket. * **requestMetadataFilters** *(dict) --* Rules for filtering invocation logs based on request metadata. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "equals", "notEquals", "andAll", "orAll". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **equals** *(dict) --* Include results where the key equals the value. * *(string) --* * *(string) --* * **notEquals** *(dict) --* Include results where the key does not equal the value. * *(string) --* * *(string) --* * **andAll** *(list) --* Include results where all of the based filters match. * *(dict) --* A mapping of a metadata key to a value that it should or should not equal. * **equals** *(dict) --* Include results where the key equals the value. * *(string) --* * *(string) --* * **notEquals** *(dict) --* Include results where the key does not equal the value. * *(string) --* * *(string) --* * **orAll** *(list) --* Include results where any of the base filters match. * *(dict) --* A mapping of a metadata key to a value that it should or should not equal. * **equals** *(dict) --* Include results where the key equals the value. * *(string) --* * *(string) --* * **notEquals** *(dict) --* Include results where the key does not equal the value. * *(string) --* * *(string) --* * **validationDataConfig** *(dict) --* Contains information about the validation dataset. * **validators** *(list) --* Information about the validators. * *(dict) --* Information about a validator. * **s3Uri** *(string) --* The S3 URI where the validation data is stored. * **outputDataConfig** *(dict) --* Output data configuration associated with this custom model. * **s3Uri** *(string) --* The S3 URI where the output data is stored. * **trainingMetrics** *(dict) --* Contains training metrics from the job creation. * **trainingLoss** *(float) --* Loss metric associated with the custom job. * **validationMetrics** *(list) --* The validation metrics from the job creation. * *(dict) --* The metric for the validator. * **validationLoss** *(float) --* The validation loss associated with this validator. * **creationTime** *(datetime) --* Creation time of the model. * **customizationConfig** *(dict) --* The customization configuration for the custom model. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "distillationConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **distillationConfig** *(dict) --* The Distillation configuration for the custom model. * **teacherModelConfig** *(dict) --* The teacher model configuration. * **teacherModelIdentifier** *(string) --* The identifier of the teacher model. * **maxResponseLengthForInference** *(integer) --* The maximum number of tokens requested when the customization job invokes the teacher model. * **modelStatus** *(string) --* The current status of the custom model. Possible values include: * "Creating" - The model is being created and validated. * "Active" - The model has been successfully created and is ready for use. * "Failed" - The model creation process failed. Check the "failureMessage" field for details. * **failureMessage** *(string) --* A failure message for any issues that occurred when creating the custom model. This is included for only a failed CreateCustomModel operation. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_model_invocation_job create_model_invocation_job *************************** Bedrock.Client.create_model_invocation_job(**kwargs) 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 "jobArn" that you can use to stop or get details about the job. See also: AWS API Documentation **Request Syntax** response = client.create_model_invocation_job( jobName='string', roleArn='string', clientRequestToken='string', modelId='string', inputDataConfig={ 's3InputDataConfig': { 's3InputFormat': 'JSONL', 's3Uri': 'string', 's3BucketOwner': 'string' } }, outputDataConfig={ 's3OutputDataConfig': { 's3Uri': 'string', 's3EncryptionKeyId': 'string', 's3BucketOwner': 'string' } }, vpcConfig={ 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, timeoutDurationInHours=123, tags=[ { 'key': 'string', 'value': 'string' }, ] ) Parameters: * **jobName** (*string*) -- **[REQUIRED]** A name to give the batch inference job. * **roleArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **modelId** (*string*) -- **[REQUIRED]** The unique identifier of the foundation model to use for the batch inference job. * **inputDataConfig** (*dict*) -- **[REQUIRED]** Details about the location of the input to the batch inference job. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "s3InputDataConfig". * **s3InputDataConfig** *(dict) --* Contains the configuration of the S3 location of the input data. * **s3InputFormat** *(string) --* The format of the input data. * **s3Uri** *(string) --* **[REQUIRED]** The S3 location of the input data. * **s3BucketOwner** *(string) --* The ID of the Amazon Web Services account that owns the S3 bucket containing the input data. * **outputDataConfig** (*dict*) -- **[REQUIRED]** Details about the location of the output of the batch inference job. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "s3OutputDataConfig". * **s3OutputDataConfig** *(dict) --* Contains the configuration of the S3 location of the output data. * **s3Uri** *(string) --* **[REQUIRED]** The S3 location of the output data. * **s3EncryptionKeyId** *(string) --* The unique identifier of the key that encrypts the S3 location of the output data. * **s3BucketOwner** *(string) --* The ID of the Amazon Web Services account that owns the S3 bucket containing the output data. * **vpcConfig** (*dict*) -- The configuration of the Virtual Private Cloud (VPC) for the data in the batch inference job. For more information, see Protect batch inference jobs using a VPC. * **subnetIds** *(list) --* **[REQUIRED]** An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* **[REQUIRED]** An array of IDs for each security group in the VPC to use. * *(string) --* * **timeoutDurationInHours** (*integer*) -- The number of hours after which to force the batch inference job to time out. * **tags** (*list*) -- Any tags to associate with the batch inference job. For more information, see Tagging Amazon Bedrock resources. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. Return type: dict Returns: **Response Syntax** { 'jobArn': 'string' } **Response Structure** * *(dict) --* * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the batch inference job. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_foundation_model get_foundation_model ******************** Bedrock.Client.get_foundation_model(**kwargs) Get details about a Amazon Bedrock foundation model. See also: AWS API Documentation **Request Syntax** response = client.get_foundation_model( modelIdentifier='string' ) Parameters: **modelIdentifier** (*string*) -- **[REQUIRED]** The model identifier. Return type: dict Returns: **Response Syntax** { 'modelDetails': { 'modelArn': 'string', 'modelId': 'string', 'modelName': 'string', 'providerName': 'string', 'inputModalities': [ 'TEXT'|'IMAGE'|'EMBEDDING', ], 'outputModalities': [ 'TEXT'|'IMAGE'|'EMBEDDING', ], 'responseStreamingSupported': True|False, 'customizationsSupported': [ 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION', ], 'inferenceTypesSupported': [ 'ON_DEMAND'|'PROVISIONED', ], 'modelLifecycle': { 'status': 'ACTIVE'|'LEGACY' } } } **Response Structure** * *(dict) --* * **modelDetails** *(dict) --* Information about the foundation model. * **modelArn** *(string) --* The model Amazon Resource Name (ARN). * **modelId** *(string) --* The model identifier. * **modelName** *(string) --* The model name. * **providerName** *(string) --* The model's provider name. * **inputModalities** *(list) --* The input modalities that the model supports. * *(string) --* * **outputModalities** *(list) --* The output modalities that the model supports. * *(string) --* * **responseStreamingSupported** *(boolean) --* Indicates whether the model supports streaming. * **customizationsSupported** *(list) --* The customization that the model supports. * *(string) --* * **inferenceTypesSupported** *(list) --* The inference types that the model supports. * *(string) --* * **modelLifecycle** *(dict) --* Contains details about whether a model version is available or deprecated * **status** *(string) --* Specifies whether a model version is available ( "ACTIVE") or deprecated ( "LEGACY". **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_automated_reasoning_policy_test_result get_automated_reasoning_policy_test_result ****************************************** Bedrock.Client.get_automated_reasoning_policy_test_result(**kwargs) Retrieves the test result for a specific Automated Reasoning policy test. Returns detailed validation findings and execution status. See also: AWS API Documentation **Request Syntax** response = client.get_automated_reasoning_policy_test_result( policyArn='string', buildWorkflowId='string', testCaseId='string' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The build workflow identifier. The build workflow must display a "COMPLETED" status to get results. * **testCaseId** (*string*) -- **[REQUIRED]** The unique identifier of the test for which to retrieve results. Return type: dict Returns: **Response Syntax** { 'testResult': { 'testCase': { 'testCaseId': 'string', 'guardContent': 'string', 'queryContent': 'string', 'expectedAggregatedFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'confidenceThreshold': 123.0 }, 'policyArn': 'string', 'testRunStatus': 'NOT_STARTED'|'SCHEDULED'|'IN_PROGRESS'|'COMPLETED'|'FAILED', 'testFindings': [ { 'valid': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'claimsTrueScenario': { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, 'supportingRules': [ { 'id': 'string', 'policyVersionArn': 'string' }, ], 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'invalid': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'contradictingRules': [ { 'id': 'string', 'policyVersionArn': 'string' }, ], 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'satisfiable': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'claimsTrueScenario': { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, 'claimsFalseScenario': { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'impossible': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'contradictingRules': [ { 'id': 'string', 'policyVersionArn': 'string' }, ], 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'translationAmbiguous': { 'options': [ { 'translations': [ { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, ] }, ], 'differenceScenarios': [ { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, ] }, 'tooComplex': {}, 'noTranslations': {} }, ], 'testRunResult': 'PASSED'|'FAILED', 'aggregatedTestFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **testResult** *(dict) --* The test result containing validation findings, execution status, and detailed analysis. * **testCase** *(dict) --* Represents a test for validating an Automated Reasoning policy. tests contain sample inputs and expected outcomes to verify policy behavior. * **testCaseId** *(string) --* The unique identifier of the test. * **guardContent** *(string) --* The output content to be validated by the policy, typically representing a foundation model response. * **queryContent** *(string) --* The input query or prompt that generated the content. This provides context for the validation. * **expectedAggregatedFindingsResult** *(string) --* The expected result of the Automated Reasoning check for this test. * **createdAt** *(datetime) --* The timestamp when the test was created. * **updatedAt** *(datetime) --* The timestamp when the test was last updated. * **confidenceThreshold** *(float) --* The minimum confidence level for logic validation. Content meeting this threshold is considered high- confidence and can be validated. * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy that was tested. * **testRunStatus** *(string) --* The overall status of the test run (e.g., COMPLETED, FAILED, IN_PROGRESS). * **testFindings** *(list) --* Detailed findings from the test run, including any issues, violations, or unexpected behaviors discovered. * *(dict) --* Represents the result of an Automated Reasoning validation check, indicating whether the content is logically valid, invalid, or falls into other categories based on the policy rules. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "valid", "invalid", "satisfiable", "impossible", "translationAmbiguous", "tooComplex", "noTranslations". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **valid** *(dict) --* Indicates that the claims are true. The claims are implied by the premises and the Automated Reasoning policy. Given the Automated Reasoning policy and premises, it is not possible for these claims to be false. * **translation** *(dict) --* The logical translation of the input that this finding validates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **claimsTrueScenario** *(dict) --* An example scenario demonstrating how the claims are logically true. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **supportingRules** *(list) --* The automated reasoning policy rules that support why this result is considered valid. * *(dict) --* References a specific automated reasoning policy rule that was applied during evaluation. * **id** *(string) --* The unique identifier of the automated reasoning rule. * **policyVersionArn** *(string) --* The ARN of the automated reasoning policy version that contains this rule. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **invalid** *(dict) --* Indicates that the claims are false. The claims are not implied by the premises and Automated Reasoning policy. Furthermore, there exist different claims that are consistent with the premises and Automated Reasoning policy. * **translation** *(dict) --* The logical translation of the input that this finding invalidates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **contradictingRules** *(list) --* The automated reasoning policy rules that contradict the claims in the input. * *(dict) --* References a specific automated reasoning policy rule that was applied during evaluation. * **id** *(string) --* The unique identifier of the automated reasoning rule. * **policyVersionArn** *(string) --* The ARN of the automated reasoning policy version that contains this rule. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **satisfiable** *(dict) --* Indicates that the claims can be true or false. It depends on what assumptions are made for the claim to be implied from the premises and Automated Reasoning policy rules. In this situation, different assumptions can make input claims false and alternative claims true. * **translation** *(dict) --* The logical translation of the input that this finding evaluates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **claimsTrueScenario** *(dict) --* An example scenario demonstrating how the claims could be logically true. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claimsFalseScenario** *(dict) --* An example scenario demonstrating how the claims could be logically false. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **impossible** *(dict) --* Indicates that Automated Reasoning cannot make a statement about the claims. This can happen if the premises are logically incorrect, or if there is a conflict within the Automated Reasoning policy itself. * **translation** *(dict) --* The logical translation of the input that this finding evaluates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **contradictingRules** *(list) --* The automated reasoning policy rules that contradict the claims and/or premises in the input. * *(dict) --* References a specific automated reasoning policy rule that was applied during evaluation. * **id** *(string) --* The unique identifier of the automated reasoning rule. * **policyVersionArn** *(string) --* The ARN of the automated reasoning policy version that contains this rule. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **translationAmbiguous** *(dict) --* Indicates that an ambiguity was detected in the translation, making it unsound to continue with validity checking. Additional context or follow-up questions might be needed to get translation to succeed. * **options** *(list) --* Different logical interpretations that were detected during translation of the input. * *(dict) --* Represents one possible logical interpretation of ambiguous input content. * **translations** *(list) --* Different logical interpretations that were detected during translation of the input. * *(dict) --* Contains the logical translation of natural language input into formal logical statements, including premises, claims, and confidence scores. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **differenceScenarios** *(list) --* Scenarios showing how the different translation options differ in meaning. * *(dict) --* Represents a logical scenario where claims can be evaluated as true or false, containing specific logical assignments. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **tooComplex** *(dict) --* Indicates that the input contains too much information for Automated Reasoning to process within its latency limits. * **noTranslations** *(dict) --* Identifies that some or all of the input prompt wasn't translated into logic. This can happen if the input isn't relevant to the Automated Reasoning policy, or if the policy doesn't have variables to model relevant input. * **testRunResult** *(string) --* The overall result of the test run, indicating whether the policy passed or failed validation. * **aggregatedTestFindingsResult** *(string) --* A summary of all test findings, aggregated to provide an overall assessment of policy quality and correctness. * **updatedAt** *(datetime) --* The timestamp when the test results were last updated. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_marketplace_model_endpoint delete_marketplace_model_endpoint ********************************* Bedrock.Client.delete_marketplace_model_endpoint(**kwargs) Deletes an endpoint for a model from Amazon Bedrock Marketplace. See also: AWS API Documentation **Request Syntax** response = client.delete_marketplace_model_endpoint( endpointArn='string' ) Parameters: **endpointArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the endpoint you want to delete. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / start_automated_reasoning_policy_build_workflow start_automated_reasoning_policy_build_workflow *********************************************** Bedrock.Client.start_automated_reasoning_policy_build_workflow(**kwargs) Starts a new build workflow for an Automated Reasoning policy. This initiates the process of analyzing source documents and generating policy rules, variables, and types. See also: AWS API Documentation **Request Syntax** response = client.start_automated_reasoning_policy_build_workflow( policyArn='string', buildWorkflowType='INGEST_CONTENT'|'REFINE_POLICY'|'IMPORT_POLICY', clientRequestToken='string', sourceContent={ 'policyDefinition': { 'version': 'string', 'types': [ { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] }, ], 'rules': [ { 'id': 'string', 'expression': 'string', 'alternateExpression': 'string' }, ], 'variables': [ { 'name': 'string', 'type': 'string', 'description': 'string' }, ] }, 'workflowContent': { 'documents': [ { 'document': b'bytes', 'documentContentType': 'pdf'|'txt', 'documentName': 'string', 'documentDescription': 'string' }, ], 'policyRepairAssets': { 'annotations': [ { 'addType': { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] }, 'updateType': { 'name': 'string', 'newName': 'string', 'description': 'string', 'values': [ { 'addTypeValue': { 'value': 'string', 'description': 'string' }, 'updateTypeValue': { 'value': 'string', 'newValue': 'string', 'description': 'string' }, 'deleteTypeValue': { 'value': 'string' } }, ] }, 'deleteType': { 'name': 'string' }, 'addVariable': { 'name': 'string', 'type': 'string', 'description': 'string' }, 'updateVariable': { 'name': 'string', 'newName': 'string', 'description': 'string' }, 'deleteVariable': { 'name': 'string' }, 'addRule': { 'expression': 'string' }, 'updateRule': { 'ruleId': 'string', 'expression': 'string' }, 'deleteRule': { 'ruleId': 'string' }, 'addRuleFromNaturalLanguage': { 'naturalLanguage': 'string' }, 'updateFromRulesFeedback': { 'ruleIds': [ 'string', ], 'feedback': 'string' }, 'updateFromScenarioFeedback': { 'ruleIds': [ 'string', ], 'scenarioExpression': 'string', 'feedback': 'string' }, 'ingestContent': { 'content': 'string' } }, ] } } } ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to start the build workflow. * **buildWorkflowType** (*string*) -- **[REQUIRED]** The type of build workflow to start (e.g., DOCUMENT_INGESTION for processing new documents, POLICY_REPAIR for fixing existing policies). * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the operation completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request but doesn't return an error. This field is autopopulated if not provided. * **sourceContent** (*dict*) -- **[REQUIRED]** The source content for the build workflow, such as documents to analyze or repair instructions for existing policies. * **policyDefinition** *(dict) --* Contains the formal logic rules, variables, and custom variable types that define an Automated Reasoning policy. The policy definition specifies the constraints used to validate foundation model responses for accuracy and logical consistency. * **version** *(string) --* The version of the policy definition format. * **types** *(list) --* The custom user-defined vairable types used in the policy. Types are enum-based variable types that provide additional context beyond the predefined variable types. * *(dict) --* Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types. * **name** *(string) --* **[REQUIRED]** The name of the custom type. * **description** *(string) --* The description of what the custom type represents. * **values** *(list) --* **[REQUIRED]** The possible values for this enum-based type, each with its own description. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* **[REQUIRED]** The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **rules** *(list) --* The formal logic rules extracted from the source document. Rules define the logical constraints that determine whether model responses are valid, invalid, or satisfiable. * *(dict) --* Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints. * **id** *(string) --* **[REQUIRED]** The unique identifier of the rule within the policy. * **expression** *(string) --* **[REQUIRED]** The formal logic expression of the rule. * **alternateExpression** *(string) --* The human-readable form of the rule expression, often in natural language or simplified notation. * **variables** *(list) --* The variables that represent concepts in the policy. Variables can have values assigned when translating natural language into formal logic. Their descriptions are crucial for accurate translation. * *(dict) --* Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation. * **name** *(string) --* **[REQUIRED]** The name of the variable. Use descriptive names that clearly indicate the concept being represented. * **type** *(string) --* **[REQUIRED]** The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide. * **description** *(string) --* **[REQUIRED]** The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation. * **workflowContent** *(dict) --* The actual content to be processed in the build workflow, such as documents to analyze or repair instructions to apply. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "documents", "policyRepairAssets". * **documents** *(list) --* The list of documents to be processed in a document ingestion workflow. * *(dict) --* Represents a source document used in the policy build workflow, containing the content and metadata needed for policy generation. * **document** *(bytes) --* **[REQUIRED]** The actual content of the source document that will be analyzed to extract policy rules and concepts. * **documentContentType** *(string) --* **[REQUIRED]** The MIME type of the document content (e.g., text/plain, application/pdf, text/markdown). * **documentName** *(string) --* **[REQUIRED]** A descriptive name for the document that helps identify its purpose and content. * **documentDescription** *(string) --* A detailed description of the document's content and how it should be used in the policy generation process. * **policyRepairAssets** *(dict) --* The assets and instructions needed for a policy repair workflow, including repair annotations and guidance. * **annotations** *(list) --* **[REQUIRED]** Specific annotations or modifications to apply during the policy repair process, such as rule corrections or variable updates. * *(dict) --* Contains the various operations that can be performed on an Automated Reasoning policy, including adding, updating, and deleting rules, variables, and types. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "addType", "updateType", "deleteType", "addVariable", "updateVariable", "deleteVariable", "addRule", "updateRule", "deleteRule", "addRuleFromNaturalLanguage", "updateFromRulesFeedback", "updateFromScenarioFeedback", "ingestContent". * **addType** *(dict) --* An operation to add a new custom type to the policy, defining a set of possible values for policy variables. * **name** *(string) --* **[REQUIRED]** The name of the new custom type. This name will be used to reference the type in variable definitions and rules. * **description** *(string) --* **[REQUIRED]** A description of what the custom type represents and how it should be used in the policy. * **values** *(list) --* **[REQUIRED]** The list of possible values that variables of this type can take, each with its own description and identifier. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* **[REQUIRED]** The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **updateType** *(dict) --* An operation to modify an existing custom type in the policy, such as changing its name, description, or allowed values. * **name** *(string) --* **[REQUIRED]** The current name of the custom type to update. * **newName** *(string) --* The new name for the custom type, if you want to rename it. If not provided, the name remains unchanged. * **description** *(string) --* The new description for the custom type, replacing the previous description. * **values** *(list) --* **[REQUIRED]** The updated list of values for the custom type, which can include additions, modifications, or removals. * *(dict) --* An annotation for managing values within custom types, including adding, updating, or removing specific type values. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "addTypeValue", "updateTypeValue", "deleteTypeValue". * **addTypeValue** *(dict) --* An operation to add a new value to an existing custom type. * **value** *(string) --* **[REQUIRED]** The identifier or name of the new value to add to the type. * **description** *(string) --* A description of what this new type value represents and when it should be used. * **updateTypeValue** *(dict) --* An operation to modify an existing value within a custom type. * **value** *(string) --* **[REQUIRED]** The current identifier or name of the type value to update. * **newValue** *(string) --* The new identifier or name for the type value, if you want to rename it. * **description** *(string) --* The new description for the type value, replacing the previous description. * **deleteTypeValue** *(dict) --* An operation to remove a value from an existing custom type. * **value** *(string) --* **[REQUIRED]** The identifier or name of the value to remove from the type. * **deleteType** *(dict) --* An operation to remove a custom type from the policy. The type must not be referenced by any variables or rules. * **name** *(string) --* **[REQUIRED]** The name of the custom type to delete from the policy. The type must not be referenced by any variables or rules. * **addVariable** *(dict) --* An operation to add a new variable to the policy, which can be used in rule expressions to represent dynamic values. * **name** *(string) --* **[REQUIRED]** The name of the new variable. This name will be used to reference the variable in rule expressions. * **type** *(string) --* **[REQUIRED]** The type of the variable, which can be a built-in type (like string or number) or a custom type defined in the policy. * **description** *(string) --* **[REQUIRED]** A description of what the variable represents and how it should be used in rules. * **updateVariable** *(dict) --* An operation to modify an existing variable in the policy, such as changing its name, type, or description. * **name** *(string) --* **[REQUIRED]** The current name of the variable to update. * **newName** *(string) --* The new name for the variable, if you want to rename it. If not provided, the name remains unchanged. * **description** *(string) --* The new description for the variable, replacing the previous description. * **deleteVariable** *(dict) --* An operation to remove a variable from the policy. The variable must not be referenced by any rules. * **name** *(string) --* **[REQUIRED]** The name of the variable to delete from the policy. The variable must not be referenced by any rules. * **addRule** *(dict) --* An operation to add a new logical rule to the policy using formal mathematical expressions. * **expression** *(string) --* **[REQUIRED]** The formal logical expression that defines the rule, using mathematical notation and referencing policy variables and types. * **updateRule** *(dict) --* An operation to modify an existing rule in the policy, such as changing its logical expression or conditions. * **ruleId** *(string) --* **[REQUIRED]** The unique identifier of the rule to update. * **expression** *(string) --* **[REQUIRED]** The new formal logical expression for the rule, replacing the previous expression. * **deleteRule** *(dict) --* An operation to remove a rule from the policy. * **ruleId** *(string) --* **[REQUIRED]** The unique identifier of the rule to delete from the policy. * **addRuleFromNaturalLanguage** *(dict) --* An operation to add a new rule by converting natural language descriptions into formal logical expressions. * **naturalLanguage** *(string) --* **[REQUIRED]** The natural language description of the rule that should be converted into a formal logical expression. * **updateFromRulesFeedback** *(dict) --* An operation to update the policy based on feedback about how specific rules performed during testing or validation. * **ruleIds** *(list) --* The list of rule identifiers that the feedback applies to. * *(string) --* * **feedback** *(string) --* **[REQUIRED]** The feedback information about rule performance, including suggestions for improvements or corrections. * **updateFromScenarioFeedback** *(dict) --* An operation to update the policy based on feedback about how it performed on specific test scenarios. * **ruleIds** *(list) --* The list of rule identifiers that were involved in the scenario being evaluated. * *(string) --* * **scenarioExpression** *(string) --* **[REQUIRED]** The logical expression that defines the test scenario that generated this feedback. * **feedback** *(string) --* The feedback information about scenario performance, including any issues or improvements identified. * **ingestContent** *(dict) --* An operation to process and incorporate new content into the policy, extracting additional rules and concepts. * **content** *(string) --* **[REQUIRED]** The new content to be analyzed and incorporated into the policy, such as additional documents or rule descriptions. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'buildWorkflowId': 'string' } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy. * **buildWorkflowId** *(string) --* The unique identifier of the newly started build workflow. Use this ID to track the workflow's progress and retrieve its results. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ResourceInUseException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_model_invocation_jobs list_model_invocation_jobs ************************** Bedrock.Client.list_model_invocation_jobs(**kwargs) Lists all batch inference jobs in the account. For more information, see View details about a batch inference job. See also: AWS API Documentation **Request Syntax** response = client.list_model_invocation_jobs( submitTimeAfter=datetime(2015, 1, 1), submitTimeBefore=datetime(2015, 1, 1), statusEquals='Submitted'|'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'PartiallyCompleted'|'Expired'|'Validating'|'Scheduled', nameContains='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending' ) Parameters: * **submitTimeAfter** (*datetime*) -- Specify a time to filter for batch inference jobs that were submitted after the time you specify. * **submitTimeBefore** (*datetime*) -- Specify a time to filter for batch inference jobs that were submitted before the time you specify. * **statusEquals** (*string*) -- Specify a status to filter for batch inference jobs whose statuses match the string you specify. The following statuses are possible: * Submitted – This job has been submitted to a queue for validation. * Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following: * Your IAM service role has access to the Amazon S3 buckets containing your files. * Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the "modelInput" value matches the request body for the model. * Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock. * Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn. * Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request. * InProgress – This job has begun. You can start viewing the results in the output S3 location. * Completed – This job has successfully completed. View the output files in the output S3 location. * PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location. * Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web ServicesSupport Center. * Stopped – This job was stopped by a user. * Stopping – This job is being stopped by a user. * **nameContains** (*string*) -- Specify a string to filter for batch inference jobs whose names contain the string. * **maxResults** (*integer*) -- The maximum number of results to return. If there are more results than the number that you specify, a "nextToken" value is returned. Use the "nextToken" in a request to return the next batch of results. * **nextToken** (*string*) -- If there were more results than the value you specified in the "maxResults" field in a previous "ListModelInvocationJobs" request, the response would have returned a "nextToken" value. To see the next batch of results, send the "nextToken" value in another request. * **sortBy** (*string*) -- An attribute by which to sort the results. * **sortOrder** (*string*) -- Specifies whether to sort the results by ascending or descending order. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'invocationJobSummaries': [ { 'jobArn': 'string', 'jobName': 'string', 'modelId': 'string', 'clientRequestToken': 'string', 'roleArn': 'string', 'status': 'Submitted'|'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'PartiallyCompleted'|'Expired'|'Validating'|'Scheduled', 'message': 'string', 'submitTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'inputDataConfig': { 's3InputDataConfig': { 's3InputFormat': 'JSONL', 's3Uri': 'string', 's3BucketOwner': 'string' } }, 'outputDataConfig': { 's3OutputDataConfig': { 's3Uri': 'string', 's3EncryptionKeyId': 'string', 's3BucketOwner': 'string' } }, 'vpcConfig': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, 'timeoutDurationInHours': 123, 'jobExpirationTime': datetime(2015, 1, 1) }, ] } **Response Structure** * *(dict) --* * **nextToken** *(string) --* If there are more results than can fit in the response, a "nextToken" is returned. Use the "nextToken" in a request to return the next batch of results. * **invocationJobSummaries** *(list) --* A list of items, each of which contains a summary about a batch inference job. * *(dict) --* A summary of a batch inference job. * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the batch inference job. * **jobName** *(string) --* The name of the batch inference job. * **modelId** *(string) --* The unique identifier of the foundation model used for model inference. * **clientRequestToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference. * **status** *(string) --* The status of the batch inference job. The following statuses are possible: * Submitted – This job has been submitted to a queue for validation. * Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following: * Your IAM service role has access to the Amazon S3 buckets containing your files. * Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the "modelInput" value matches the request body for the model. * Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock. * Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn. * Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request. * InProgress – This job has begun. You can start viewing the results in the output S3 location. * Completed – This job has successfully completed. View the output files in the output S3 location. * PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location. * Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web ServicesSupport Center. * Stopped – This job was stopped by a user. * Stopping – This job is being stopped by a user. * **message** *(string) --* If the batch inference job failed, this field contains a message describing why the job failed. * **submitTime** *(datetime) --* The time at which the batch inference job was submitted. * **lastModifiedTime** *(datetime) --* The time at which the batch inference job was last modified. * **endTime** *(datetime) --* The time at which the batch inference job ended. * **inputDataConfig** *(dict) --* Details about the location of the input to the batch inference job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3InputDataConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3InputDataConfig** *(dict) --* Contains the configuration of the S3 location of the input data. * **s3InputFormat** *(string) --* The format of the input data. * **s3Uri** *(string) --* The S3 location of the input data. * **s3BucketOwner** *(string) --* The ID of the Amazon Web Services account that owns the S3 bucket containing the input data. * **outputDataConfig** *(dict) --* Details about the location of the output of the batch inference job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3OutputDataConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3OutputDataConfig** *(dict) --* Contains the configuration of the S3 location of the output data. * **s3Uri** *(string) --* The S3 location of the output data. * **s3EncryptionKeyId** *(string) --* The unique identifier of the key that encrypts the S3 location of the output data. * **s3BucketOwner** *(string) --* The ID of the Amazon Web Services account that owns the S3 bucket containing the output data. * **vpcConfig** *(dict) --* The configuration of the Virtual Private Cloud (VPC) for the data in the batch inference job. For more information, see Protect batch inference jobs using a VPC. * **subnetIds** *(list) --* An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* An array of IDs for each security group in the VPC to use. * *(string) --* * **timeoutDurationInHours** *(integer) --* The number of hours after which the batch inference job was set to time out. * **jobExpirationTime** *(datetime) --* The time at which the batch inference job times or timed out. **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_foundation_model_agreement_offers list_foundation_model_agreement_offers ************************************** Bedrock.Client.list_foundation_model_agreement_offers(**kwargs) Get the offers associated with the specified model. See also: AWS API Documentation **Request Syntax** response = client.list_foundation_model_agreement_offers( modelId='string', offerType='ALL'|'PUBLIC' ) Parameters: * **modelId** (*string*) -- **[REQUIRED]** Model Id of the foundation model. * **offerType** (*string*) -- Type of offer associated with the model. Return type: dict Returns: **Response Syntax** { 'modelId': 'string', 'offers': [ { 'offerId': 'string', 'offerToken': 'string', 'termDetails': { 'usageBasedPricingTerm': { 'rateCard': [ { 'dimension': 'string', 'price': 'string', 'description': 'string', 'unit': 'string' }, ] }, 'legalTerm': { 'url': 'string' }, 'supportTerm': { 'refundPolicyDescription': 'string' }, 'validityTerm': { 'agreementDuration': 'string' } } }, ] } **Response Structure** * *(dict) --* * **modelId** *(string) --* Model Id of the foundation model. * **offers** *(list) --* List of the offers associated with the specified model. * *(dict) --* An offer dictates usage terms for the model. * **offerId** *(string) --* Offer Id for a model offer. * **offerToken** *(string) --* Offer token. * **termDetails** *(dict) --* Details about the terms of the offer. * **usageBasedPricingTerm** *(dict) --* Describes the usage-based pricing term. * **rateCard** *(list) --* Describes a usage price for each dimension. * *(dict) --* Dimensional price rate. * **dimension** *(string) --* Dimension for the price rate. * **price** *(string) --* Single-dimensional rate information. * **description** *(string) --* Description of the price rate. * **unit** *(string) --* Unit associated with the price. * **legalTerm** *(dict) --* Describes the legal terms. * **url** *(string) --* URL to the legal term document. * **supportTerm** *(dict) --* Describes the support terms. * **refundPolicyDescription** *(string) --* Describes the refund policy. * **validityTerm** *(dict) --* Describes the validity terms. * **agreementDuration** *(string) --* Describes the agreement duration. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_guardrail delete_guardrail **************** Bedrock.Client.delete_guardrail(**kwargs) Deletes a guardrail. * To delete a guardrail, only specify the ARN of the guardrail in the "guardrailIdentifier" field. If you delete a guardrail, all of its versions will be deleted. * To delete a version of a guardrail, specify the ARN of the guardrail in the "guardrailIdentifier" field and the version in the "guardrailVersion" field. See also: AWS API Documentation **Request Syntax** response = client.delete_guardrail( guardrailIdentifier='string', guardrailVersion='string' ) Parameters: * **guardrailIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the guardrail. This can be an ID or the ARN. * **guardrailVersion** (*string*) -- The version of the guardrail. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_tags_for_resource list_tags_for_resource ********************** Bedrock.Client.list_tags_for_resource(**kwargs) List the tags associated with the specified resource. For more information, see Tagging resources in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.list_tags_for_resource( resourceARN='string' ) Parameters: **resourceARN** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource. Return type: dict Returns: **Response Syntax** { 'tags': [ { 'key': 'string', 'value': 'string' }, ] } **Response Structure** * *(dict) --* * **tags** *(list) --* An array of the tags associated with this resource. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* Key for the tag. * **value** *(string) --* Value for the tag. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / batch_delete_evaluation_job batch_delete_evaluation_job *************************** Bedrock.Client.batch_delete_evaluation_job(**kwargs) Deletes a batch of evaluation jobs. An evaluation job can only be deleted if it has following status "FAILED", "COMPLETED", and "STOPPED". You can request up to 25 model evaluation jobs be deleted in a single request. See also: AWS API Documentation **Request Syntax** response = client.batch_delete_evaluation_job( jobIdentifiers=[ 'string', ] ) Parameters: **jobIdentifiers** (*list*) -- **[REQUIRED]** A list of one or more evaluation job Amazon Resource Names (ARNs) you want to delete. * *(string) --* Return type: dict Returns: **Response Syntax** { 'errors': [ { 'jobIdentifier': 'string', 'code': 'string', 'message': 'string' }, ], 'evaluationJobs': [ { 'jobIdentifier': 'string', 'jobStatus': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'Deleting' }, ] } **Response Structure** * *(dict) --* * **errors** *(list) --* A JSON object containing the HTTP status codes and the ARNs of evaluation jobs that failed to be deleted. * *(dict) --* A JSON array that provides the status of the evaluation jobs being deleted. * **jobIdentifier** *(string) --* The ARN of the evaluation job being deleted. * **code** *(string) --* A HTTP status code of the evaluation job being deleted. * **message** *(string) --* A status message about the evaluation job deletion. * **evaluationJobs** *(list) --* The list of evaluation jobs for deletion. * *(dict) --* An evaluation job for deletion, and it’s current status. * **jobIdentifier** *(string) --* The Amazon Resource Name (ARN) of the evaluation job for deletion. * **jobStatus** *(string) --* The status of the evaluation job for deletion. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / untag_resource untag_resource ************** Bedrock.Client.untag_resource(**kwargs) Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.untag_resource( resourceARN='string', tagKeys=[ 'string', ] ) Parameters: * **resourceARN** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource to untag. * **tagKeys** (*list*) -- **[REQUIRED]** Tag keys of the tags to remove from the resource. * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / start_automated_reasoning_policy_test_workflow start_automated_reasoning_policy_test_workflow ********************************************** Bedrock.Client.start_automated_reasoning_policy_test_workflow(**kwargs) Initiates a test workflow to validate Automated Reasoning policy tests. The workflow executes the specified tests against the policy and generates validation results. See also: AWS API Documentation **Request Syntax** response = client.start_automated_reasoning_policy_test_workflow( policyArn='string', buildWorkflowId='string', testCaseIds=[ 'string', ], clientRequestToken='string' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy to test. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The build workflow identifier. The build workflow must show a "COMPLETED" status before running tests. * **testCaseIds** (*list*) -- The list of test identifiers to run. If not provided, all tests for the policy are run. * *(string) --* * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request but doesn't return an error. This field is autopopulated if not provided. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string' } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the policy for which the test workflow was started. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ResourceInUseException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_inference_profile create_inference_profile ************************ Bedrock.Client.create_inference_profile(**kwargs) Creates an application inference profile to track metrics and costs when invoking a model. To create an application inference profile for a foundation model in one region, specify the ARN of the model in that region. To create an application inference profile for a foundation model across multiple regions, specify the ARN of the system-defined inference profile that contains the regions that you want to route requests to. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.create_inference_profile( inferenceProfileName='string', description='string', clientRequestToken='string', modelSource={ 'copyFrom': 'string' }, tags=[ { 'key': 'string', 'value': 'string' }, ] ) Parameters: * **inferenceProfileName** (*string*) -- **[REQUIRED]** A name for the inference profile. * **description** (*string*) -- A description for the inference profile. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **modelSource** (*dict*) -- **[REQUIRED]** The foundation model or system-defined inference profile that the inference profile will track metrics and costs for. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "copyFrom". * **copyFrom** *(string) --* The ARN of the model or system-defined inference profile that is the source for the inference profile. * **tags** (*list*) -- An array of objects, each of which contains a tag and its value. For more information, see Tagging resources in the Amazon Bedrock User Guide. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. Return type: dict Returns: **Response Syntax** { 'inferenceProfileArn': 'string', 'status': 'ACTIVE' } **Response Structure** * *(dict) --* * **inferenceProfileArn** *(string) --* The ARN of the inference profile that you created. * **status** *(string) --* The status of the inference profile. "ACTIVE" means that the inference profile is ready to be used. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_prompt_router delete_prompt_router ******************** Bedrock.Client.delete_prompt_router(**kwargs) Deletes a specified prompt router. This action cannot be undone. See also: AWS API Documentation **Request Syntax** response = client.delete_prompt_router( promptRouterArn='string' ) Parameters: **promptRouterArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the prompt router to delete. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_waiter get_waiter ********** Bedrock.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" Bedrock / Client / get_provisioned_model_throughput get_provisioned_model_throughput ******************************** Bedrock.Client.get_provisioned_model_throughput(**kwargs) Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.get_provisioned_model_throughput( provisionedModelId='string' ) Parameters: **provisionedModelId** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) or name of the Provisioned Throughput. Return type: dict Returns: **Response Syntax** { 'modelUnits': 123, 'desiredModelUnits': 123, 'provisionedModelName': 'string', 'provisionedModelArn': 'string', 'modelArn': 'string', 'desiredModelArn': 'string', 'foundationModelArn': 'string', 'status': 'Creating'|'InService'|'Updating'|'Failed', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1), 'failureMessage': 'string', 'commitmentDuration': 'OneMonth'|'SixMonths', 'commitmentExpirationTime': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **modelUnits** *(integer) --* The number of model units allocated to this Provisioned Throughput. * **desiredModelUnits** *(integer) --* The number of model units that was requested for this Provisioned Throughput. * **provisionedModelName** *(string) --* The name of the Provisioned Throughput. * **provisionedModelArn** *(string) --* The Amazon Resource Name (ARN) of the Provisioned Throughput. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the model associated with this Provisioned Throughput. * **desiredModelArn** *(string) --* The Amazon Resource Name (ARN) of the model requested to be associated to this Provisioned Throughput. This value differs from the "modelArn" if updating hasn't completed. * **foundationModelArn** *(string) --* The Amazon Resource Name (ARN) of the base model for which the Provisioned Throughput was created, or of the base model that the custom model for which the Provisioned Throughput was created was customized. * **status** *(string) --* The status of the Provisioned Throughput. * **creationTime** *(datetime) --* The timestamp of the creation time for this Provisioned Throughput. * **lastModifiedTime** *(datetime) --* The timestamp of the last time that this Provisioned Throughput was modified. * **failureMessage** *(string) --* A failure message for any issues that occurred during creation, updating, or deletion of the Provisioned Throughput. * **commitmentDuration** *(string) --* Commitment duration of the Provisioned Throughput. * **commitmentExpirationTime** *(datetime) --* The timestamp for when the commitment term for the Provisioned Throughput expires. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_evaluation_job create_evaluation_job ********************* Bedrock.Client.create_evaluation_job(**kwargs) Creates an evaluation job. See also: AWS API Documentation **Request Syntax** response = client.create_evaluation_job( jobName='string', jobDescription='string', clientRequestToken='string', roleArn='string', customerEncryptionKeyId='string', jobTags=[ { 'key': 'string', 'value': 'string' }, ], applicationType='ModelEvaluation'|'RagEvaluation', evaluationConfig={ 'automated': { 'datasetMetricConfigs': [ { 'taskType': 'Summarization'|'Classification'|'QuestionAndAnswer'|'Generation'|'Custom', 'dataset': { 'name': 'string', 'datasetLocation': { 's3Uri': 'string' } }, 'metricNames': [ 'string', ] }, ], 'evaluatorModelConfig': { 'bedrockEvaluatorModels': [ { 'modelIdentifier': 'string' }, ] }, 'customMetricConfig': { 'customMetrics': [ { 'customMetricDefinition': { 'name': 'string', 'instructions': 'string', 'ratingScale': [ { 'definition': 'string', 'value': { 'stringValue': 'string', 'floatValue': ... } }, ] } }, ], 'evaluatorModelConfig': { 'bedrockEvaluatorModels': [ { 'modelIdentifier': 'string' }, ] } } }, 'human': { 'humanWorkflowConfig': { 'flowDefinitionArn': 'string', 'instructions': 'string' }, 'customMetrics': [ { 'name': 'string', 'description': 'string', 'ratingMethod': 'string' }, ], 'datasetMetricConfigs': [ { 'taskType': 'Summarization'|'Classification'|'QuestionAndAnswer'|'Generation'|'Custom', 'dataset': { 'name': 'string', 'datasetLocation': { 's3Uri': 'string' } }, 'metricNames': [ 'string', ] }, ] } }, inferenceConfig={ 'models': [ { 'bedrockModel': { 'modelIdentifier': 'string', 'inferenceParams': 'string', 'performanceConfig': { 'latency': 'standard'|'optimized' } }, 'precomputedInferenceSource': { 'inferenceSourceIdentifier': 'string' } }, ], 'ragConfigs': [ { 'knowledgeBaseConfig': { 'retrieveConfig': { 'knowledgeBaseId': 'string', 'knowledgeBaseRetrievalConfiguration': { 'vectorSearchConfiguration': { 'numberOfResults': 123, 'overrideSearchType': 'HYBRID'|'SEMANTIC', 'filter': { 'equals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'notEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'greaterThan': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'greaterThanOrEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'lessThan': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'lessThanOrEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'in': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'notIn': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'startsWith': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'listContains': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'stringContains': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'andAll': [ {'... recursive ...'}, ], 'orAll': [ {'... recursive ...'}, ] }, 'implicitFilterConfiguration': { 'metadataAttributes': [ { 'key': 'string', 'type': 'STRING'|'NUMBER'|'BOOLEAN'|'STRING_LIST', 'description': 'string' }, ], 'modelArn': 'string' }, 'rerankingConfiguration': { 'type': 'BEDROCK_RERANKING_MODEL', 'bedrockRerankingConfiguration': { 'modelConfiguration': { 'modelArn': 'string', 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None } }, 'numberOfRerankedResults': 123, 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToInclude': [ { 'fieldName': 'string' }, ], 'fieldsToExclude': [ { 'fieldName': 'string' }, ] } } } } } } }, 'retrieveAndGenerateConfig': { 'type': 'KNOWLEDGE_BASE'|'EXTERNAL_SOURCES', 'knowledgeBaseConfiguration': { 'knowledgeBaseId': 'string', 'modelArn': 'string', 'retrievalConfiguration': { 'vectorSearchConfiguration': { 'numberOfResults': 123, 'overrideSearchType': 'HYBRID'|'SEMANTIC', 'filter': { 'equals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'notEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'greaterThan': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'greaterThanOrEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'lessThan': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'lessThanOrEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'in': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'notIn': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'startsWith': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'listContains': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'stringContains': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'andAll': [ {'... recursive ...'}, ], 'orAll': [ {'... recursive ...'}, ] }, 'implicitFilterConfiguration': { 'metadataAttributes': [ { 'key': 'string', 'type': 'STRING'|'NUMBER'|'BOOLEAN'|'STRING_LIST', 'description': 'string' }, ], 'modelArn': 'string' }, 'rerankingConfiguration': { 'type': 'BEDROCK_RERANKING_MODEL', 'bedrockRerankingConfiguration': { 'modelConfiguration': { 'modelArn': 'string', 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None } }, 'numberOfRerankedResults': 123, 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToInclude': [ { 'fieldName': 'string' }, ], 'fieldsToExclude': [ { 'fieldName': 'string' }, ] } } } } } }, 'generationConfiguration': { 'promptTemplate': { 'textPromptTemplate': 'string' }, 'guardrailConfiguration': { 'guardrailId': 'string', 'guardrailVersion': 'string' }, 'kbInferenceConfig': { 'textInferenceConfig': { 'temperature': ..., 'topP': ..., 'maxTokens': 123, 'stopSequences': [ 'string', ] } }, 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None } }, 'orchestrationConfiguration': { 'queryTransformationConfiguration': { 'type': 'QUERY_DECOMPOSITION' } } }, 'externalSourcesConfiguration': { 'modelArn': 'string', 'sources': [ { 'sourceType': 'S3'|'BYTE_CONTENT', 's3Location': { 'uri': 'string' }, 'byteContent': { 'identifier': 'string', 'contentType': 'string', 'data': b'bytes' } }, ], 'generationConfiguration': { 'promptTemplate': { 'textPromptTemplate': 'string' }, 'guardrailConfiguration': { 'guardrailId': 'string', 'guardrailVersion': 'string' }, 'kbInferenceConfig': { 'textInferenceConfig': { 'temperature': ..., 'topP': ..., 'maxTokens': 123, 'stopSequences': [ 'string', ] } }, 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None } } } } }, 'precomputedRagSourceConfig': { 'retrieveSourceConfig': { 'ragSourceIdentifier': 'string' }, 'retrieveAndGenerateSourceConfig': { 'ragSourceIdentifier': 'string' } } }, ] }, outputDataConfig={ 's3Uri': 'string' } ) Parameters: * **jobName** (*string*) -- **[REQUIRED]** A name for the evaluation job. Names must unique with your Amazon Web Services account, and your account's Amazon Web Services region. * **jobDescription** (*string*) -- A description of the evaluation job. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **roleArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock can assume to perform tasks on your behalf. To learn more about the required permissions, see Required permissions for model evaluations. * **customerEncryptionKeyId** (*string*) -- Specify your customer managed encryption key Amazon Resource Name (ARN) that will be used to encrypt your evaluation job. * **jobTags** (*list*) -- Tags to attach to the model evaluation job. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. * **applicationType** (*string*) -- Specifies whether the evaluation job is for evaluating a model or evaluating a knowledge base (retrieval and response generation). * **evaluationConfig** (*dict*) -- **[REQUIRED]** Contains the configuration details of either an automated or human-based evaluation job. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "automated", "human". * **automated** *(dict) --* Contains the configuration details of an automated evaluation job that computes metrics. * **datasetMetricConfigs** *(list) --* **[REQUIRED]** Configuration details of the prompt datasets and metrics you want to use for your evaluation job. * *(dict) --* Defines the prompt datasets, built-in metric names and custom metric names, and the task type. * **taskType** *(string) --* **[REQUIRED]** The the type of task you want to evaluate for your evaluation job. This applies only to model evaluation jobs and is ignored for knowledge base evaluation jobs. * **dataset** *(dict) --* **[REQUIRED]** Specifies the prompt dataset. * **name** *(string) --* **[REQUIRED]** Used to specify supported built-in prompt datasets. Valid values are "Builtin.Bold", "Builtin.BoolQ", "Builtin.NaturalQuestions", "Builtin.Gigaword", "Builtin.RealToxicityPrompts", "Builtin.TriviaQA", "Builtin.T-Rex", "Builtin.WomensEcommerceClothingReviews" and "Builtin.Wikitext2". * **datasetLocation** *(dict) --* For custom prompt datasets, you must specify the location in Amazon S3 where the prompt dataset is saved. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "s3Uri". * **s3Uri** *(string) --* The S3 URI of the S3 bucket specified in the job. * **metricNames** *(list) --* **[REQUIRED]** The names of the metrics you want to use for your evaluation job. For knowledge base evaluation jobs that evaluate retrieval only, valid values are " "Builtin.ContextRelevance"", " "Builtin.ContextCoverage"". For knowledge base evaluation jobs that evaluate retrieval with response generation, valid values are " "Builtin.Correctness"", " "Builtin.Completeness"", " "Builtin.Helpfulness"", " "Builtin.LogicalCoherence"", " "Builtin.Faithfulness"", " "Builtin.Harmfulness"", " "Builtin.Stereotyping"", " "Builtin.Refusal"". For automated model evaluation jobs, valid values are " "Builtin.Accuracy"", " "Builtin.Robustness"", and " "Builtin.Toxicity"". In model evaluation jobs that use a LLM as judge you can specify " "Builtin.Correctness"", " "Builtin.Completeness"", " "Builtin.Faithfulness"", " "Builtin.Helpfulness"", " "Builtin.Coherence"", " "Builtin.Relevance"", " "Builtin.FollowingInstructions"", " "Builtin.ProfessionalStyleAndTone"", You can also specify the following responsible AI related metrics only for model evaluation job that use a LLM as judge " "Builtin.Harmfulness"", " "Builtin.Stereotyping"", and " "Builtin.Refusal"". For human-based model evaluation jobs, the list of strings must match the "name" parameter specified in "HumanEvaluationCustomMetric". * *(string) --* * **evaluatorModelConfig** *(dict) --* Contains the evaluator model configuration details. "EvaluatorModelConfig" is required for evaluation jobs that use a knowledge base or in model evaluation job that use a model as judge. This model computes all evaluation related metrics. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "bedrockEvaluatorModels". * **bedrockEvaluatorModels** *(list) --* The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics. * *(dict) --* The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics. * **modelIdentifier** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the evaluator model used used in knowledge base evaluation job or in model evaluation job that use a model as judge. * **customMetricConfig** *(dict) --* Defines the configuration of custom metrics to be used in an evaluation job. * **customMetrics** *(list) --* **[REQUIRED]** Defines a list of custom metrics to be used in an Amazon Bedrock evaluation job. * *(dict) --* An array item definining a single custom metric for use in an Amazon Bedrock evaluation job. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "customMetricDefinition". * **customMetricDefinition** *(dict) --* The definition of a custom metric for use in an Amazon Bedrock evaluation job. * **name** *(string) --* **[REQUIRED]** The name for a custom metric. Names must be unique in your Amazon Web Services region. * **instructions** *(string) --* **[REQUIRED]** The prompt for a custom metric that instructs the evaluator model how to rate the model or RAG source under evaluation. * **ratingScale** *(list) --* Defines the rating scale to be used for a custom metric. We recommend that you always define a ratings scale when creating a custom metric. If you don't define a scale, Amazon Bedrock won't be able to visually display the results of the evaluation in the console or calculate average values of numerical scores. For more information on specifying a rating scale, see Specifying an output schema (rating scale). * *(dict) --* Defines the value and corresponding definition for one rating in a custom metric rating scale. * **definition** *(string) --* **[REQUIRED]** Defines the definition for one rating in a custom metric rating scale. * **value** *(dict) --* **[REQUIRED]** Defines the value for one rating in a custom metric rating scale. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "stringValue", "floatValue". * **stringValue** *(string) --* A string representing the value for a rating in a custom metric rating scale. * **floatValue** *(float) --* A floating point number representing the value for a rating in a custom metric rating scale. * **evaluatorModelConfig** *(dict) --* **[REQUIRED]** Configuration of the evaluator model you want to use to evaluate custom metrics in an Amazon Bedrock evaluation job. * **bedrockEvaluatorModels** *(list) --* **[REQUIRED]** Defines the model you want to evaluate custom metrics in an Amazon Bedrock evaluation job. * *(dict) --* Defines the model you want to evaluate custom metrics in an Amazon Bedrock evaluation job. * **modelIdentifier** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the evaluator model for custom metrics. For a list of supported evaluator models, see Evaluate model performance using another LLM as a judge and Evaluate the performance of RAG sources using Amazon Bedrock evaluations. * **human** *(dict) --* Contains the configuration details of an evaluation job that uses human workers. * **humanWorkflowConfig** *(dict) --* The parameters of the human workflow. * **flowDefinitionArn** *(string) --* **[REQUIRED]** The Amazon Resource Number (ARN) for the flow definition * **instructions** *(string) --* Instructions for the flow definition * **customMetrics** *(list) --* A "HumanEvaluationCustomMetric" object. It contains the names the metrics, how the metrics are to be evaluated, an optional description. * *(dict) --* In a model evaluation job that uses human workers you must define the name of the metric, and how you want that metric rated "ratingMethod", and an optional description of the metric. * **name** *(string) --* **[REQUIRED]** The name of the metric. Your human evaluators will see this name in the evaluation UI. * **description** *(string) --* An optional description of the metric. Use this parameter to provide more details about the metric. * **ratingMethod** *(string) --* **[REQUIRED]** Choose how you want your human workers to evaluation your model. Valid values for rating methods are "ThumbsUpDown", "IndividualLikertScale", "ComparisonLikertScale", "ComparisonChoice", and "ComparisonRank" * **datasetMetricConfigs** *(list) --* **[REQUIRED]** Use to specify the metrics, task, and prompt dataset to be used in your model evaluation job. * *(dict) --* Defines the prompt datasets, built-in metric names and custom metric names, and the task type. * **taskType** *(string) --* **[REQUIRED]** The the type of task you want to evaluate for your evaluation job. This applies only to model evaluation jobs and is ignored for knowledge base evaluation jobs. * **dataset** *(dict) --* **[REQUIRED]** Specifies the prompt dataset. * **name** *(string) --* **[REQUIRED]** Used to specify supported built-in prompt datasets. Valid values are "Builtin.Bold", "Builtin.BoolQ", "Builtin.NaturalQuestions", "Builtin.Gigaword", "Builtin.RealToxicityPrompts", "Builtin.TriviaQA", "Builtin.T-Rex", "Builtin.WomensEcommerceClothingReviews" and "Builtin.Wikitext2". * **datasetLocation** *(dict) --* For custom prompt datasets, you must specify the location in Amazon S3 where the prompt dataset is saved. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "s3Uri". * **s3Uri** *(string) --* The S3 URI of the S3 bucket specified in the job. * **metricNames** *(list) --* **[REQUIRED]** The names of the metrics you want to use for your evaluation job. For knowledge base evaluation jobs that evaluate retrieval only, valid values are " "Builtin.ContextRelevance"", " "Builtin.ContextCoverage"". For knowledge base evaluation jobs that evaluate retrieval with response generation, valid values are " "Builtin.Correctness"", " "Builtin.Completeness"", " "Builtin.Helpfulness"", " "Builtin.LogicalCoherence"", " "Builtin.Faithfulness"", " "Builtin.Harmfulness"", " "Builtin.Stereotyping"", " "Builtin.Refusal"". For automated model evaluation jobs, valid values are " "Builtin.Accuracy"", " "Builtin.Robustness"", and " "Builtin.Toxicity"". In model evaluation jobs that use a LLM as judge you can specify " "Builtin.Correctness"", " "Builtin.Completeness"", " "Builtin.Faithfulness"", " "Builtin.Helpfulness"", " "Builtin.Coherence"", " "Builtin.Relevance"", " "Builtin.FollowingInstructions"", " "Builtin.ProfessionalStyleAndTone"", You can also specify the following responsible AI related metrics only for model evaluation job that use a LLM as judge " "Builtin.Harmfulness"", " "Builtin.Stereotyping"", and " "Builtin.Refusal"". For human-based model evaluation jobs, the list of strings must match the "name" parameter specified in "HumanEvaluationCustomMetric". * *(string) --* * **inferenceConfig** (*dict*) -- **[REQUIRED]** Contains the configuration details of the inference model for the evaluation job. For model evaluation jobs, automated jobs support a single model or inference profile, and jobs that use human workers support two models or inference profiles. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "models", "ragConfigs". * **models** *(list) --* Specifies the inference models. * *(dict) --* Defines the models used in the model evaluation job. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "bedrockModel", "precomputedInferenceSource". * **bedrockModel** *(dict) --* Defines the Amazon Bedrock model or inference profile and inference parameters you want used. * **modelIdentifier** *(string) --* **[REQUIRED]** The ARN of the Amazon Bedrock model or inference profile specified. * **inferenceParams** *(string) --* Each Amazon Bedrock support different inference parameters that change how the model behaves during inference. * **performanceConfig** *(dict) --* Specifies performance settings for the model or inference profile. * **latency** *(string) --* Specifies whether to use the latency-optimized or standard version of a model or inference profile. * **precomputedInferenceSource** *(dict) --* Defines the model used to generate inference response data for a model evaluation job where you provide your own inference response data. * **inferenceSourceIdentifier** *(string) --* **[REQUIRED]** A label that identifies a model used in a model evaluation job where you provide your own inference response data. * **ragConfigs** *(list) --* Contains the configuration details of the inference for a knowledge base evaluation job, including either the retrieval only configuration or the retrieval with response generation configuration. * *(dict) --* Contains configuration details for retrieval of information and response generation. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "knowledgeBaseConfig", "precomputedRagSourceConfig". * **knowledgeBaseConfig** *(dict) --* Contains configuration details for knowledge base retrieval and response generation. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "retrieveConfig", "retrieveAndGenerateConfig". * **retrieveConfig** *(dict) --* Contains configuration details for retrieving information from a knowledge base. * **knowledgeBaseId** *(string) --* **[REQUIRED]** The unique identifier of the knowledge base. * **knowledgeBaseRetrievalConfiguration** *(dict) --* **[REQUIRED]** Contains configuration details for knowledge base retrieval. * **vectorSearchConfiguration** *(dict) --* **[REQUIRED]** Contains configuration details for returning the results from the vector search. * **numberOfResults** *(integer) --* The number of text chunks to retrieve; the number of results to return. * **overrideSearchType** *(string) --* By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless vector store that contains a filterable text field, you can specify whether to query the knowledge base with a "HYBRID" search using both vector embeddings and raw text, or "SEMANTIC" search using only vector embeddings. For other vector store configurations, only "SEMANTIC" search is available. * **filter** *(dict) --* Specifies the filters to use on the metadata fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". * **equals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value matches the value in this object. The following example would return data sources with an animal attribute whose value is 'cat': ""equals": { "key": "animal", "value": "cat" }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **notEquals** *(dict) --* Knowledge base data sources that contain a metadata attribute whose name matches the key and whose value doesn't match the value in this object are returned. The following example would return data sources that don't contain an animal attribute whose value is 'cat': ""notEquals": { "key": "animal", "value": "cat" }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **greaterThan** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than the value in this object. The following example would return data sources with an year attribute whose value is greater than '1989': ""greaterThan": { "key": "year", "value": 1989 }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **greaterThanOrEquals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than or equal to the value in this object. The following example would return data sources with an year attribute whose value is greater than or equal to '1989': ""greaterThanOrEquals": { "key": "year", "value": 1989 }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **lessThan** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than the value in this object. The following example would return data sources with an year attribute whose value is less than to '1989': ""lessThan": { "key": "year", "value": 1989 }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **lessThanOrEquals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than or equal to the value in this object. The following example would return data sources with an year attribute whose value is less than or equal to '1989': ""lessThanOrEquals": { "key": "year", "value": 1989 }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **in** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is in the list specified in the value in this object. The following example would return data sources with an animal attribute that is either 'cat' or 'dog': ""in": { "key": "animal", "value": ["cat", "dog"] }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **notIn** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value isn't in the list specified in the value in this object. The following example would return data sources whose animal attribute is neither 'cat' nor 'dog': ""notIn": { "key": "animal", "value": ["cat", "dog"] }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **startsWith** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value starts with the value in this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores. The following example would return data sources with an animal attribute starts with 'ca' (for example, 'cat' or 'camel'). ""startsWith": { "key": "animal", "value": "ca" }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **listContains** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is a list that contains the value as one of its members. The following example would return data sources with an animals attribute that is a list containing a cat member (for example, "["dog", "cat"]"): ""listContains": { "key": "animals", "value": "cat" }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **stringContains** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is one of the following: A string that contains the value as a substring. The following example would return data sources with an animal attribute that contains the substring at (for example, 'cat'): ""stringContains": { "key": "animal", "value": "at" }" A list with a member that contains the value as a substring. The following example would return data sources with an animals attribute that is a list containing a member that contains the substring at (for example, "["dog", "cat"]"): ""stringContains": { "key": "animals", "value": "at" }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **andAll** *(list) --* Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list. * *(dict) --* Specifies the filters to use on the metadata attributes/fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". * **orAll** *(list) --* Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list. * *(dict) --* Specifies the filters to use on the metadata attributes/fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". * **implicitFilterConfiguration** *(dict) --* Configuration for implicit filtering in Knowledge Base vector searches. This allows the system to automatically apply filters based on the query context without requiring explicit filter expressions. * **metadataAttributes** *(list) --* **[REQUIRED]** A list of metadata attribute schemas that define the structure and properties of metadata fields used for implicit filtering. Each attribute defines a key, type, and optional description. * *(dict) --* Defines the schema for a metadata attribute used in Knowledge Base vector searches. Metadata attributes provide additional context for documents and can be used for filtering and reranking search results. * **key** *(string) --* **[REQUIRED]** The unique identifier for the metadata attribute. This key is used to reference the attribute in filter expressions and reranking configurations. * **type** *(string) --* **[REQUIRED]** The data type of the metadata attribute. The type determines how the attribute can be used in filter expressions and reranking. * **description** *(string) --* **[REQUIRED]** An optional description of the metadata attribute that provides additional context about its purpose and usage. * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the foundation model used for implicit filtering. This model processes the query to extract relevant filtering criteria. * **rerankingConfiguration** *(dict) --* Configuration for reranking search results in Knowledge Base vector searches. Reranking improves search relevance by reordering initial vector search results using more sophisticated relevance models. * **type** *(string) --* **[REQUIRED]** The type of reranking to apply to vector search results. Currently, the only supported value is BEDROCK, which uses Amazon Bedrock foundation models for reranking. * **bedrockRerankingConfiguration** *(dict) --* Configuration for using Amazon Bedrock foundation models to rerank search results. This is required when the reranking type is set to BEDROCK. * **modelConfiguration** *(dict) --* **[REQUIRED]** Configuration for the Amazon Bedrock foundation model used for reranking. This includes the model ARN and any additional request fields required by the model. * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the foundation model to use for reranking. This model processes the query and search results to determine a more relevant ordering. * **additionalModelRequestFields** *(dict) --* A list of additional fields to include in the model request during reranking. These fields provide extra context or configuration options specific to the selected foundation model. * *(string) --* * (*document*) -- * **numberOfRerankedResults** *(integer) --* The maximum number of results to rerank. This limits how many of the initial vector search results will be processed by the reranking model. A smaller number improves performance but may exclude potentially relevant results. * **metadataConfiguration** *(dict) --* Configuration for how document metadata should be used during the reranking process. This determines which metadata fields are included when reordering search results. * **selectionMode** *(string) --* **[REQUIRED]** The mode for selecting which metadata fields to include in the reranking process. Valid values are ALL (use all available metadata fields) or SELECTIVE (use only specified fields). * **selectiveModeConfiguration** *(dict) --* Configuration for selective mode, which allows you to explicitly include or exclude specific metadata fields during reranking. This is only used when selectionMode is set to SELECTIVE. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "fieldsToInclude", "fieldsToExclude". * **fieldsToInclude** *(list) --* A list of metadata field names to explicitly include in the reranking process. Only these fields will be considered when reordering search results. This parameter cannot be used together with fieldsToExclude. * *(dict) --* Specifies a field to be used during the reranking process in a Knowledge Base vector search. This structure identifies metadata fields that should be considered when reordering search results to improve relevance. * **fieldName** *(string) --* **[REQUIRED]** The name of the metadata field to be used during the reranking process. * **fieldsToExclude** *(list) --* A list of metadata field names to explicitly exclude from the reranking process. All metadata fields except these will be considered when reordering search results. This parameter cannot be used together with fieldsToInclude. * *(dict) --* Specifies a field to be used during the reranking process in a Knowledge Base vector search. This structure identifies metadata fields that should be considered when reordering search results to improve relevance. * **fieldName** *(string) --* **[REQUIRED]** The name of the metadata field to be used during the reranking process. * **retrieveAndGenerateConfig** *(dict) --* Contains configuration details for retrieving information from a knowledge base and generating responses. * **type** *(string) --* **[REQUIRED]** The type of resource that contains your data for retrieving information and generating responses. If you choose to use "EXTERNAL_SOURCES", then currently only Claude 3 Sonnet models for knowledge bases are supported. * **knowledgeBaseConfiguration** *(dict) --* Contains configuration details for the knowledge base retrieval and response generation. * **knowledgeBaseId** *(string) --* **[REQUIRED]** The unique identifier of the knowledge base. * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the foundation model or inference profile used to generate responses. * **retrievalConfiguration** *(dict) --* Contains configuration details for retrieving text chunks. * **vectorSearchConfiguration** *(dict) --* **[REQUIRED]** Contains configuration details for returning the results from the vector search. * **numberOfResults** *(integer) --* The number of text chunks to retrieve; the number of results to return. * **overrideSearchType** *(string) --* By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless vector store that contains a filterable text field, you can specify whether to query the knowledge base with a "HYBRID" search using both vector embeddings and raw text, or "SEMANTIC" search using only vector embeddings. For other vector store configurations, only "SEMANTIC" search is available. * **filter** *(dict) --* Specifies the filters to use on the metadata fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". * **equals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value matches the value in this object. The following example would return data sources with an animal attribute whose value is 'cat': ""equals": { "key": "animal", "value": "cat" }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **notEquals** *(dict) --* Knowledge base data sources that contain a metadata attribute whose name matches the key and whose value doesn't match the value in this object are returned. The following example would return data sources that don't contain an animal attribute whose value is 'cat': ""notEquals": { "key": "animal", "value": "cat" }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **greaterThan** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than the value in this object. The following example would return data sources with an year attribute whose value is greater than '1989': ""greaterThan": { "key": "year", "value": 1989 }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **greaterThanOrEquals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than or equal to the value in this object. The following example would return data sources with an year attribute whose value is greater than or equal to '1989': ""greaterThanOrEquals": { "key": "year", "value": 1989 }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **lessThan** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than the value in this object. The following example would return data sources with an year attribute whose value is less than to '1989': ""lessThan": { "key": "year", "value": 1989 }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **lessThanOrEquals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than or equal to the value in this object. The following example would return data sources with an year attribute whose value is less than or equal to '1989': ""lessThanOrEquals": { "key": "year", "value": 1989 }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **in** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is in the list specified in the value in this object. The following example would return data sources with an animal attribute that is either 'cat' or 'dog': ""in": { "key": "animal", "value": ["cat", "dog"] }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **notIn** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value isn't in the list specified in the value in this object. The following example would return data sources whose animal attribute is neither 'cat' nor 'dog': ""notIn": { "key": "animal", "value": ["cat", "dog"] }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **startsWith** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value starts with the value in this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores. The following example would return data sources with an animal attribute starts with 'ca' (for example, 'cat' or 'camel'). ""startsWith": { "key": "animal", "value": "ca" }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **listContains** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is a list that contains the value as one of its members. The following example would return data sources with an animals attribute that is a list containing a cat member (for example, "["dog", "cat"]"): ""listContains": { "key": "animals", "value": "cat" }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **stringContains** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is one of the following: A string that contains the value as a substring. The following example would return data sources with an animal attribute that contains the substring at (for example, 'cat'): ""stringContains": { "key": "animal", "value": "at" }" A list with a member that contains the value as a substring. The following example would return data sources with an animals attribute that is a list containing a member that contains the substring at (for example, "["dog", "cat"]"): ""stringContains": { "key": "animals", "value": "at" }" * **key** *(string) --* **[REQUIRED]** The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- **[REQUIRED]** The value of the metadata attribute/field. * **andAll** *(list) --* Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list. * *(dict) --* Specifies the filters to use on the metadata attributes/fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". * **orAll** *(list) --* Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list. * *(dict) --* Specifies the filters to use on the metadata attributes/fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". * **implicitFilterConfiguration** *(dict) --* Configuration for implicit filtering in Knowledge Base vector searches. This allows the system to automatically apply filters based on the query context without requiring explicit filter expressions. * **metadataAttributes** *(list) --* **[REQUIRED]** A list of metadata attribute schemas that define the structure and properties of metadata fields used for implicit filtering. Each attribute defines a key, type, and optional description. * *(dict) --* Defines the schema for a metadata attribute used in Knowledge Base vector searches. Metadata attributes provide additional context for documents and can be used for filtering and reranking search results. * **key** *(string) --* **[REQUIRED]** The unique identifier for the metadata attribute. This key is used to reference the attribute in filter expressions and reranking configurations. * **type** *(string) --* **[REQUIRED]** The data type of the metadata attribute. The type determines how the attribute can be used in filter expressions and reranking. * **description** *(string) --* **[REQUIRED]** An optional description of the metadata attribute that provides additional context about its purpose and usage. * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the foundation model used for implicit filtering. This model processes the query to extract relevant filtering criteria. * **rerankingConfiguration** *(dict) --* Configuration for reranking search results in Knowledge Base vector searches. Reranking improves search relevance by reordering initial vector search results using more sophisticated relevance models. * **type** *(string) --* **[REQUIRED]** The type of reranking to apply to vector search results. Currently, the only supported value is BEDROCK, which uses Amazon Bedrock foundation models for reranking. * **bedrockRerankingConfiguration** *(dict) --* Configuration for using Amazon Bedrock foundation models to rerank search results. This is required when the reranking type is set to BEDROCK. * **modelConfiguration** *(dict) --* **[REQUIRED]** Configuration for the Amazon Bedrock foundation model used for reranking. This includes the model ARN and any additional request fields required by the model. * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the foundation model to use for reranking. This model processes the query and search results to determine a more relevant ordering. * **additionalModelRequestFields** *(dict) --* A list of additional fields to include in the model request during reranking. These fields provide extra context or configuration options specific to the selected foundation model. * *(string) --* * (*document*) -- * **numberOfRerankedResults** *(integer) --* The maximum number of results to rerank. This limits how many of the initial vector search results will be processed by the reranking model. A smaller number improves performance but may exclude potentially relevant results. * **metadataConfiguration** *(dict) --* Configuration for how document metadata should be used during the reranking process. This determines which metadata fields are included when reordering search results. * **selectionMode** *(string) --* **[REQUIRED]** The mode for selecting which metadata fields to include in the reranking process. Valid values are ALL (use all available metadata fields) or SELECTIVE (use only specified fields). * **selectiveModeConfiguration** *(dict) --* Configuration for selective mode, which allows you to explicitly include or exclude specific metadata fields during reranking. This is only used when selectionMode is set to SELECTIVE. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "fieldsToInclude", "fieldsToExclude". * **fieldsToInclude** *(list) --* A list of metadata field names to explicitly include in the reranking process. Only these fields will be considered when reordering search results. This parameter cannot be used together with fieldsToExclude. * *(dict) --* Specifies a field to be used during the reranking process in a Knowledge Base vector search. This structure identifies metadata fields that should be considered when reordering search results to improve relevance. * **fieldName** *(string) --* **[REQUIRED]** The name of the metadata field to be used during the reranking process. * **fieldsToExclude** *(list) --* A list of metadata field names to explicitly exclude from the reranking process. All metadata fields except these will be considered when reordering search results. This parameter cannot be used together with fieldsToInclude. * *(dict) --* Specifies a field to be used during the reranking process in a Knowledge Base vector search. This structure identifies metadata fields that should be considered when reordering search results to improve relevance. * **fieldName** *(string) --* **[REQUIRED]** The name of the metadata field to be used during the reranking process. * **generationConfiguration** *(dict) --* Contains configurations details for response generation based on retrieved text chunks. * **promptTemplate** *(dict) --* Contains the template for the prompt that's sent to the model for response generation. * **textPromptTemplate** *(string) --* The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template. For more information, see Knowledge base prompt template and Use XML tags with Anthropic Claude models. * **guardrailConfiguration** *(dict) --* Contains configuration details for the guardrail. * **guardrailId** *(string) --* **[REQUIRED]** The unique identifier for the guardrail. * **guardrailVersion** *(string) --* **[REQUIRED]** The version of the guardrail. * **kbInferenceConfig** *(dict) --* Contains configuration details for inference for knowledge base retrieval and response generation. * **textInferenceConfig** *(dict) --* Contains configuration details for text generation using a language model via the "RetrieveAndGenerate" function. * **temperature** *(float) --* Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable. * **topP** *(float) --* A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token. * **maxTokens** *(integer) --* The maximum number of tokens to generate in the output text. Do not use the minimum of 0 or the maximum of 65536. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model. * **stopSequences** *(list) --* A list of sequences of characters that, if generated, will cause the model to stop generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model. * *(string) --* * **additionalModelRequestFields** *(dict) --* Additional model parameters and corresponding values not included in the "textInferenceConfig" structure for a knowledge base. This allows you to provide custom model parameters specific to the language model being used. * *(string) --* * (*document*) -- * **orchestrationConfiguration** *(dict) --* Contains configuration details for the model to process the prompt prior to retrieval and response generation. * **queryTransformationConfiguration** *(dict) --* **[REQUIRED]** Contains configuration details for transforming the prompt. * **type** *(string) --* **[REQUIRED]** The type of transformation to apply to the prompt. * **externalSourcesConfiguration** *(dict) --* The configuration for the external source wrapper object in the "retrieveAndGenerate" function. * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the foundation model or inference profile used to generate responses. * **sources** *(list) --* **[REQUIRED]** The document for the external source wrapper object in the "retrieveAndGenerate" function. * *(dict) --* The unique external source of the content contained in the wrapper object. * **sourceType** *(string) --* **[REQUIRED]** The source type of the external source wrapper object. * **s3Location** *(dict) --* The S3 location of the external source wrapper object. * **uri** *(string) --* **[REQUIRED]** The S3 URI location for the wrapper object of the document. * **byteContent** *(dict) --* The identifier, content type, and data of the external source wrapper object. * **identifier** *(string) --* **[REQUIRED]** The file name of the document contained in the wrapper object. * **contentType** *(string) --* **[REQUIRED]** The MIME type of the document contained in the wrapper object. * **data** *(bytes) --* **[REQUIRED]** The byte value of the file to upload, encoded as a Base-64 string. * **generationConfiguration** *(dict) --* Contains configurations details for response generation based on retrieved text chunks. * **promptTemplate** *(dict) --* Contains the template for the prompt for the external source wrapper object. * **textPromptTemplate** *(string) --* The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template. For more information, see Knowledge base prompt template and Use XML tags with Anthropic Claude models. * **guardrailConfiguration** *(dict) --* Configuration details for the guardrail. * **guardrailId** *(string) --* **[REQUIRED]** The unique identifier for the guardrail. * **guardrailVersion** *(string) --* **[REQUIRED]** The version of the guardrail. * **kbInferenceConfig** *(dict) --* Configuration details for inference when using "RetrieveAndGenerate" to generate responses while using an external source. * **textInferenceConfig** *(dict) --* Contains configuration details for text generation using a language model via the "RetrieveAndGenerate" function. * **temperature** *(float) --* Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable. * **topP** *(float) --* A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token. * **maxTokens** *(integer) --* The maximum number of tokens to generate in the output text. Do not use the minimum of 0 or the maximum of 65536. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model. * **stopSequences** *(list) --* A list of sequences of characters that, if generated, will cause the model to stop generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model. * *(string) --* * **additionalModelRequestFields** *(dict) --* Additional model parameters and their corresponding values not included in the text inference configuration for an external source. Takes in custom model parameters specific to the language model being used. * *(string) --* * (*document*) -- * **precomputedRagSourceConfig** *(dict) --* Contains configuration details about the RAG source used to generate inference response data for a Knowledge Base evaluation job. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "retrieveSourceConfig", "retrieveAndGenerateSourceConfig". * **retrieveSourceConfig** *(dict) --* A summary of a RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data. * **ragSourceIdentifier** *(string) --* **[REQUIRED]** A label that identifies the RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data. * **retrieveAndGenerateSourceConfig** *(dict) --* A summary of a RAG source used for a retrieve-and- generate Knowledge Base evaluation job where you provide your own inference response data. * **ragSourceIdentifier** *(string) --* **[REQUIRED]** A label that identifies the RAG source used for a retrieve-and-generate Knowledge Base evaluation job where you provide your own inference response data. * **outputDataConfig** (*dict*) -- **[REQUIRED]** Contains the configuration details of the Amazon S3 bucket for storing the results of the evaluation job. * **s3Uri** *(string) --* **[REQUIRED]** The Amazon S3 URI where the results of the evaluation job are saved. Return type: dict Returns: **Response Syntax** { 'jobArn': 'string' } **Response Structure** * *(dict) --* * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the evaluation job. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / cancel_automated_reasoning_policy_build_workflow cancel_automated_reasoning_policy_build_workflow ************************************************ Bedrock.Client.cancel_automated_reasoning_policy_build_workflow(**kwargs) Cancels a running Automated Reasoning policy build workflow. This stops the policy generation process and prevents further processing of the source documents. See also: AWS API Documentation **Request Syntax** response = client.cancel_automated_reasoning_policy_build_workflow( policyArn='string', buildWorkflowId='string' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflow you want to cancel. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The unique identifier of the build workflow to cancel. You can get this ID from the StartAutomatedReasoningPolicyBuildWorkflow response or by listing build workflows. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_model_customization_job get_model_customization_job *************************** Bedrock.Client.get_model_customization_job(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.get_model_customization_job( jobIdentifier='string' ) Parameters: **jobIdentifier** (*string*) -- **[REQUIRED]** Identifier for the customization job. Return type: dict Returns: **Response Syntax** { 'jobArn': 'string', 'jobName': 'string', 'outputModelName': 'string', 'outputModelArn': 'string', 'clientRequestToken': 'string', 'roleArn': 'string', 'status': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped', 'statusDetails': { 'validationDetails': { 'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) }, 'dataProcessingDetails': { 'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) }, 'trainingDetails': { 'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) } }, 'failureMessage': 'string', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'baseModelArn': 'string', 'hyperParameters': { 'string': 'string' }, 'trainingDataConfig': { 's3Uri': 'string', 'invocationLogsConfig': { 'usePromptResponse': True|False, 'invocationLogSource': { 's3Uri': 'string' }, 'requestMetadataFilters': { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' }, 'andAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ], 'orAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ] } } }, 'validationDataConfig': { 'validators': [ { 's3Uri': 'string' }, ] }, 'outputDataConfig': { 's3Uri': 'string' }, 'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION'|'IMPORTED', 'outputModelKmsKeyArn': 'string', 'trainingMetrics': { 'trainingLoss': ... }, 'validationMetrics': [ { 'validationLoss': ... }, ], 'vpcConfig': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, 'customizationConfig': { 'distillationConfig': { 'teacherModelConfig': { 'teacherModelIdentifier': 'string', 'maxResponseLengthForInference': 123 } } } } **Response Structure** * *(dict) --* * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the customization job. * **jobName** *(string) --* The name of the customization job. * **outputModelName** *(string) --* The name of the output model. * **outputModelArn** *(string) --* The Amazon Resource Name (ARN) of the output model. * **clientRequestToken** *(string) --* The token that you specified in the "CreateCustomizationJob" request. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role. * **status** *(string) --* The status of the job. A successful job transitions from in- progress to completed when the output model is ready to use. If the job failed, the failure message contains information about why the job failed. * **statusDetails** *(dict) --* For a Distillation job, the details about the statuses of the sub-tasks of the customization job. * **validationDetails** *(dict) --* The status details for the validation sub-task of the job. * **status** *(string) --* The status of the validation sub-task of the job. * **creationTime** *(datetime) --* The start time of the validation sub-task of the job. * **lastModifiedTime** *(datetime) --* The latest update to the validation sub-task of the job. * **dataProcessingDetails** *(dict) --* The status details for the data processing sub-task of the job. * **status** *(string) --* The status of the data processing sub-task of the job. * **creationTime** *(datetime) --* The start time of the data processing sub-task of the job. * **lastModifiedTime** *(datetime) --* The latest update to the data processing sub-task of the job. * **trainingDetails** *(dict) --* The status details for the training sub-task of the job. * **status** *(string) --* The status of the training sub-task of the job. * **creationTime** *(datetime) --* The start time of the training sub-task of the job. * **lastModifiedTime** *(datetime) --* The latest update to the training sub-task of the job. * **failureMessage** *(string) --* Information about why the job failed. * **creationTime** *(datetime) --* Time that the resource was created. * **lastModifiedTime** *(datetime) --* Time that the resource was last modified. * **endTime** *(datetime) --* Time that the resource transitioned to terminal state. * **baseModelArn** *(string) --* Amazon Resource Name (ARN) of the base model. * **hyperParameters** *(dict) --* The hyperparameter values for the job. For details on the format for different models, see Custom model hyperparameters. * *(string) --* * *(string) --* * **trainingDataConfig** *(dict) --* Contains information about the training dataset. * **s3Uri** *(string) --* The S3 URI where the training data is stored. * **invocationLogsConfig** *(dict) --* Settings for using invocation logs to customize a model. * **usePromptResponse** *(boolean) --* Whether to use the model's response for training, or just the prompt. The default value is "False". * **invocationLogSource** *(dict) --* The source of the invocation logs. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3Uri". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3Uri** *(string) --* The URI of an invocation log in a bucket. * **requestMetadataFilters** *(dict) --* Rules for filtering invocation logs based on request metadata. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "equals", "notEquals", "andAll", "orAll". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **equals** *(dict) --* Include results where the key equals the value. * *(string) --* * *(string) --* * **notEquals** *(dict) --* Include results where the key does not equal the value. * *(string) --* * *(string) --* * **andAll** *(list) --* Include results where all of the based filters match. * *(dict) --* A mapping of a metadata key to a value that it should or should not equal. * **equals** *(dict) --* Include results where the key equals the value. * *(string) --* * *(string) --* * **notEquals** *(dict) --* Include results where the key does not equal the value. * *(string) --* * *(string) --* * **orAll** *(list) --* Include results where any of the base filters match. * *(dict) --* A mapping of a metadata key to a value that it should or should not equal. * **equals** *(dict) --* Include results where the key equals the value. * *(string) --* * *(string) --* * **notEquals** *(dict) --* Include results where the key does not equal the value. * *(string) --* * *(string) --* * **validationDataConfig** *(dict) --* Contains information about the validation dataset. * **validators** *(list) --* Information about the validators. * *(dict) --* Information about a validator. * **s3Uri** *(string) --* The S3 URI where the validation data is stored. * **outputDataConfig** *(dict) --* Output data configuration * **s3Uri** *(string) --* The S3 URI where the output data is stored. * **customizationType** *(string) --* The type of model customization. * **outputModelKmsKeyArn** *(string) --* The custom model is encrypted at rest using this key. * **trainingMetrics** *(dict) --* Contains training metrics from the job creation. * **trainingLoss** *(float) --* Loss metric associated with the custom job. * **validationMetrics** *(list) --* The loss metric for each validator that you provided in the createjob request. * *(dict) --* The metric for the validator. * **validationLoss** *(float) --* The validation loss associated with this validator. * **vpcConfig** *(dict) --* VPC configuration for the custom model job. * **subnetIds** *(list) --* An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* An array of IDs for each security group in the VPC to use. * *(string) --* * **customizationConfig** *(dict) --* The customization configuration for the model customization job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "distillationConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **distillationConfig** *(dict) --* The Distillation configuration for the custom model. * **teacherModelConfig** *(dict) --* The teacher model configuration. * **teacherModelIdentifier** *(string) --* The identifier of the teacher model. * **maxResponseLengthForInference** *(integer) --* The maximum number of tokens requested when the customization job invokes the teacher model. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_automated_reasoning_policy get_automated_reasoning_policy ****************************** Bedrock.Client.get_automated_reasoning_policy(**kwargs) Retrieves details about an Automated Reasoning policy or policy version. Returns information including the policy definition, metadata, and timestamps. See also: AWS API Documentation **Request Syntax** response = client.get_automated_reasoning_policy( policyArn='string' ) Parameters: **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy to retrieve. Can be either the unversioned ARN for the draft policy or an ARN for a specific policy version. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'name': 'string', 'version': 'string', 'policyId': 'string', 'description': 'string', 'definitionHash': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the policy. * **name** *(string) --* The name of the policy. * **version** *(string) --* The version of the policy. * **policyId** *(string) --* The unique identifier of the policy. * **description** *(string) --* The description of the policy. * **definitionHash** *(string) --* The hash of the policy definition used as a concurrency token. * **createdAt** *(datetime) --* The timestamp when the policy was created. * **updatedAt** *(datetime) --* The timestamp when the policy was last updated. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_model_customization_job create_model_customization_job ****************************** Bedrock.Client.create_model_customization_job(**kwargs) 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 "GetModelCustomizationJob" operation to retrieve the job status. For more information, see Custom models in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.create_model_customization_job( jobName='string', customModelName='string', roleArn='string', clientRequestToken='string', baseModelIdentifier='string', customizationType='FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION'|'IMPORTED', customModelKmsKeyId='string', jobTags=[ { 'key': 'string', 'value': 'string' }, ], customModelTags=[ { 'key': 'string', 'value': 'string' }, ], trainingDataConfig={ 's3Uri': 'string', 'invocationLogsConfig': { 'usePromptResponse': True|False, 'invocationLogSource': { 's3Uri': 'string' }, 'requestMetadataFilters': { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' }, 'andAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ], 'orAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ] } } }, validationDataConfig={ 'validators': [ { 's3Uri': 'string' }, ] }, outputDataConfig={ 's3Uri': 'string' }, hyperParameters={ 'string': 'string' }, vpcConfig={ 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, customizationConfig={ 'distillationConfig': { 'teacherModelConfig': { 'teacherModelIdentifier': 'string', 'maxResponseLengthForInference': 123 } } } ) Parameters: * **jobName** (*string*) -- **[REQUIRED]** A name for the fine-tuning job. * **customModelName** (*string*) -- **[REQUIRED]** A name for the resulting custom model. * **roleArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock can assume to perform tasks on your behalf. For example, during model training, Amazon Bedrock needs your permission to read input data from an S3 bucket, write model artifacts to an S3 bucket. To pass this role to Amazon Bedrock, the caller of this API must have the "iam:PassRole" permission. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **baseModelIdentifier** (*string*) -- **[REQUIRED]** Name of the base model. * **customizationType** (*string*) -- The customization type. * **customModelKmsKeyId** (*string*) -- The custom model is encrypted at rest using this key. * **jobTags** (*list*) -- Tags to attach to the job. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. * **customModelTags** (*list*) -- Tags to attach to the resulting custom model. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. * **trainingDataConfig** (*dict*) -- **[REQUIRED]** Information about the training dataset. * **s3Uri** *(string) --* The S3 URI where the training data is stored. * **invocationLogsConfig** *(dict) --* Settings for using invocation logs to customize a model. * **usePromptResponse** *(boolean) --* Whether to use the model's response for training, or just the prompt. The default value is "False". * **invocationLogSource** *(dict) --* **[REQUIRED]** The source of the invocation logs. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "s3Uri". * **s3Uri** *(string) --* The URI of an invocation log in a bucket. * **requestMetadataFilters** *(dict) --* Rules for filtering invocation logs based on request metadata. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "equals", "notEquals", "andAll", "orAll". * **equals** *(dict) --* Include results where the key equals the value. * *(string) --* * *(string) --* * **notEquals** *(dict) --* Include results where the key does not equal the value. * *(string) --* * *(string) --* * **andAll** *(list) --* Include results where all of the based filters match. * *(dict) --* A mapping of a metadata key to a value that it should or should not equal. * **equals** *(dict) --* Include results where the key equals the value. * *(string) --* * *(string) --* * **notEquals** *(dict) --* Include results where the key does not equal the value. * *(string) --* * *(string) --* * **orAll** *(list) --* Include results where any of the base filters match. * *(dict) --* A mapping of a metadata key to a value that it should or should not equal. * **equals** *(dict) --* Include results where the key equals the value. * *(string) --* * *(string) --* * **notEquals** *(dict) --* Include results where the key does not equal the value. * *(string) --* * *(string) --* * **validationDataConfig** (*dict*) -- Information about the validation dataset. * **validators** *(list) --* **[REQUIRED]** Information about the validators. * *(dict) --* Information about a validator. * **s3Uri** *(string) --* **[REQUIRED]** The S3 URI where the validation data is stored. * **outputDataConfig** (*dict*) -- **[REQUIRED]** S3 location for the output data. * **s3Uri** *(string) --* **[REQUIRED]** The S3 URI where the output data is stored. * **hyperParameters** (*dict*) -- Parameters related to tuning the model. For details on the format for different models, see Custom model hyperparameters. * *(string) --* * *(string) --* * **vpcConfig** (*dict*) -- The configuration of the Virtual Private Cloud (VPC) that contains the resources that you're using for this job. For more information, see Protect your model customization jobs using a VPC. * **subnetIds** *(list) --* **[REQUIRED]** An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* **[REQUIRED]** An array of IDs for each security group in the VPC to use. * *(string) --* * **customizationConfig** (*dict*) -- The customization configuration for the model customization job. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "distillationConfig". * **distillationConfig** *(dict) --* The Distillation configuration for the custom model. * **teacherModelConfig** *(dict) --* **[REQUIRED]** The teacher model configuration. * **teacherModelIdentifier** *(string) --* **[REQUIRED]** The identifier of the teacher model. * **maxResponseLengthForInference** *(integer) --* The maximum number of tokens requested when the customization job invokes the teacher model. Return type: dict Returns: **Response Syntax** { 'jobArn': 'string' } **Response Structure** * *(dict) --* * **jobArn** *(string) --* Amazon Resource Name (ARN) of the fine tuning job **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_inference_profile get_inference_profile ********************* Bedrock.Client.get_inference_profile(**kwargs) Gets information about an inference profile. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.get_inference_profile( inferenceProfileIdentifier='string' ) Parameters: **inferenceProfileIdentifier** (*string*) -- **[REQUIRED]** The ID or Amazon Resource Name (ARN) of the inference profile. Return type: dict Returns: **Response Syntax** { 'inferenceProfileName': 'string', 'description': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'inferenceProfileArn': 'string', 'models': [ { 'modelArn': 'string' }, ], 'inferenceProfileId': 'string', 'status': 'ACTIVE', 'type': 'SYSTEM_DEFINED'|'APPLICATION' } **Response Structure** * *(dict) --* * **inferenceProfileName** *(string) --* The name of the inference profile. * **description** *(string) --* The description of the inference profile. * **createdAt** *(datetime) --* The time at which the inference profile was created. * **updatedAt** *(datetime) --* The time at which the inference profile was last updated. * **inferenceProfileArn** *(string) --* The Amazon Resource Name (ARN) of the inference profile. * **models** *(list) --* A list of information about each model in the inference profile. * *(dict) --* Contains information about a model. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the model. * **inferenceProfileId** *(string) --* The unique identifier of the inference profile. * **status** *(string) --* The status of the inference profile. "ACTIVE" means that the inference profile is ready to be used. * **type** *(string) --* The type of the inference profile. The following types are possible: * "SYSTEM_DEFINED" – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles. * "APPLICATION" – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_automated_reasoning_policy_build_workflow get_automated_reasoning_policy_build_workflow ********************************************* Bedrock.Client.get_automated_reasoning_policy_build_workflow(**kwargs) Retrieves detailed information about an Automated Reasoning policy build workflow, including its status, configuration, and metadata. See also: AWS API Documentation **Request Syntax** response = client.get_automated_reasoning_policy_build_workflow( policyArn='string', buildWorkflowId='string' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflow you want to retrieve. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The unique identifier of the build workflow to retrieve. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'buildWorkflowId': 'string', 'status': 'SCHEDULED'|'CANCEL_REQUESTED'|'PREPROCESSING'|'BUILDING'|'TESTING'|'COMPLETED'|'FAILED'|'CANCELLED', 'buildWorkflowType': 'INGEST_CONTENT'|'REFINE_POLICY'|'IMPORT_POLICY', 'documentName': 'string', 'documentContentType': 'pdf'|'txt', 'documentDescription': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy. * **buildWorkflowId** *(string) --* The unique identifier of the build workflow. * **status** *(string) --* The current status of the build workflow (e.g., RUNNING, COMPLETED, FAILED, CANCELLED). * **buildWorkflowType** *(string) --* The type of build workflow being executed (e.g., DOCUMENT_INGESTION, POLICY_REPAIR). * **documentName** *(string) --* The name of the source document used in the build workflow. * **documentContentType** *(string) --* The content type of the source document (e.g., text/plain, application/pdf). * **documentDescription** *(string) --* A detailed description of the document's content and how it should be used in the policy generation process. * **createdAt** *(datetime) --* The timestamp when the build workflow was created. * **updatedAt** *(datetime) --* The timestamp when the build workflow was last updated. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_evaluation_job get_evaluation_job ****************** Bedrock.Client.get_evaluation_job(**kwargs) Gets information about an evaluation job, such as the status of the job. See also: AWS API Documentation **Request Syntax** response = client.get_evaluation_job( jobIdentifier='string' ) Parameters: **jobIdentifier** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the evaluation job you want get information on. Return type: dict Returns: **Response Syntax** { 'jobName': 'string', 'status': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'Deleting', 'jobArn': 'string', 'jobDescription': 'string', 'roleArn': 'string', 'customerEncryptionKeyId': 'string', 'jobType': 'Human'|'Automated', 'applicationType': 'ModelEvaluation'|'RagEvaluation', 'evaluationConfig': { 'automated': { 'datasetMetricConfigs': [ { 'taskType': 'Summarization'|'Classification'|'QuestionAndAnswer'|'Generation'|'Custom', 'dataset': { 'name': 'string', 'datasetLocation': { 's3Uri': 'string' } }, 'metricNames': [ 'string', ] }, ], 'evaluatorModelConfig': { 'bedrockEvaluatorModels': [ { 'modelIdentifier': 'string' }, ] }, 'customMetricConfig': { 'customMetrics': [ { 'customMetricDefinition': { 'name': 'string', 'instructions': 'string', 'ratingScale': [ { 'definition': 'string', 'value': { 'stringValue': 'string', 'floatValue': ... } }, ] } }, ], 'evaluatorModelConfig': { 'bedrockEvaluatorModels': [ { 'modelIdentifier': 'string' }, ] } } }, 'human': { 'humanWorkflowConfig': { 'flowDefinitionArn': 'string', 'instructions': 'string' }, 'customMetrics': [ { 'name': 'string', 'description': 'string', 'ratingMethod': 'string' }, ], 'datasetMetricConfigs': [ { 'taskType': 'Summarization'|'Classification'|'QuestionAndAnswer'|'Generation'|'Custom', 'dataset': { 'name': 'string', 'datasetLocation': { 's3Uri': 'string' } }, 'metricNames': [ 'string', ] }, ] } }, 'inferenceConfig': { 'models': [ { 'bedrockModel': { 'modelIdentifier': 'string', 'inferenceParams': 'string', 'performanceConfig': { 'latency': 'standard'|'optimized' } }, 'precomputedInferenceSource': { 'inferenceSourceIdentifier': 'string' } }, ], 'ragConfigs': [ { 'knowledgeBaseConfig': { 'retrieveConfig': { 'knowledgeBaseId': 'string', 'knowledgeBaseRetrievalConfiguration': { 'vectorSearchConfiguration': { 'numberOfResults': 123, 'overrideSearchType': 'HYBRID'|'SEMANTIC', 'filter': { 'equals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'notEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'greaterThan': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'greaterThanOrEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'lessThan': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'lessThanOrEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'in': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'notIn': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'startsWith': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'listContains': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'stringContains': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'andAll': [ {'... recursive ...'}, ], 'orAll': [ {'... recursive ...'}, ] }, 'implicitFilterConfiguration': { 'metadataAttributes': [ { 'key': 'string', 'type': 'STRING'|'NUMBER'|'BOOLEAN'|'STRING_LIST', 'description': 'string' }, ], 'modelArn': 'string' }, 'rerankingConfiguration': { 'type': 'BEDROCK_RERANKING_MODEL', 'bedrockRerankingConfiguration': { 'modelConfiguration': { 'modelArn': 'string', 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None } }, 'numberOfRerankedResults': 123, 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToInclude': [ { 'fieldName': 'string' }, ], 'fieldsToExclude': [ { 'fieldName': 'string' }, ] } } } } } } }, 'retrieveAndGenerateConfig': { 'type': 'KNOWLEDGE_BASE'|'EXTERNAL_SOURCES', 'knowledgeBaseConfiguration': { 'knowledgeBaseId': 'string', 'modelArn': 'string', 'retrievalConfiguration': { 'vectorSearchConfiguration': { 'numberOfResults': 123, 'overrideSearchType': 'HYBRID'|'SEMANTIC', 'filter': { 'equals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'notEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'greaterThan': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'greaterThanOrEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'lessThan': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'lessThanOrEquals': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'in': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'notIn': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'startsWith': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'listContains': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'stringContains': { 'key': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None }, 'andAll': [ {'... recursive ...'}, ], 'orAll': [ {'... recursive ...'}, ] }, 'implicitFilterConfiguration': { 'metadataAttributes': [ { 'key': 'string', 'type': 'STRING'|'NUMBER'|'BOOLEAN'|'STRING_LIST', 'description': 'string' }, ], 'modelArn': 'string' }, 'rerankingConfiguration': { 'type': 'BEDROCK_RERANKING_MODEL', 'bedrockRerankingConfiguration': { 'modelConfiguration': { 'modelArn': 'string', 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None } }, 'numberOfRerankedResults': 123, 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToInclude': [ { 'fieldName': 'string' }, ], 'fieldsToExclude': [ { 'fieldName': 'string' }, ] } } } } } }, 'generationConfiguration': { 'promptTemplate': { 'textPromptTemplate': 'string' }, 'guardrailConfiguration': { 'guardrailId': 'string', 'guardrailVersion': 'string' }, 'kbInferenceConfig': { 'textInferenceConfig': { 'temperature': ..., 'topP': ..., 'maxTokens': 123, 'stopSequences': [ 'string', ] } }, 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None } }, 'orchestrationConfiguration': { 'queryTransformationConfiguration': { 'type': 'QUERY_DECOMPOSITION' } } }, 'externalSourcesConfiguration': { 'modelArn': 'string', 'sources': [ { 'sourceType': 'S3'|'BYTE_CONTENT', 's3Location': { 'uri': 'string' }, 'byteContent': { 'identifier': 'string', 'contentType': 'string', 'data': b'bytes' } }, ], 'generationConfiguration': { 'promptTemplate': { 'textPromptTemplate': 'string' }, 'guardrailConfiguration': { 'guardrailId': 'string', 'guardrailVersion': 'string' }, 'kbInferenceConfig': { 'textInferenceConfig': { 'temperature': ..., 'topP': ..., 'maxTokens': 123, 'stopSequences': [ 'string', ] } }, 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None } } } } }, 'precomputedRagSourceConfig': { 'retrieveSourceConfig': { 'ragSourceIdentifier': 'string' }, 'retrieveAndGenerateSourceConfig': { 'ragSourceIdentifier': 'string' } } }, ] }, 'outputDataConfig': { 's3Uri': 'string' }, 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1), 'failureMessages': [ 'string', ] } **Response Structure** * *(dict) --* * **jobName** *(string) --* The name for the evaluation job. * **status** *(string) --* The current status of the evaluation job. * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the evaluation job. * **jobDescription** *(string) --* The description of the evaluation job. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM service role used in the evaluation job. * **customerEncryptionKeyId** *(string) --* The Amazon Resource Name (ARN) of the customer managed encryption key specified when the evaluation job was created. * **jobType** *(string) --* Specifies whether the evaluation job is automated or human- based. * **applicationType** *(string) --* Specifies whether the evaluation job is for evaluating a model or evaluating a knowledge base (retrieval and response generation). * **evaluationConfig** *(dict) --* Contains the configuration details of either an automated or human-based evaluation job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "automated", "human". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **automated** *(dict) --* Contains the configuration details of an automated evaluation job that computes metrics. * **datasetMetricConfigs** *(list) --* Configuration details of the prompt datasets and metrics you want to use for your evaluation job. * *(dict) --* Defines the prompt datasets, built-in metric names and custom metric names, and the task type. * **taskType** *(string) --* The the type of task you want to evaluate for your evaluation job. This applies only to model evaluation jobs and is ignored for knowledge base evaluation jobs. * **dataset** *(dict) --* Specifies the prompt dataset. * **name** *(string) --* Used to specify supported built-in prompt datasets. Valid values are "Builtin.Bold", "Builtin.BoolQ", "Builtin.NaturalQuestions", "Builtin.Gigaword", "Builtin.RealToxicityPrompts", "Builtin.TriviaQA", "Builtin.T-Rex", "Builtin.WomensEcommerceClothingReviews" and "Builtin.Wikitext2". * **datasetLocation** *(dict) --* For custom prompt datasets, you must specify the location in Amazon S3 where the prompt dataset is saved. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3Uri". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3Uri** *(string) --* The S3 URI of the S3 bucket specified in the job. * **metricNames** *(list) --* The names of the metrics you want to use for your evaluation job. For knowledge base evaluation jobs that evaluate retrieval only, valid values are " "Builtin.ContextRelevance"", " "Builtin.ContextCoverage"". For knowledge base evaluation jobs that evaluate retrieval with response generation, valid values are " "Builtin.Correctness"", " "Builtin.Completeness"", " "Builtin.Helpfulness"", " "Builtin.LogicalCoherence"", " "Builtin.Faithfulness"", " "Builtin.Harmfulness"", " "Builtin.Stereotyping"", " "Builtin.Refusal"". For automated model evaluation jobs, valid values are " "Builtin.Accuracy"", " "Builtin.Robustness"", and " "Builtin.Toxicity"". In model evaluation jobs that use a LLM as judge you can specify " "Builtin.Correctness"", " "Builtin.Completeness"", " "Builtin.Faithfulness"", " "Builtin.Helpfulness"", " "Builtin.Coherence"", " "Builtin.Relevance"", " "Builtin.FollowingInstructions"", " "Builtin.ProfessionalStyleAndTone"", You can also specify the following responsible AI related metrics only for model evaluation job that use a LLM as judge " "Builtin.Harmfulness"", " "Builtin.Stereotyping"", and " "Builtin.Refusal"". For human-based model evaluation jobs, the list of strings must match the "name" parameter specified in "HumanEvaluationCustomMetric". * *(string) --* * **evaluatorModelConfig** *(dict) --* Contains the evaluator model configuration details. "EvaluatorModelConfig" is required for evaluation jobs that use a knowledge base or in model evaluation job that use a model as judge. This model computes all evaluation related metrics. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "bedrockEvaluatorModels". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **bedrockEvaluatorModels** *(list) --* The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics. * *(dict) --* The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics. * **modelIdentifier** *(string) --* The Amazon Resource Name (ARN) of the evaluator model used used in knowledge base evaluation job or in model evaluation job that use a model as judge. * **customMetricConfig** *(dict) --* Defines the configuration of custom metrics to be used in an evaluation job. * **customMetrics** *(list) --* Defines a list of custom metrics to be used in an Amazon Bedrock evaluation job. * *(dict) --* An array item definining a single custom metric for use in an Amazon Bedrock evaluation job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "customMetricDefinition". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **customMetricDefinition** *(dict) --* The definition of a custom metric for use in an Amazon Bedrock evaluation job. * **name** *(string) --* The name for a custom metric. Names must be unique in your Amazon Web Services region. * **instructions** *(string) --* The prompt for a custom metric that instructs the evaluator model how to rate the model or RAG source under evaluation. * **ratingScale** *(list) --* Defines the rating scale to be used for a custom metric. We recommend that you always define a ratings scale when creating a custom metric. If you don't define a scale, Amazon Bedrock won't be able to visually display the results of the evaluation in the console or calculate average values of numerical scores. For more information on specifying a rating scale, see Specifying an output schema (rating scale). * *(dict) --* Defines the value and corresponding definition for one rating in a custom metric rating scale. * **definition** *(string) --* Defines the definition for one rating in a custom metric rating scale. * **value** *(dict) --* Defines the value for one rating in a custom metric rating scale. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "stringValue", "floatValue". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **stringValue** *(string) --* A string representing the value for a rating in a custom metric rating scale. * **floatValue** *(float) --* A floating point number representing the value for a rating in a custom metric rating scale. * **evaluatorModelConfig** *(dict) --* Configuration of the evaluator model you want to use to evaluate custom metrics in an Amazon Bedrock evaluation job. * **bedrockEvaluatorModels** *(list) --* Defines the model you want to evaluate custom metrics in an Amazon Bedrock evaluation job. * *(dict) --* Defines the model you want to evaluate custom metrics in an Amazon Bedrock evaluation job. * **modelIdentifier** *(string) --* The Amazon Resource Name (ARN) of the evaluator model for custom metrics. For a list of supported evaluator models, see Evaluate model performance using another LLM as a judge and Evaluate the performance of RAG sources using Amazon Bedrock evaluations. * **human** *(dict) --* Contains the configuration details of an evaluation job that uses human workers. * **humanWorkflowConfig** *(dict) --* The parameters of the human workflow. * **flowDefinitionArn** *(string) --* The Amazon Resource Number (ARN) for the flow definition * **instructions** *(string) --* Instructions for the flow definition * **customMetrics** *(list) --* A "HumanEvaluationCustomMetric" object. It contains the names the metrics, how the metrics are to be evaluated, an optional description. * *(dict) --* In a model evaluation job that uses human workers you must define the name of the metric, and how you want that metric rated "ratingMethod", and an optional description of the metric. * **name** *(string) --* The name of the metric. Your human evaluators will see this name in the evaluation UI. * **description** *(string) --* An optional description of the metric. Use this parameter to provide more details about the metric. * **ratingMethod** *(string) --* Choose how you want your human workers to evaluation your model. Valid values for rating methods are "ThumbsUpDown", "IndividualLikertScale", "ComparisonLikertScale", "ComparisonChoice", and "ComparisonRank" * **datasetMetricConfigs** *(list) --* Use to specify the metrics, task, and prompt dataset to be used in your model evaluation job. * *(dict) --* Defines the prompt datasets, built-in metric names and custom metric names, and the task type. * **taskType** *(string) --* The the type of task you want to evaluate for your evaluation job. This applies only to model evaluation jobs and is ignored for knowledge base evaluation jobs. * **dataset** *(dict) --* Specifies the prompt dataset. * **name** *(string) --* Used to specify supported built-in prompt datasets. Valid values are "Builtin.Bold", "Builtin.BoolQ", "Builtin.NaturalQuestions", "Builtin.Gigaword", "Builtin.RealToxicityPrompts", "Builtin.TriviaQA", "Builtin.T-Rex", "Builtin.WomensEcommerceClothingReviews" and "Builtin.Wikitext2". * **datasetLocation** *(dict) --* For custom prompt datasets, you must specify the location in Amazon S3 where the prompt dataset is saved. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3Uri". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3Uri** *(string) --* The S3 URI of the S3 bucket specified in the job. * **metricNames** *(list) --* The names of the metrics you want to use for your evaluation job. For knowledge base evaluation jobs that evaluate retrieval only, valid values are " "Builtin.ContextRelevance"", " "Builtin.ContextCoverage"". For knowledge base evaluation jobs that evaluate retrieval with response generation, valid values are " "Builtin.Correctness"", " "Builtin.Completeness"", " "Builtin.Helpfulness"", " "Builtin.LogicalCoherence"", " "Builtin.Faithfulness"", " "Builtin.Harmfulness"", " "Builtin.Stereotyping"", " "Builtin.Refusal"". For automated model evaluation jobs, valid values are " "Builtin.Accuracy"", " "Builtin.Robustness"", and " "Builtin.Toxicity"". In model evaluation jobs that use a LLM as judge you can specify " "Builtin.Correctness"", " "Builtin.Completeness"", " "Builtin.Faithfulness"", " "Builtin.Helpfulness"", " "Builtin.Coherence"", " "Builtin.Relevance"", " "Builtin.FollowingInstructions"", " "Builtin.ProfessionalStyleAndTone"", You can also specify the following responsible AI related metrics only for model evaluation job that use a LLM as judge " "Builtin.Harmfulness"", " "Builtin.Stereotyping"", and " "Builtin.Refusal"". For human-based model evaluation jobs, the list of strings must match the "name" parameter specified in "HumanEvaluationCustomMetric". * *(string) --* * **inferenceConfig** *(dict) --* Contains the configuration details of the inference model used for the evaluation job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "models", "ragConfigs". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **models** *(list) --* Specifies the inference models. * *(dict) --* Defines the models used in the model evaluation job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "bedrockModel", "precomputedInferenceSource". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **bedrockModel** *(dict) --* Defines the Amazon Bedrock model or inference profile and inference parameters you want used. * **modelIdentifier** *(string) --* The ARN of the Amazon Bedrock model or inference profile specified. * **inferenceParams** *(string) --* Each Amazon Bedrock support different inference parameters that change how the model behaves during inference. * **performanceConfig** *(dict) --* Specifies performance settings for the model or inference profile. * **latency** *(string) --* Specifies whether to use the latency-optimized or standard version of a model or inference profile. * **precomputedInferenceSource** *(dict) --* Defines the model used to generate inference response data for a model evaluation job where you provide your own inference response data. * **inferenceSourceIdentifier** *(string) --* A label that identifies a model used in a model evaluation job where you provide your own inference response data. * **ragConfigs** *(list) --* Contains the configuration details of the inference for a knowledge base evaluation job, including either the retrieval only configuration or the retrieval with response generation configuration. * *(dict) --* Contains configuration details for retrieval of information and response generation. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "knowledgeBaseConfig", "precomputedRagSourceConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **knowledgeBaseConfig** *(dict) --* Contains configuration details for knowledge base retrieval and response generation. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "retrieveConfig", "retrieveAndGenerateConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **retrieveConfig** *(dict) --* Contains configuration details for retrieving information from a knowledge base. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base. * **knowledgeBaseRetrievalConfiguration** *(dict) --* Contains configuration details for knowledge base retrieval. * **vectorSearchConfiguration** *(dict) --* Contains configuration details for returning the results from the vector search. * **numberOfResults** *(integer) --* The number of text chunks to retrieve; the number of results to return. * **overrideSearchType** *(string) --* By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless vector store that contains a filterable text field, you can specify whether to query the knowledge base with a "HYBRID" search using both vector embeddings and raw text, or "SEMANTIC" search using only vector embeddings. For other vector store configurations, only "SEMANTIC" search is available. * **filter** *(dict) --* Specifies the filters to use on the metadata fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **equals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value matches the value in this object. The following example would return data sources with an animal attribute whose value is 'cat': ""equals": { "key": "animal", "value": "cat" }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **notEquals** *(dict) --* Knowledge base data sources that contain a metadata attribute whose name matches the key and whose value doesn't match the value in this object are returned. The following example would return data sources that don't contain an animal attribute whose value is 'cat': ""notEquals": { "key": "animal", "value": "cat" }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **greaterThan** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than the value in this object. The following example would return data sources with an year attribute whose value is greater than '1989': ""greaterThan": { "key": "year", "value": 1989 }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **greaterThanOrEquals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than or equal to the value in this object. The following example would return data sources with an year attribute whose value is greater than or equal to '1989': ""greaterThanOrEquals": { "key": "year", "value": 1989 }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **lessThan** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than the value in this object. The following example would return data sources with an year attribute whose value is less than to '1989': ""lessThan": { "key": "year", "value": 1989 }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **lessThanOrEquals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than or equal to the value in this object. The following example would return data sources with an year attribute whose value is less than or equal to '1989': ""lessThanOrEquals": { "key": "year", "value": 1989 }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **in** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is in the list specified in the value in this object. The following example would return data sources with an animal attribute that is either 'cat' or 'dog': ""in": { "key": "animal", "value": ["cat", "dog"] }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **notIn** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value isn't in the list specified in the value in this object. The following example would return data sources whose animal attribute is neither 'cat' nor 'dog': ""notIn": { "key": "animal", "value": ["cat", "dog"] }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **startsWith** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value starts with the value in this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores. The following example would return data sources with an animal attribute starts with 'ca' (for example, 'cat' or 'camel'). ""startsWith": { "key": "animal", "value": "ca" }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **listContains** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is a list that contains the value as one of its members. The following example would return data sources with an animals attribute that is a list containing a cat member (for example, "["dog", "cat"]"): ""listContains": { "key": "animals", "value": "cat" }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **stringContains** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is one of the following: A string that contains the value as a substring. The following example would return data sources with an animal attribute that contains the substring at (for example, 'cat'): ""stringContains": { "key": "animal", "value": "at" }" A list with a member that contains the value as a substring. The following example would return data sources with an animals attribute that is a list containing a member that contains the substring at (for example, "["dog", "cat"]"): ""stringContains": { "key": "animals", "value": "at" }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **andAll** *(list) --* Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list. * *(dict) --* Specifies the filters to use on the metadata attributes/fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **orAll** *(list) --* Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list. * *(dict) --* Specifies the filters to use on the metadata attributes/fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **implicitFilterConfiguration** *(dict) --* Configuration for implicit filtering in Knowledge Base vector searches. This allows the system to automatically apply filters based on the query context without requiring explicit filter expressions. * **metadataAttributes** *(list) --* A list of metadata attribute schemas that define the structure and properties of metadata fields used for implicit filtering. Each attribute defines a key, type, and optional description. * *(dict) --* Defines the schema for a metadata attribute used in Knowledge Base vector searches. Metadata attributes provide additional context for documents and can be used for filtering and reranking search results. * **key** *(string) --* The unique identifier for the metadata attribute. This key is used to reference the attribute in filter expressions and reranking configurations. * **type** *(string) --* The data type of the metadata attribute. The type determines how the attribute can be used in filter expressions and reranking. * **description** *(string) --* An optional description of the metadata attribute that provides additional context about its purpose and usage. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the foundation model used for implicit filtering. This model processes the query to extract relevant filtering criteria. * **rerankingConfiguration** *(dict) --* Configuration for reranking search results in Knowledge Base vector searches. Reranking improves search relevance by reordering initial vector search results using more sophisticated relevance models. * **type** *(string) --* The type of reranking to apply to vector search results. Currently, the only supported value is BEDROCK, which uses Amazon Bedrock foundation models for reranking. * **bedrockRerankingConfiguration** *(dict) --* Configuration for using Amazon Bedrock foundation models to rerank search results. This is required when the reranking type is set to BEDROCK. * **modelConfiguration** *(dict) --* Configuration for the Amazon Bedrock foundation model used for reranking. This includes the model ARN and any additional request fields required by the model. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the foundation model to use for reranking. This model processes the query and search results to determine a more relevant ordering. * **additionalModelRequestFields** *(dict) --* A list of additional fields to include in the model request during reranking. These fields provide extra context or configuration options specific to the selected foundation model. * *(string) --* * (*document*) -- * **numberOfRerankedResults** *(integer) --* The maximum number of results to rerank. This limits how many of the initial vector search results will be processed by the reranking model. A smaller number improves performance but may exclude potentially relevant results. * **metadataConfiguration** *(dict) --* Configuration for how document metadata should be used during the reranking process. This determines which metadata fields are included when reordering search results. * **selectionMode** *(string) --* The mode for selecting which metadata fields to include in the reranking process. Valid values are ALL (use all available metadata fields) or SELECTIVE (use only specified fields). * **selectiveModeConfiguration** *(dict) --* Configuration for selective mode, which allows you to explicitly include or exclude specific metadata fields during reranking. This is only used when selectionMode is set to SELECTIVE. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "fieldsToInclude", "fieldsToExclude". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **fieldsToInclude** *(list) --* A list of metadata field names to explicitly include in the reranking process. Only these fields will be considered when reordering search results. This parameter cannot be used together with fieldsToExclude. * *(dict) --* Specifies a field to be used during the reranking process in a Knowledge Base vector search. This structure identifies metadata fields that should be considered when reordering search results to improve relevance. * **fieldName** *(string) --* The name of the metadata field to be used during the reranking process. * **fieldsToExclude** *(list) --* A list of metadata field names to explicitly exclude from the reranking process. All metadata fields except these will be considered when reordering search results. This parameter cannot be used together with fieldsToInclude. * *(dict) --* Specifies a field to be used during the reranking process in a Knowledge Base vector search. This structure identifies metadata fields that should be considered when reordering search results to improve relevance. * **fieldName** *(string) --* The name of the metadata field to be used during the reranking process. * **retrieveAndGenerateConfig** *(dict) --* Contains configuration details for retrieving information from a knowledge base and generating responses. * **type** *(string) --* The type of resource that contains your data for retrieving information and generating responses. If you choose to use "EXTERNAL_SOURCES", then currently only Claude 3 Sonnet models for knowledge bases are supported. * **knowledgeBaseConfiguration** *(dict) --* Contains configuration details for the knowledge base retrieval and response generation. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the foundation model or inference profile used to generate responses. * **retrievalConfiguration** *(dict) --* Contains configuration details for retrieving text chunks. * **vectorSearchConfiguration** *(dict) --* Contains configuration details for returning the results from the vector search. * **numberOfResults** *(integer) --* The number of text chunks to retrieve; the number of results to return. * **overrideSearchType** *(string) --* By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless vector store that contains a filterable text field, you can specify whether to query the knowledge base with a "HYBRID" search using both vector embeddings and raw text, or "SEMANTIC" search using only vector embeddings. For other vector store configurations, only "SEMANTIC" search is available. * **filter** *(dict) --* Specifies the filters to use on the metadata fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **equals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value matches the value in this object. The following example would return data sources with an animal attribute whose value is 'cat': ""equals": { "key": "animal", "value": "cat" }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **notEquals** *(dict) --* Knowledge base data sources that contain a metadata attribute whose name matches the key and whose value doesn't match the value in this object are returned. The following example would return data sources that don't contain an animal attribute whose value is 'cat': ""notEquals": { "key": "animal", "value": "cat" }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **greaterThan** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than the value in this object. The following example would return data sources with an year attribute whose value is greater than '1989': ""greaterThan": { "key": "year", "value": 1989 }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **greaterThanOrEquals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than or equal to the value in this object. The following example would return data sources with an year attribute whose value is greater than or equal to '1989': ""greaterThanOrEquals": { "key": "year", "value": 1989 }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **lessThan** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than the value in this object. The following example would return data sources with an year attribute whose value is less than to '1989': ""lessThan": { "key": "year", "value": 1989 }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **lessThanOrEquals** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than or equal to the value in this object. The following example would return data sources with an year attribute whose value is less than or equal to '1989': ""lessThanOrEquals": { "key": "year", "value": 1989 }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **in** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is in the list specified in the value in this object. The following example would return data sources with an animal attribute that is either 'cat' or 'dog': ""in": { "key": "animal", "value": ["cat", "dog"] }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **notIn** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value isn't in the list specified in the value in this object. The following example would return data sources whose animal attribute is neither 'cat' nor 'dog': ""notIn": { "key": "animal", "value": ["cat", "dog"] }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **startsWith** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value starts with the value in this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores. The following example would return data sources with an animal attribute starts with 'ca' (for example, 'cat' or 'camel'). ""startsWith": { "key": "animal", "value": "ca" }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **listContains** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is a list that contains the value as one of its members. The following example would return data sources with an animals attribute that is a list containing a cat member (for example, "["dog", "cat"]"): ""listContains": { "key": "animals", "value": "cat" }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **stringContains** *(dict) --* Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is one of the following: A string that contains the value as a substring. The following example would return data sources with an animal attribute that contains the substring at (for example, 'cat'): ""stringContains": { "key": "animal", "value": "at" }" A list with a member that contains the value as a substring. The following example would return data sources with an animals attribute that is a list containing a member that contains the substring at (for example, "["dog", "cat"]"): ""stringContains": { "key": "animals", "value": "at" }" * **key** *(string) --* The name of metadata attribute/field, which must match the name in your data source/document metadata. * **value** (*document*) -- The value of the metadata attribute/field. * **andAll** *(list) --* Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list. * *(dict) --* Specifies the filters to use on the metadata attributes/fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **orAll** *(list) --* Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list. * *(dict) --* Specifies the filters to use on the metadata attributes/fields in the knowledge base data sources before returning results. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "equals", "notEquals", "greaterThan", "greaterThanOrEquals", "lessThan", "lessThanOrEquals", "in", "notIn", "startsWith", "listContains", "stringContains", "andAll", "orAll". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **implicitFilterConfiguration** *(dict) --* Configuration for implicit filtering in Knowledge Base vector searches. This allows the system to automatically apply filters based on the query context without requiring explicit filter expressions. * **metadataAttributes** *(list) --* A list of metadata attribute schemas that define the structure and properties of metadata fields used for implicit filtering. Each attribute defines a key, type, and optional description. * *(dict) --* Defines the schema for a metadata attribute used in Knowledge Base vector searches. Metadata attributes provide additional context for documents and can be used for filtering and reranking search results. * **key** *(string) --* The unique identifier for the metadata attribute. This key is used to reference the attribute in filter expressions and reranking configurations. * **type** *(string) --* The data type of the metadata attribute. The type determines how the attribute can be used in filter expressions and reranking. * **description** *(string) --* An optional description of the metadata attribute that provides additional context about its purpose and usage. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the foundation model used for implicit filtering. This model processes the query to extract relevant filtering criteria. * **rerankingConfiguration** *(dict) --* Configuration for reranking search results in Knowledge Base vector searches. Reranking improves search relevance by reordering initial vector search results using more sophisticated relevance models. * **type** *(string) --* The type of reranking to apply to vector search results. Currently, the only supported value is BEDROCK, which uses Amazon Bedrock foundation models for reranking. * **bedrockRerankingConfiguration** *(dict) --* Configuration for using Amazon Bedrock foundation models to rerank search results. This is required when the reranking type is set to BEDROCK. * **modelConfiguration** *(dict) --* Configuration for the Amazon Bedrock foundation model used for reranking. This includes the model ARN and any additional request fields required by the model. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the foundation model to use for reranking. This model processes the query and search results to determine a more relevant ordering. * **additionalModelRequestFields** *(dict) --* A list of additional fields to include in the model request during reranking. These fields provide extra context or configuration options specific to the selected foundation model. * *(string) --* * (*document*) -- * **numberOfRerankedResults** *(integer) --* The maximum number of results to rerank. This limits how many of the initial vector search results will be processed by the reranking model. A smaller number improves performance but may exclude potentially relevant results. * **metadataConfiguration** *(dict) --* Configuration for how document metadata should be used during the reranking process. This determines which metadata fields are included when reordering search results. * **selectionMode** *(string) --* The mode for selecting which metadata fields to include in the reranking process. Valid values are ALL (use all available metadata fields) or SELECTIVE (use only specified fields). * **selectiveModeConfiguration** *(dict) --* Configuration for selective mode, which allows you to explicitly include or exclude specific metadata fields during reranking. This is only used when selectionMode is set to SELECTIVE. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "fieldsToInclude", "fieldsToExclude". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **fieldsToInclude** *(list) --* A list of metadata field names to explicitly include in the reranking process. Only these fields will be considered when reordering search results. This parameter cannot be used together with fieldsToExclude. * *(dict) --* Specifies a field to be used during the reranking process in a Knowledge Base vector search. This structure identifies metadata fields that should be considered when reordering search results to improve relevance. * **fieldName** *(string) --* The name of the metadata field to be used during the reranking process. * **fieldsToExclude** *(list) --* A list of metadata field names to explicitly exclude from the reranking process. All metadata fields except these will be considered when reordering search results. This parameter cannot be used together with fieldsToInclude. * *(dict) --* Specifies a field to be used during the reranking process in a Knowledge Base vector search. This structure identifies metadata fields that should be considered when reordering search results to improve relevance. * **fieldName** *(string) --* The name of the metadata field to be used during the reranking process. * **generationConfiguration** *(dict) --* Contains configurations details for response generation based on retrieved text chunks. * **promptTemplate** *(dict) --* Contains the template for the prompt that's sent to the model for response generation. * **textPromptTemplate** *(string) --* The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template. For more information, see Knowledge base prompt template and Use XML tags with Anthropic Claude models. * **guardrailConfiguration** *(dict) --* Contains configuration details for the guardrail. * **guardrailId** *(string) --* The unique identifier for the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **kbInferenceConfig** *(dict) --* Contains configuration details for inference for knowledge base retrieval and response generation. * **textInferenceConfig** *(dict) --* Contains configuration details for text generation using a language model via the "RetrieveAndGenerate" function. * **temperature** *(float) --* Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable. * **topP** *(float) --* A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token. * **maxTokens** *(integer) --* The maximum number of tokens to generate in the output text. Do not use the minimum of 0 or the maximum of 65536. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model. * **stopSequences** *(list) --* A list of sequences of characters that, if generated, will cause the model to stop generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model. * *(string) --* * **additionalModelRequestFields** *(dict) --* Additional model parameters and corresponding values not included in the "textInferenceConfig" structure for a knowledge base. This allows you to provide custom model parameters specific to the language model being used. * *(string) --* * (*document*) -- * **orchestrationConfiguration** *(dict) --* Contains configuration details for the model to process the prompt prior to retrieval and response generation. * **queryTransformationConfiguration** *(dict) --* Contains configuration details for transforming the prompt. * **type** *(string) --* The type of transformation to apply to the prompt. * **externalSourcesConfiguration** *(dict) --* The configuration for the external source wrapper object in the "retrieveAndGenerate" function. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the foundation model or inference profile used to generate responses. * **sources** *(list) --* The document for the external source wrapper object in the "retrieveAndGenerate" function. * *(dict) --* The unique external source of the content contained in the wrapper object. * **sourceType** *(string) --* The source type of the external source wrapper object. * **s3Location** *(dict) --* The S3 location of the external source wrapper object. * **uri** *(string) --* The S3 URI location for the wrapper object of the document. * **byteContent** *(dict) --* The identifier, content type, and data of the external source wrapper object. * **identifier** *(string) --* The file name of the document contained in the wrapper object. * **contentType** *(string) --* The MIME type of the document contained in the wrapper object. * **data** *(bytes) --* The byte value of the file to upload, encoded as a Base-64 string. * **generationConfiguration** *(dict) --* Contains configurations details for response generation based on retrieved text chunks. * **promptTemplate** *(dict) --* Contains the template for the prompt for the external source wrapper object. * **textPromptTemplate** *(string) --* The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template. For more information, see Knowledge base prompt template and Use XML tags with Anthropic Claude models. * **guardrailConfiguration** *(dict) --* Configuration details for the guardrail. * **guardrailId** *(string) --* The unique identifier for the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **kbInferenceConfig** *(dict) --* Configuration details for inference when using "RetrieveAndGenerate" to generate responses while using an external source. * **textInferenceConfig** *(dict) --* Contains configuration details for text generation using a language model via the "RetrieveAndGenerate" function. * **temperature** *(float) --* Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable. * **topP** *(float) --* A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token. * **maxTokens** *(integer) --* The maximum number of tokens to generate in the output text. Do not use the minimum of 0 or the maximum of 65536. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model. * **stopSequences** *(list) --* A list of sequences of characters that, if generated, will cause the model to stop generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model. * *(string) --* * **additionalModelRequestFields** *(dict) --* Additional model parameters and their corresponding values not included in the text inference configuration for an external source. Takes in custom model parameters specific to the language model being used. * *(string) --* * (*document*) -- * **precomputedRagSourceConfig** *(dict) --* Contains configuration details about the RAG source used to generate inference response data for a Knowledge Base evaluation job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "retrieveSourceConfig", "retrieveAndGenerateSourceConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **retrieveSourceConfig** *(dict) --* A summary of a RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data. * **ragSourceIdentifier** *(string) --* A label that identifies the RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data. * **retrieveAndGenerateSourceConfig** *(dict) --* A summary of a RAG source used for a retrieve-and- generate Knowledge Base evaluation job where you provide your own inference response data. * **ragSourceIdentifier** *(string) --* A label that identifies the RAG source used for a retrieve-and-generate Knowledge Base evaluation job where you provide your own inference response data. * **outputDataConfig** *(dict) --* Contains the configuration details of the Amazon S3 bucket for storing the results of the evaluation job. * **s3Uri** *(string) --* The Amazon S3 URI where the results of the evaluation job are saved. * **creationTime** *(datetime) --* The time the evaluation job was created. * **lastModifiedTime** *(datetime) --* The time the evaluation job was last modified. * **failureMessages** *(list) --* A list of strings that specify why the evaluation job failed to create. * *(string) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_automated_reasoning_policy_test_case create_automated_reasoning_policy_test_case ******************************************* Bedrock.Client.create_automated_reasoning_policy_test_case(**kwargs) Creates a test for an Automated Reasoning policy. Tests validate that your policy works as expected by providing sample inputs and expected outcomes. Use tests to verify policy behavior before deploying to production. See also: AWS API Documentation **Request Syntax** response = client.create_automated_reasoning_policy_test_case( policyArn='string', guardContent='string', queryContent='string', expectedAggregatedFindingsResult='VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', clientRequestToken='string', confidenceThreshold=123.0 ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to create the test. * **guardContent** (*string*) -- **[REQUIRED]** The output content that's validated by the Automated Reasoning policy. This represents the foundation model response that will be checked for accuracy. * **queryContent** (*string*) -- The input query or prompt that generated the content. This provides context for the validation. * **expectedAggregatedFindingsResult** (*string*) -- **[REQUIRED]** The expected result of the Automated Reasoning check. Valid values include: , TOO_COMPLEX, and NO_TRANSLATIONS. * "VALID" - The claims are true. The claims are implied by the premises and the Automated Reasoning policy. Given the Automated Reasoning policy and premises, it is not possible for these claims to be false. In other words, there are no alternative answers that are true that contradict the claims. * "INVALID" - The claims are false. The claims are not implied by the premises and Automated Reasoning policy. Furthermore, there exists different claims that are consistent with the premises and Automated Reasoning policy. * "SATISFIABLE" - The claims can be true or false. It depends on what assumptions are made for the claim to be implied from the premises and Automated Reasoning policy rules. In this situation, different assumptions can make input claims false and alternative claims true. * "IMPOSSIBLE" - Automated Reasoning can’t make a statement about the claims. This can happen if the premises are logically incorrect, or if there is a conflict within the Automated Reasoning policy itself. * "TRANSLATION_AMBIGUOUS" - Detected an ambiguity in the translation meant it would be unsound to continue with validity checking. Additional context or follow-up questions might be needed to get translation to succeed. * "TOO_COMPLEX" - The input contains too much information for Automated Reasoning to process within its latency limits. * "NO_TRANSLATIONS" - Identifies that some or all of the input prompt wasn't translated into logic. This can happen if the input isn't relevant to the Automated Reasoning policy, or if the policy doesn't have variables to model relevant input. If Automated Reasoning can't translate anything, you get a single "NO_TRANSLATIONS" finding. You might also see a "NO_TRANSLATIONS" (along with other findings) if some part of the validation isn't translated. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. This field is autopopulated if not provided. * **confidenceThreshold** (*float*) -- The minimum confidence level for logic validation. Content that meets the threshold is considered a high-confidence finding that can be validated. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'testCaseId': 'string' } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the policy for which the test was created. * **testCaseId** *(string) --* The unique identifier of the created test. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / stop_model_invocation_job stop_model_invocation_job ************************* Bedrock.Client.stop_model_invocation_job(**kwargs) Stops a batch inference job. You're only charged for tokens that were already processed. For more information, see Stop a batch inference job. See also: AWS API Documentation **Request Syntax** response = client.stop_model_invocation_job( jobIdentifier='string' ) Parameters: **jobIdentifier** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the batch inference job to stop. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / stop_evaluation_job stop_evaluation_job ******************* Bedrock.Client.stop_evaluation_job(**kwargs) Stops an evaluation job that is current being created or running. See also: AWS API Documentation **Request Syntax** response = client.stop_evaluation_job( jobIdentifier='string' ) Parameters: **jobIdentifier** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the evaluation job you want to stop. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / update_automated_reasoning_policy_annotations update_automated_reasoning_policy_annotations ********************************************* Bedrock.Client.update_automated_reasoning_policy_annotations(**kwargs) Updates the annotations for an Automated Reasoning policy build workflow. This allows you to modify extracted rules, variables, and types before finalizing the policy. See also: AWS API Documentation **Request Syntax** response = client.update_automated_reasoning_policy_annotations( policyArn='string', buildWorkflowId='string', annotations=[ { 'addType': { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] }, 'updateType': { 'name': 'string', 'newName': 'string', 'description': 'string', 'values': [ { 'addTypeValue': { 'value': 'string', 'description': 'string' }, 'updateTypeValue': { 'value': 'string', 'newValue': 'string', 'description': 'string' }, 'deleteTypeValue': { 'value': 'string' } }, ] }, 'deleteType': { 'name': 'string' }, 'addVariable': { 'name': 'string', 'type': 'string', 'description': 'string' }, 'updateVariable': { 'name': 'string', 'newName': 'string', 'description': 'string' }, 'deleteVariable': { 'name': 'string' }, 'addRule': { 'expression': 'string' }, 'updateRule': { 'ruleId': 'string', 'expression': 'string' }, 'deleteRule': { 'ruleId': 'string' }, 'addRuleFromNaturalLanguage': { 'naturalLanguage': 'string' }, 'updateFromRulesFeedback': { 'ruleIds': [ 'string', ], 'feedback': 'string' }, 'updateFromScenarioFeedback': { 'ruleIds': [ 'string', ], 'scenarioExpression': 'string', 'feedback': 'string' }, 'ingestContent': { 'content': 'string' } }, ], lastUpdatedAnnotationSetHash='string' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy whose annotations you want to update. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The unique identifier of the build workflow whose annotations you want to update. * **annotations** (*list*) -- **[REQUIRED]** The updated annotations containing modified rules, variables, and types for the policy. * *(dict) --* Contains the various operations that can be performed on an Automated Reasoning policy, including adding, updating, and deleting rules, variables, and types. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "addType", "updateType", "deleteType", "addVariable", "updateVariable", "deleteVariable", "addRule", "updateRule", "deleteRule", "addRuleFromNaturalLanguage", "updateFromRulesFeedback", "updateFromScenarioFeedback", "ingestContent". * **addType** *(dict) --* An operation to add a new custom type to the policy, defining a set of possible values for policy variables. * **name** *(string) --* **[REQUIRED]** The name of the new custom type. This name will be used to reference the type in variable definitions and rules. * **description** *(string) --* **[REQUIRED]** A description of what the custom type represents and how it should be used in the policy. * **values** *(list) --* **[REQUIRED]** The list of possible values that variables of this type can take, each with its own description and identifier. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* **[REQUIRED]** The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **updateType** *(dict) --* An operation to modify an existing custom type in the policy, such as changing its name, description, or allowed values. * **name** *(string) --* **[REQUIRED]** The current name of the custom type to update. * **newName** *(string) --* The new name for the custom type, if you want to rename it. If not provided, the name remains unchanged. * **description** *(string) --* The new description for the custom type, replacing the previous description. * **values** *(list) --* **[REQUIRED]** The updated list of values for the custom type, which can include additions, modifications, or removals. * *(dict) --* An annotation for managing values within custom types, including adding, updating, or removing specific type values. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "addTypeValue", "updateTypeValue", "deleteTypeValue". * **addTypeValue** *(dict) --* An operation to add a new value to an existing custom type. * **value** *(string) --* **[REQUIRED]** The identifier or name of the new value to add to the type. * **description** *(string) --* A description of what this new type value represents and when it should be used. * **updateTypeValue** *(dict) --* An operation to modify an existing value within a custom type. * **value** *(string) --* **[REQUIRED]** The current identifier or name of the type value to update. * **newValue** *(string) --* The new identifier or name for the type value, if you want to rename it. * **description** *(string) --* The new description for the type value, replacing the previous description. * **deleteTypeValue** *(dict) --* An operation to remove a value from an existing custom type. * **value** *(string) --* **[REQUIRED]** The identifier or name of the value to remove from the type. * **deleteType** *(dict) --* An operation to remove a custom type from the policy. The type must not be referenced by any variables or rules. * **name** *(string) --* **[REQUIRED]** The name of the custom type to delete from the policy. The type must not be referenced by any variables or rules. * **addVariable** *(dict) --* An operation to add a new variable to the policy, which can be used in rule expressions to represent dynamic values. * **name** *(string) --* **[REQUIRED]** The name of the new variable. This name will be used to reference the variable in rule expressions. * **type** *(string) --* **[REQUIRED]** The type of the variable, which can be a built-in type (like string or number) or a custom type defined in the policy. * **description** *(string) --* **[REQUIRED]** A description of what the variable represents and how it should be used in rules. * **updateVariable** *(dict) --* An operation to modify an existing variable in the policy, such as changing its name, type, or description. * **name** *(string) --* **[REQUIRED]** The current name of the variable to update. * **newName** *(string) --* The new name for the variable, if you want to rename it. If not provided, the name remains unchanged. * **description** *(string) --* The new description for the variable, replacing the previous description. * **deleteVariable** *(dict) --* An operation to remove a variable from the policy. The variable must not be referenced by any rules. * **name** *(string) --* **[REQUIRED]** The name of the variable to delete from the policy. The variable must not be referenced by any rules. * **addRule** *(dict) --* An operation to add a new logical rule to the policy using formal mathematical expressions. * **expression** *(string) --* **[REQUIRED]** The formal logical expression that defines the rule, using mathematical notation and referencing policy variables and types. * **updateRule** *(dict) --* An operation to modify an existing rule in the policy, such as changing its logical expression or conditions. * **ruleId** *(string) --* **[REQUIRED]** The unique identifier of the rule to update. * **expression** *(string) --* **[REQUIRED]** The new formal logical expression for the rule, replacing the previous expression. * **deleteRule** *(dict) --* An operation to remove a rule from the policy. * **ruleId** *(string) --* **[REQUIRED]** The unique identifier of the rule to delete from the policy. * **addRuleFromNaturalLanguage** *(dict) --* An operation to add a new rule by converting natural language descriptions into formal logical expressions. * **naturalLanguage** *(string) --* **[REQUIRED]** The natural language description of the rule that should be converted into a formal logical expression. * **updateFromRulesFeedback** *(dict) --* An operation to update the policy based on feedback about how specific rules performed during testing or validation. * **ruleIds** *(list) --* The list of rule identifiers that the feedback applies to. * *(string) --* * **feedback** *(string) --* **[REQUIRED]** The feedback information about rule performance, including suggestions for improvements or corrections. * **updateFromScenarioFeedback** *(dict) --* An operation to update the policy based on feedback about how it performed on specific test scenarios. * **ruleIds** *(list) --* The list of rule identifiers that were involved in the scenario being evaluated. * *(string) --* * **scenarioExpression** *(string) --* **[REQUIRED]** The logical expression that defines the test scenario that generated this feedback. * **feedback** *(string) --* The feedback information about scenario performance, including any issues or improvements identified. * **ingestContent** *(dict) --* An operation to process and incorporate new content into the policy, extracting additional rules and concepts. * **content** *(string) --* **[REQUIRED]** The new content to be analyzed and incorporated into the policy, such as additional documents or rule descriptions. * **lastUpdatedAnnotationSetHash** (*string*) -- **[REQUIRED]** The hash value of the annotation set that you're updating. This is used for optimistic concurrency control to prevent conflicting updates. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'buildWorkflowId': 'string', 'annotationSetHash': 'string', 'updatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy. * **buildWorkflowId** *(string) --* The unique identifier of the build workflow. * **annotationSetHash** *(string) --* The new hash value representing the updated state of the annotations. * **updatedAt** *(datetime) --* The timestamp when the annotations were updated. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_automated_reasoning_policies list_automated_reasoning_policies ********************************* Bedrock.Client.list_automated_reasoning_policies(**kwargs) Lists all Automated Reasoning policies in your account, with optional filtering by policy ARN. This helps you manage and discover existing policies. See also: AWS API Documentation **Request Syntax** response = client.list_automated_reasoning_policies( policyArn='string', nextToken='string', maxResults=123 ) Parameters: * **policyArn** (*string*) -- Optional filter to list only the policy versions with the specified Amazon Resource Name (ARN). If not provided, the DRAFT versions for all policies are listed. * **nextToken** (*string*) -- The pagination token from a previous request to retrieve the next page of results. * **maxResults** (*integer*) -- The maximum number of policies to return in a single call. Return type: dict Returns: **Response Syntax** { 'automatedReasoningPolicySummaries': [ { 'policyArn': 'string', 'name': 'string', 'description': 'string', 'version': 'string', 'policyId': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **automatedReasoningPolicySummaries** *(list) --* A list of Automated Reasoning policy summaries. * *(dict) --* Contains summary information about an Automated Reasoning policy, including metadata and timestamps. * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the policy. * **name** *(string) --* The name of the policy. * **description** *(string) --* The description of the policy. * **version** *(string) --* The version of the policy. * **policyId** *(string) --* The unique identifier of the policy. * **createdAt** *(datetime) --* The timestamp when the policy was created. * **updatedAt** *(datetime) --* The timestamp when the policy was last updated. * **nextToken** *(string) --* The pagination token to use in a subsequent request to retrieve the next page of results. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_automated_reasoning_policy_build_workflow_result_assets get_automated_reasoning_policy_build_workflow_result_assets *********************************************************** Bedrock.Client.get_automated_reasoning_policy_build_workflow_result_assets(**kwargs) Retrieves the resulting assets from a completed Automated Reasoning policy build workflow, including build logs, quality reports, and generated policy artifacts. See also: AWS API Documentation **Request Syntax** response = client.get_automated_reasoning_policy_build_workflow_result_assets( policyArn='string', buildWorkflowId='string', assetType='BUILD_LOG'|'QUALITY_REPORT'|'POLICY_DEFINITION' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflow assets you want to retrieve. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The unique identifier of the build workflow whose result assets you want to retrieve. * **assetType** (*string*) -- **[REQUIRED]** The type of asset to retrieve (e.g., BUILD_LOG, QUALITY_REPORT, POLICY_DEFINITION). Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'buildWorkflowId': 'string', 'buildWorkflowAssets': { 'policyDefinition': { 'version': 'string', 'types': [ { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] }, ], 'rules': [ { 'id': 'string', 'expression': 'string', 'alternateExpression': 'string' }, ], 'variables': [ { 'name': 'string', 'type': 'string', 'description': 'string' }, ] }, 'qualityReport': { 'typeCount': 123, 'variableCount': 123, 'ruleCount': 123, 'unusedTypes': [ 'string', ], 'unusedTypeValues': [ { 'typeName': 'string', 'valueName': 'string' }, ], 'unusedVariables': [ 'string', ], 'conflictingRules': [ 'string', ], 'disjointRuleSets': [ { 'variables': [ 'string', ], 'rules': [ 'string', ] }, ] }, 'buildLog': { 'entries': [ { 'annotation': { 'addType': { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] }, 'updateType': { 'name': 'string', 'newName': 'string', 'description': 'string', 'values': [ { 'addTypeValue': { 'value': 'string', 'description': 'string' }, 'updateTypeValue': { 'value': 'string', 'newValue': 'string', 'description': 'string' }, 'deleteTypeValue': { 'value': 'string' } }, ] }, 'deleteType': { 'name': 'string' }, 'addVariable': { 'name': 'string', 'type': 'string', 'description': 'string' }, 'updateVariable': { 'name': 'string', 'newName': 'string', 'description': 'string' }, 'deleteVariable': { 'name': 'string' }, 'addRule': { 'expression': 'string' }, 'updateRule': { 'ruleId': 'string', 'expression': 'string' }, 'deleteRule': { 'ruleId': 'string' }, 'addRuleFromNaturalLanguage': { 'naturalLanguage': 'string' }, 'updateFromRulesFeedback': { 'ruleIds': [ 'string', ], 'feedback': 'string' }, 'updateFromScenarioFeedback': { 'ruleIds': [ 'string', ], 'scenarioExpression': 'string', 'feedback': 'string' }, 'ingestContent': { 'content': 'string' } }, 'status': 'APPLIED'|'FAILED', 'buildSteps': [ { 'context': { 'planning': {}, 'mutation': { 'addType': { 'type': { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] } }, 'updateType': { 'type': { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] } }, 'deleteType': { 'name': 'string' }, 'addVariable': { 'variable': { 'name': 'string', 'type': 'string', 'description': 'string' } }, 'updateVariable': { 'variable': { 'name': 'string', 'type': 'string', 'description': 'string' } }, 'deleteVariable': { 'name': 'string' }, 'addRule': { 'rule': { 'id': 'string', 'expression': 'string', 'alternateExpression': 'string' } }, 'updateRule': { 'rule': { 'id': 'string', 'expression': 'string', 'alternateExpression': 'string' } }, 'deleteRule': { 'id': 'string' } } }, 'priorElement': { 'policyDefinitionVariable': { 'name': 'string', 'type': 'string', 'description': 'string' }, 'policyDefinitionType': { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] }, 'policyDefinitionRule': { 'id': 'string', 'expression': 'string', 'alternateExpression': 'string' } }, 'messages': [ { 'message': 'string', 'messageType': 'INFO'|'WARNING'|'ERROR' }, ] }, ] }, ] } } } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy. * **buildWorkflowId** *(string) --* The unique identifier of the build workflow. * **buildWorkflowAssets** *(dict) --* The requested build workflow asset. This is a union type that returns only one of the available asset types (logs, reports, or generated artifacts) based on the specific asset type requested in the API call. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "policyDefinition", "qualityReport", "buildLog". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **policyDefinition** *(dict) --* Contains the formal logic rules, variables, and custom variable types that define an Automated Reasoning policy. The policy definition specifies the constraints used to validate foundation model responses for accuracy and logical consistency. * **version** *(string) --* The version of the policy definition format. * **types** *(list) --* The custom user-defined vairable types used in the policy. Types are enum-based variable types that provide additional context beyond the predefined variable types. * *(dict) --* Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types. * **name** *(string) --* The name of the custom type. * **description** *(string) --* The description of what the custom type represents. * **values** *(list) --* The possible values for this enum-based type, each with its own description. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **rules** *(list) --* The formal logic rules extracted from the source document. Rules define the logical constraints that determine whether model responses are valid, invalid, or satisfiable. * *(dict) --* Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints. * **id** *(string) --* The unique identifier of the rule within the policy. * **expression** *(string) --* The formal logic expression of the rule. * **alternateExpression** *(string) --* The human-readable form of the rule expression, often in natural language or simplified notation. * **variables** *(list) --* The variables that represent concepts in the policy. Variables can have values assigned when translating natural language into formal logic. Their descriptions are crucial for accurate translation. * *(dict) --* Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation. * **name** *(string) --* The name of the variable. Use descriptive names that clearly indicate the concept being represented. * **type** *(string) --* The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide. * **description** *(string) --* The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation. * **qualityReport** *(dict) --* A comprehensive report analyzing the quality of the generated policy, including metrics about rule coverage, potential conflicts, and unused elements. * **typeCount** *(integer) --* The total number of custom types defined in the policy. * **variableCount** *(integer) --* The total number of variables defined in the policy. * **ruleCount** *(integer) --* The total number of rules defined in the policy. * **unusedTypes** *(list) --* A list of custom types that are defined but not referenced by any variables or rules, suggesting they may be unnecessary. * *(string) --* * **unusedTypeValues** *(list) --* A list of type values that are defined but never used in any rules, indicating potential cleanup opportunities. * *(dict) --* Associates a type name with a specific value name, used for referencing type values in rules and other policy elements. * **typeName** *(string) --* The name of the custom type that contains the referenced value. * **valueName** *(string) --* The name of the specific value within the type. * **unusedVariables** *(list) --* A list of variables that are defined but not referenced by any rules, suggesting they may be unnecessary. * *(string) --* * **conflictingRules** *(list) --* A list of rules that may conflict with each other, potentially leading to inconsistent policy behavior. * *(string) --* * **disjointRuleSets** *(list) --* Groups of rules that operate on completely separate sets of variables, indicating the policy may be addressing multiple unrelated concerns. * *(dict) --* Represents a set of rules that operate on completely separate variables, indicating they address different concerns or domains within the policy. * **variables** *(list) --* The set of variables that are used by the rules in this disjoint set. * *(string) --* * **rules** *(list) --* The list of rules that form this disjoint set, all operating on the same set of variables. * *(string) --* * **buildLog** *(dict) --* The complete build log containing detailed information about each step in the policy generation process. * **entries** *(list) --* A list of log entries documenting each step in the policy build process, including timestamps, status, and detailed messages. * *(dict) --* Represents a single entry in the policy build log, containing information about a specific step or event in the build process. * **annotation** *(dict) --* The annotation or operation that was being processed when this log entry was created. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "addType", "updateType", "deleteType", "addVariable", "updateVariable", "deleteVariable", "addRule", "updateRule", "deleteRule", "addRuleFromNaturalLanguage", "updateFromRulesFeedback", "updateFromScenarioFeedback", "ingestContent". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **addType** *(dict) --* An operation to add a new custom type to the policy, defining a set of possible values for policy variables. * **name** *(string) --* The name of the new custom type. This name will be used to reference the type in variable definitions and rules. * **description** *(string) --* A description of what the custom type represents and how it should be used in the policy. * **values** *(list) --* The list of possible values that variables of this type can take, each with its own description and identifier. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **updateType** *(dict) --* An operation to modify an existing custom type in the policy, such as changing its name, description, or allowed values. * **name** *(string) --* The current name of the custom type to update. * **newName** *(string) --* The new name for the custom type, if you want to rename it. If not provided, the name remains unchanged. * **description** *(string) --* The new description for the custom type, replacing the previous description. * **values** *(list) --* The updated list of values for the custom type, which can include additions, modifications, or removals. * *(dict) --* An annotation for managing values within custom types, including adding, updating, or removing specific type values. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "addTypeValue", "updateTypeValue", "deleteTypeValue". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **addTypeValue** *(dict) --* An operation to add a new value to an existing custom type. * **value** *(string) --* The identifier or name of the new value to add to the type. * **description** *(string) --* A description of what this new type value represents and when it should be used. * **updateTypeValue** *(dict) --* An operation to modify an existing value within a custom type. * **value** *(string) --* The current identifier or name of the type value to update. * **newValue** *(string) --* The new identifier or name for the type value, if you want to rename it. * **description** *(string) --* The new description for the type value, replacing the previous description. * **deleteTypeValue** *(dict) --* An operation to remove a value from an existing custom type. * **value** *(string) --* The identifier or name of the value to remove from the type. * **deleteType** *(dict) --* An operation to remove a custom type from the policy. The type must not be referenced by any variables or rules. * **name** *(string) --* The name of the custom type to delete from the policy. The type must not be referenced by any variables or rules. * **addVariable** *(dict) --* An operation to add a new variable to the policy, which can be used in rule expressions to represent dynamic values. * **name** *(string) --* The name of the new variable. This name will be used to reference the variable in rule expressions. * **type** *(string) --* The type of the variable, which can be a built- in type (like string or number) or a custom type defined in the policy. * **description** *(string) --* A description of what the variable represents and how it should be used in rules. * **updateVariable** *(dict) --* An operation to modify an existing variable in the policy, such as changing its name, type, or description. * **name** *(string) --* The current name of the variable to update. * **newName** *(string) --* The new name for the variable, if you want to rename it. If not provided, the name remains unchanged. * **description** *(string) --* The new description for the variable, replacing the previous description. * **deleteVariable** *(dict) --* An operation to remove a variable from the policy. The variable must not be referenced by any rules. * **name** *(string) --* The name of the variable to delete from the policy. The variable must not be referenced by any rules. * **addRule** *(dict) --* An operation to add a new logical rule to the policy using formal mathematical expressions. * **expression** *(string) --* The formal logical expression that defines the rule, using mathematical notation and referencing policy variables and types. * **updateRule** *(dict) --* An operation to modify an existing rule in the policy, such as changing its logical expression or conditions. * **ruleId** *(string) --* The unique identifier of the rule to update. * **expression** *(string) --* The new formal logical expression for the rule, replacing the previous expression. * **deleteRule** *(dict) --* An operation to remove a rule from the policy. * **ruleId** *(string) --* The unique identifier of the rule to delete from the policy. * **addRuleFromNaturalLanguage** *(dict) --* An operation to add a new rule by converting natural language descriptions into formal logical expressions. * **naturalLanguage** *(string) --* The natural language description of the rule that should be converted into a formal logical expression. * **updateFromRulesFeedback** *(dict) --* An operation to update the policy based on feedback about how specific rules performed during testing or validation. * **ruleIds** *(list) --* The list of rule identifiers that the feedback applies to. * *(string) --* * **feedback** *(string) --* The feedback information about rule performance, including suggestions for improvements or corrections. * **updateFromScenarioFeedback** *(dict) --* An operation to update the policy based on feedback about how it performed on specific test scenarios. * **ruleIds** *(list) --* The list of rule identifiers that were involved in the scenario being evaluated. * *(string) --* * **scenarioExpression** *(string) --* The logical expression that defines the test scenario that generated this feedback. * **feedback** *(string) --* The feedback information about scenario performance, including any issues or improvements identified. * **ingestContent** *(dict) --* An operation to process and incorporate new content into the policy, extracting additional rules and concepts. * **content** *(string) --* The new content to be analyzed and incorporated into the policy, such as additional documents or rule descriptions. * **status** *(string) --* The status of the build step (e.g., SUCCESS, FAILED, IN_PROGRESS). * **buildSteps** *(list) --* Detailed information about the specific build steps that were executed, including any sub-operations or transformations. * *(dict) --* Represents a single step in the policy build process, containing context about what was being processed and any messages or results. * **context** *(dict) --* Contextual information about what was being processed during this build step, such as the type of operation or the source material being analyzed. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "planning", "mutation". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **planning** *(dict) --* Indicates that this build step was part of the planning phase, where the system determines what operations to perform. * **mutation** *(dict) --* Indicates that this build step involved modifying the policy structure, such as adding or updating rules, variables, or types. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "addType", "updateType", "deleteType", "addVariable", "updateVariable", "deleteVariable", "addRule", "updateRule", "deleteRule". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **addType** *(dict) --* A mutation to add a new custom type to the policy. * **type** *(dict) --* Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types. * **name** *(string) --* The name of the custom type. * **description** *(string) --* The description of what the custom type represents. * **values** *(list) --* The possible values for this enum-based type, each with its own description. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **updateType** *(dict) --* A mutation to modify an existing custom type in the policy. * **type** *(dict) --* Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types. * **name** *(string) --* The name of the custom type. * **description** *(string) --* The description of what the custom type represents. * **values** *(list) --* The possible values for this enum-based type, each with its own description. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **deleteType** *(dict) --* A mutation to remove a custom type from the policy. * **name** *(string) --* The name of the custom type to delete. * **addVariable** *(dict) --* A mutation to add a new variable to the policy. * **variable** *(dict) --* Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation. * **name** *(string) --* The name of the variable. Use descriptive names that clearly indicate the concept being represented. * **type** *(string) --* The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide. * **description** *(string) --* The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation. * **updateVariable** *(dict) --* A mutation to modify an existing variable in the policy. * **variable** *(dict) --* Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation. * **name** *(string) --* The name of the variable. Use descriptive names that clearly indicate the concept being represented. * **type** *(string) --* The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide. * **description** *(string) --* The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation. * **deleteVariable** *(dict) --* A mutation to remove a variable from the policy. * **name** *(string) --* The name of the variable to delete. * **addRule** *(dict) --* A mutation to add a new rule to the policy. * **rule** *(dict) --* Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints. * **id** *(string) --* The unique identifier of the rule within the policy. * **expression** *(string) --* The formal logic expression of the rule. * **alternateExpression** *(string) --* The human-readable form of the rule expression, often in natural language or simplified notation. * **updateRule** *(dict) --* A mutation to modify an existing rule in the policy. * **rule** *(dict) --* Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints. * **id** *(string) --* The unique identifier of the rule within the policy. * **expression** *(string) --* The formal logic expression of the rule. * **alternateExpression** *(string) --* The human-readable form of the rule expression, often in natural language or simplified notation. * **deleteRule** *(dict) --* A mutation to remove a rule from the policy. * **id** *(string) --* The unique identifier of the rule to delete. * **priorElement** *(dict) --* Reference to the previous element or step in the build process, helping to trace the sequence of operations. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "policyDefinitionVariable", "policyDefinitionType", "policyDefinitionRule". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **policyDefinitionVariable** *(dict) --* Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation. * **name** *(string) --* The name of the variable. Use descriptive names that clearly indicate the concept being represented. * **type** *(string) --* The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide. * **description** *(string) --* The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation. * **policyDefinitionType** *(dict) --* Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types. * **name** *(string) --* The name of the custom type. * **description** *(string) --* The description of what the custom type represents. * **values** *(list) --* The possible values for this enum-based type, each with its own description. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **policyDefinitionRule** *(dict) --* Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints. * **id** *(string) --* The unique identifier of the rule within the policy. * **expression** *(string) --* The formal logic expression of the rule. * **alternateExpression** *(string) --* The human-readable form of the rule expression, often in natural language or simplified notation. * **messages** *(list) --* A list of messages generated during this build step, including informational messages, warnings, and error details. * *(dict) --* Represents a message generated during a build step, providing information about what happened or any issues encountered. * **message** *(string) --* The content of the message, describing what occurred during the build step. * **messageType** *(string) --* The type of message (e.g., INFO, WARNING, ERROR) indicating its severity and purpose. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_inference_profile delete_inference_profile ************************ Bedrock.Client.delete_inference_profile(**kwargs) Deletes an application inference profile. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.delete_inference_profile( inferenceProfileIdentifier='string' ) Parameters: **inferenceProfileIdentifier** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) or ID of the application inference profile to delete. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_automated_reasoning_policy create_automated_reasoning_policy ********************************* Bedrock.Client.create_automated_reasoning_policy(**kwargs) Creates an Automated Reasoning policy for Amazon Bedrock Guardrails. Automated Reasoning policies use mathematical techniques to detect hallucinations, suggest corrections, and highlight unstated assumptions in the responses of your GenAI application. To create a policy, you upload a source document that describes the rules that you're encoding. Automated Reasoning extracts important concepts from the source document that will become variables in the policy and infers policy rules. See also: AWS API Documentation **Request Syntax** response = client.create_automated_reasoning_policy( name='string', description='string', clientRequestToken='string', policyDefinition={ 'version': 'string', 'types': [ { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] }, ], 'rules': [ { 'id': 'string', 'expression': 'string', 'alternateExpression': 'string' }, ], 'variables': [ { 'name': 'string', 'type': 'string', 'description': 'string' }, ] }, tags=[ { 'key': 'string', 'value': 'string' }, ] ) Parameters: * **name** (*string*) -- **[REQUIRED]** A unique name for the Automated Reasoning policy. The name must be between 1 and 63 characters and can contain letters, numbers, hyphens, and underscores. * **description** (*string*) -- A description of the Automated Reasoning policy. Use this to provide context about the policy's purpose and the types of validations it performs. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the operation completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request but doesn't return an error. This field is autopopulated if not provided. * **policyDefinition** (*dict*) -- The policy definition that contains the formal logic rules, variables, and custom variable types used to validate foundation model responses in your application. * **version** *(string) --* The version of the policy definition format. * **types** *(list) --* The custom user-defined vairable types used in the policy. Types are enum-based variable types that provide additional context beyond the predefined variable types. * *(dict) --* Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types. * **name** *(string) --* **[REQUIRED]** The name of the custom type. * **description** *(string) --* The description of what the custom type represents. * **values** *(list) --* **[REQUIRED]** The possible values for this enum-based type, each with its own description. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* **[REQUIRED]** The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **rules** *(list) --* The formal logic rules extracted from the source document. Rules define the logical constraints that determine whether model responses are valid, invalid, or satisfiable. * *(dict) --* Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints. * **id** *(string) --* **[REQUIRED]** The unique identifier of the rule within the policy. * **expression** *(string) --* **[REQUIRED]** The formal logic expression of the rule. * **alternateExpression** *(string) --* The human-readable form of the rule expression, often in natural language or simplified notation. * **variables** *(list) --* The variables that represent concepts in the policy. Variables can have values assigned when translating natural language into formal logic. Their descriptions are crucial for accurate translation. * *(dict) --* Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation. * **name** *(string) --* **[REQUIRED]** The name of the variable. Use descriptive names that clearly indicate the concept being represented. * **type** *(string) --* **[REQUIRED]** The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide. * **description** *(string) --* **[REQUIRED]** The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation. * **tags** (*list*) -- A list of tags to associate with the Automated Reasoning policy. Tags help you organize and manage your policies. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'version': 'string', 'name': 'string', 'description': 'string', 'definitionHash': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy that you created. * **version** *(string) --* The version number of the newly created Automated Reasoning policy. The initial version is always DRAFT. * **name** *(string) --* The name of the Automated Reasoning policy. * **description** *(string) --* The description of the Automated Reasoning policy. * **definitionHash** *(string) --* The hash of the policy definition. This is used as a concurrency token for creating policy versions that you can use in your application. * **createdAt** *(datetime) --* The timestamp when the policy was created. * **updatedAt** *(datetime) --* The timestamp when the policy was last updated. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_foundation_model_agreement delete_foundation_model_agreement ********************************* Bedrock.Client.delete_foundation_model_agreement(**kwargs) Delete the model access agreement for the specified model. See also: AWS API Documentation **Request Syntax** response = client.delete_foundation_model_agreement( modelId='string' ) Parameters: **modelId** (*string*) -- **[REQUIRED]** Model Id of the model access to delete. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / export_automated_reasoning_policy_version export_automated_reasoning_policy_version ***************************************** Bedrock.Client.export_automated_reasoning_policy_version(**kwargs) Exports the policy definition for an Automated Reasoning policy version. Returns the complete policy definition including rules, variables, and custom variable types in a structured format. See also: AWS API Documentation **Request Syntax** response = client.export_automated_reasoning_policy_version( policyArn='string' ) Parameters: **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy to export. Can be either the unversioned ARN for the draft policy or a versioned ARN for a specific policy version. Return type: dict Returns: **Response Syntax** { 'policyDefinition': { 'version': 'string', 'types': [ { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] }, ], 'rules': [ { 'id': 'string', 'expression': 'string', 'alternateExpression': 'string' }, ], 'variables': [ { 'name': 'string', 'type': 'string', 'description': 'string' }, ] } } **Response Structure** * *(dict) --* * **policyDefinition** *(dict) --* The exported policy definition containing the formal logic rules, variables, and custom variable types. * **version** *(string) --* The version of the policy definition format. * **types** *(list) --* The custom user-defined vairable types used in the policy. Types are enum-based variable types that provide additional context beyond the predefined variable types. * *(dict) --* Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types. * **name** *(string) --* The name of the custom type. * **description** *(string) --* The description of what the custom type represents. * **values** *(list) --* The possible values for this enum-based type, each with its own description. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **rules** *(list) --* The formal logic rules extracted from the source document. Rules define the logical constraints that determine whether model responses are valid, invalid, or satisfiable. * *(dict) --* Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints. * **id** *(string) --* The unique identifier of the rule within the policy. * **expression** *(string) --* The formal logic expression of the rule. * **alternateExpression** *(string) --* The human-readable form of the rule expression, often in natural language or simplified notation. * **variables** *(list) --* The variables that represent concepts in the policy. Variables can have values assigned when translating natural language into formal logic. Their descriptions are crucial for accurate translation. * *(dict) --* Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation. * **name** *(string) --* The name of the variable. Use descriptive names that clearly indicate the concept being represented. * **type** *(string) --* The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide. * **description** *(string) --* The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_automated_reasoning_policy_build_workflow delete_automated_reasoning_policy_build_workflow ************************************************ Bedrock.Client.delete_automated_reasoning_policy_build_workflow(**kwargs) Deletes an Automated Reasoning policy build workflow and its associated artifacts. This permanently removes the workflow history and any generated assets. See also: AWS API Documentation **Request Syntax** response = client.delete_automated_reasoning_policy_build_workflow( policyArn='string', buildWorkflowId='string', lastUpdatedAt=datetime(2015, 1, 1) ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflow you want to delete. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The unique identifier of the build workflow to delete. * **lastUpdatedAt** (*datetime*) -- **[REQUIRED]** The timestamp when the build workflow was last updated. This is used for optimistic concurrency control to prevent accidental deletion of workflows that have been modified. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_foundation_models list_foundation_models ********************** Bedrock.Client.list_foundation_models(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.list_foundation_models( byProvider='string', byCustomizationType='FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION', byOutputModality='TEXT'|'IMAGE'|'EMBEDDING', byInferenceType='ON_DEMAND'|'PROVISIONED' ) Parameters: * **byProvider** (*string*) -- Return models belonging to the model provider that you specify. * **byCustomizationType** (*string*) -- Return models that support the customization type that you specify. For more information, see Custom models in the Amazon Bedrock User Guide. * **byOutputModality** (*string*) -- Return models that support the output modality that you specify. * **byInferenceType** (*string*) -- Return models that support the inference type that you specify. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. Return type: dict Returns: **Response Syntax** { 'modelSummaries': [ { 'modelArn': 'string', 'modelId': 'string', 'modelName': 'string', 'providerName': 'string', 'inputModalities': [ 'TEXT'|'IMAGE'|'EMBEDDING', ], 'outputModalities': [ 'TEXT'|'IMAGE'|'EMBEDDING', ], 'responseStreamingSupported': True|False, 'customizationsSupported': [ 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION', ], 'inferenceTypesSupported': [ 'ON_DEMAND'|'PROVISIONED', ], 'modelLifecycle': { 'status': 'ACTIVE'|'LEGACY' } }, ] } **Response Structure** * *(dict) --* * **modelSummaries** *(list) --* A list of Amazon Bedrock foundation models. * *(dict) --* Summary information for a foundation model. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the foundation model. * **modelId** *(string) --* The model ID of the foundation model. * **modelName** *(string) --* The name of the model. * **providerName** *(string) --* The model's provider name. * **inputModalities** *(list) --* The input modalities that the model supports. * *(string) --* * **outputModalities** *(list) --* The output modalities that the model supports. * *(string) --* * **responseStreamingSupported** *(boolean) --* Indicates whether the model supports streaming. * **customizationsSupported** *(list) --* Whether the model supports fine-tuning or continual pre- training. * *(string) --* * **inferenceTypesSupported** *(list) --* The inference types that the model supports. * *(string) --* * **modelLifecycle** *(dict) --* Contains details about whether a model version is available or deprecated. * **status** *(string) --* Specifies whether a model version is available ( "ACTIVE") or deprecated ( "LEGACY". **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_custom_model_deployments list_custom_model_deployments ***************************** Bedrock.Client.list_custom_model_deployments(**kwargs) Lists custom model deployments in your account. You can filter the results by creation time, name, status, and associated model. Use this operation to manage and monitor your custom model deployments. We recommend using pagination to ensure that the operation returns quickly and successfully. The following actions are related to the "ListCustomModelDeployments" operation: * CreateCustomModelDeployment * GetCustomModelDeployment * DeleteCustomModelDeployment See also: AWS API Documentation **Request Syntax** response = client.list_custom_model_deployments( createdBefore=datetime(2015, 1, 1), createdAfter=datetime(2015, 1, 1), nameContains='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', statusEquals='Creating'|'Active'|'Failed', modelArnEquals='string' ) Parameters: * **createdBefore** (*datetime*) -- Filters deployments created before the specified date and time. * **createdAfter** (*datetime*) -- Filters deployments created after the specified date and time. * **nameContains** (*string*) -- Filters deployments whose names contain the specified string. * **maxResults** (*integer*) -- The maximum number of results to return in a single call. * **nextToken** (*string*) -- The token for the next set of results. Use this token to retrieve additional results when the response is truncated. * **sortBy** (*string*) -- The field to sort the results by. The only supported value is "CreationTime". * **sortOrder** (*string*) -- The sort order for the results. Valid values are "Ascending" and "Descending". Default is "Descending". * **statusEquals** (*string*) -- Filters deployments by status. Valid values are "CREATING", "ACTIVE", and "FAILED". * **modelArnEquals** (*string*) -- Filters deployments by the Amazon Resource Name (ARN) of the associated custom model. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'modelDeploymentSummaries': [ { 'customModelDeploymentArn': 'string', 'customModelDeploymentName': 'string', 'modelArn': 'string', 'createdAt': datetime(2015, 1, 1), 'status': 'Creating'|'Active'|'Failed', 'lastUpdatedAt': datetime(2015, 1, 1), 'failureMessage': 'string' }, ] } **Response Structure** * *(dict) --* * **nextToken** *(string) --* The token for the next set of results. This value is null when there are no more results to return. * **modelDeploymentSummaries** *(list) --* A list of custom model deployment summaries. * *(dict) --* Contains summary information about a custom model deployment, including its ARN, name, status, and associated custom model. * **customModelDeploymentArn** *(string) --* The Amazon Resource Name (ARN) of the custom model deployment. * **customModelDeploymentName** *(string) --* The name of the custom model deployment. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the custom model associated with this deployment. * **createdAt** *(datetime) --* The date and time when the custom model deployment was created. * **status** *(string) --* The status of the custom model deployment. Possible values are "CREATING", "ACTIVE", and "FAILED". * **lastUpdatedAt** *(datetime) --* The date and time when the custom model deployment was last modified. * **failureMessage** *(string) --* If the deployment status is "FAILED", this field contains a message describing the failure reason. **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_model_customization_jobs list_model_customization_jobs ***************************** Bedrock.Client.list_model_customization_jobs(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.list_model_customization_jobs( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped', nameContains='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending' ) Parameters: * **creationTimeAfter** (*datetime*) -- Return customization jobs created after the specified time. * **creationTimeBefore** (*datetime*) -- Return customization jobs created before the specified time. * **statusEquals** (*string*) -- Return customization jobs with the specified status. * **nameContains** (*string*) -- Return customization jobs only if the job name contains these characters. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. * **sortBy** (*string*) -- The field to sort by in the returned list of jobs. * **sortOrder** (*string*) -- The sort order of the results. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'modelCustomizationJobSummaries': [ { 'jobArn': 'string', 'baseModelArn': 'string', 'jobName': 'string', 'status': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped', 'statusDetails': { 'validationDetails': { 'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) }, 'dataProcessingDetails': { 'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) }, 'trainingDetails': { 'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1) } }, 'lastModifiedTime': datetime(2015, 1, 1), 'creationTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'customModelArn': 'string', 'customModelName': 'string', 'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION'|'IMPORTED' }, ] } **Response Structure** * *(dict) --* * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. * **modelCustomizationJobSummaries** *(list) --* Job summaries. * *(dict) --* Information about one customization job * **jobArn** *(string) --* Amazon Resource Name (ARN) of the customization job. * **baseModelArn** *(string) --* Amazon Resource Name (ARN) of the base model. * **jobName** *(string) --* Name of the customization job. * **status** *(string) --* Status of the customization job. * **statusDetails** *(dict) --* Details about the status of the data processing sub-task of the job. * **validationDetails** *(dict) --* The status details for the validation sub-task of the job. * **status** *(string) --* The status of the validation sub-task of the job. * **creationTime** *(datetime) --* The start time of the validation sub-task of the job. * **lastModifiedTime** *(datetime) --* The latest update to the validation sub-task of the job. * **dataProcessingDetails** *(dict) --* The status details for the data processing sub-task of the job. * **status** *(string) --* The status of the data processing sub-task of the job. * **creationTime** *(datetime) --* The start time of the data processing sub-task of the job. * **lastModifiedTime** *(datetime) --* The latest update to the data processing sub-task of the job. * **trainingDetails** *(dict) --* The status details for the training sub-task of the job. * **status** *(string) --* The status of the training sub-task of the job. * **creationTime** *(datetime) --* The start time of the training sub-task of the job. * **lastModifiedTime** *(datetime) --* The latest update to the training sub-task of the job. * **lastModifiedTime** *(datetime) --* Time that the customization job was last modified. * **creationTime** *(datetime) --* Creation time of the custom model. * **endTime** *(datetime) --* Time that the customization job ended. * **customModelArn** *(string) --* Amazon Resource Name (ARN) of the custom model. * **customModelName** *(string) --* Name of the custom model. * **customizationType** *(string) --* Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models. **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_model_import_job get_model_import_job ******************** Bedrock.Client.get_model_import_job(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.get_model_import_job( jobIdentifier='string' ) Parameters: **jobIdentifier** (*string*) -- **[REQUIRED]** The identifier of the import job. Return type: dict Returns: **Response Syntax** { 'jobArn': 'string', 'jobName': 'string', 'importedModelName': 'string', 'importedModelArn': 'string', 'roleArn': 'string', 'modelDataSource': { 's3DataSource': { 's3Uri': 'string' } }, 'status': 'InProgress'|'Completed'|'Failed', 'failureMessage': 'string', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'vpcConfig': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, 'importedModelKmsKeyArn': 'string' } **Response Structure** * *(dict) --* * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the import job. * **jobName** *(string) --* The name of the import job. * **importedModelName** *(string) --* The name of the imported model. * **importedModelArn** *(string) --* The Amazon Resource Name (ARN) of the imported model. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role associated with this job. * **modelDataSource** *(dict) --* The data source for the imported model. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3DataSource". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3DataSource** *(dict) --* The Amazon S3 data source of the model to import. * **s3Uri** *(string) --* The URI of the Amazon S3 data source. * **status** *(string) --* The status of the job. A successful job transitions from in- progress to completed when the imported model is ready to use. If the job failed, the failure message contains information about why the job failed. * **failureMessage** *(string) --* Information about why the import job failed. * **creationTime** *(datetime) --* The time the resource was created. * **lastModifiedTime** *(datetime) --* Time the resource was last modified. * **endTime** *(datetime) --* Time that the resource transitioned to terminal state. * **vpcConfig** *(dict) --* The Virtual Private Cloud (VPC) configuration of the import model job. * **subnetIds** *(list) --* An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* An array of IDs for each security group in the VPC to use. * *(string) --* * **importedModelKmsKeyArn** *(string) --* The imported model is encrypted at rest using this key. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_automated_reasoning_policy_build_workflows list_automated_reasoning_policy_build_workflows *********************************************** Bedrock.Client.list_automated_reasoning_policy_build_workflows(**kwargs) Lists all build workflows for an Automated Reasoning policy, showing the history of policy creation and modification attempts. See also: AWS API Documentation **Request Syntax** response = client.list_automated_reasoning_policy_build_workflows( policyArn='string', nextToken='string', maxResults=123 ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflows you want to list. * **nextToken** (*string*) -- A pagination token from a previous request to continue listing build workflows from where the previous request left off. * **maxResults** (*integer*) -- The maximum number of build workflows to return in a single response. Valid range is 1-100. Return type: dict Returns: **Response Syntax** { 'automatedReasoningPolicyBuildWorkflowSummaries': [ { 'policyArn': 'string', 'buildWorkflowId': 'string', 'status': 'SCHEDULED'|'CANCEL_REQUESTED'|'PREPROCESSING'|'BUILDING'|'TESTING'|'COMPLETED'|'FAILED'|'CANCELLED', 'buildWorkflowType': 'INGEST_CONTENT'|'REFINE_POLICY'|'IMPORT_POLICY', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **automatedReasoningPolicyBuildWorkflowSummaries** *(list) --* A list of build workflow summaries, each containing key information about a build workflow including its status and timestamps. * *(dict) --* Provides a summary of a policy build workflow, including its current status, timing information, and key identifiers. * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy associated with this build workflow. * **buildWorkflowId** *(string) --* The unique identifier of the build workflow. * **status** *(string) --* The current status of the build workflow (e.g., RUNNING, COMPLETED, FAILED, CANCELLED). * **buildWorkflowType** *(string) --* The type of build workflow (e.g., DOCUMENT_INGESTION, POLICY_REPAIR). * **createdAt** *(datetime) --* The timestamp when the build workflow was created. * **updatedAt** *(datetime) --* The timestamp when the build workflow was last updated. * **nextToken** *(string) --* A pagination token to use in subsequent requests to retrieve additional build workflows. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_custom_model_deployment get_custom_model_deployment *************************** Bedrock.Client.get_custom_model_deployment(**kwargs) Retrieves information about a custom model deployment, including its status, configuration, and metadata. Use this operation to monitor the deployment status and retrieve details needed for inference requests. The following actions are related to the "GetCustomModelDeployment" operation: * CreateCustomModelDeployment * ListCustomModelDeployments * DeleteCustomModelDeployment See also: AWS API Documentation **Request Syntax** response = client.get_custom_model_deployment( customModelDeploymentIdentifier='string' ) Parameters: **customModelDeploymentIdentifier** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) or name of the custom model deployment to retrieve information about. Return type: dict Returns: **Response Syntax** { 'customModelDeploymentArn': 'string', 'modelDeploymentName': 'string', 'modelArn': 'string', 'createdAt': datetime(2015, 1, 1), 'status': 'Creating'|'Active'|'Failed', 'description': 'string', 'failureMessage': 'string', 'lastUpdatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **customModelDeploymentArn** *(string) --* The Amazon Resource Name (ARN) of the custom model deployment. * **modelDeploymentName** *(string) --* The name of the custom model deployment. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the custom model associated with this deployment. * **createdAt** *(datetime) --* The date and time when the custom model deployment was created. * **status** *(string) --* The status of the custom model deployment. Possible values are: * "CREATING" - The deployment is being set up and prepared for inference. * "ACTIVE" - The deployment is ready and available for inference requests. * "FAILED" - The deployment failed to be created or became unavailable. * **description** *(string) --* The description of the custom model deployment. * **failureMessage** *(string) --* If the deployment status is "FAILED", this field contains a message describing the failure reason. * **lastUpdatedAt** *(datetime) --* The date and time when the custom model deployment was last updated. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_custom_model_deployment create_custom_model_deployment ****************************** Bedrock.Client.create_custom_model_deployment(**kwargs) Deploys a custom model for on-demand inference in Amazon Bedrock. After you deploy your custom model, you use the deployment's Amazon Resource Name (ARN) as the "modelId" parameter when you submit prompts and generate responses with model inference. For more information about setting up on-demand inference for custom models, see Set up inference for a custom model. The following actions are related to the "CreateCustomModelDeployment" operation: * GetCustomModelDeployment * ListCustomModelDeployments * DeleteCustomModelDeployment See also: AWS API Documentation **Request Syntax** response = client.create_custom_model_deployment( modelDeploymentName='string', modelArn='string', description='string', tags=[ { 'key': 'string', 'value': 'string' }, ], clientRequestToken='string' ) Parameters: * **modelDeploymentName** (*string*) -- **[REQUIRED]** The name for the custom model deployment. The name must be unique within your Amazon Web Services account and Region. * **modelArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the custom model to deploy for on-demand inference. The custom model must be in the "Active" state. * **description** (*string*) -- A description for the custom model deployment to help you identify its purpose. * **tags** (*list*) -- Tags to assign to the custom model deployment. You can use tags to organize and track your Amazon Web Services resources for cost allocation and management purposes. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. Return type: dict Returns: **Response Syntax** { 'customModelDeploymentArn': 'string' } **Response Structure** * *(dict) --* * **customModelDeploymentArn** *(string) --* The Amazon Resource Name (ARN) of the custom model deployment. Use this ARN as the "modelId" parameter when invoking the model with the "InvokeModel" or "Converse" operations. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_guardrail_version create_guardrail_version ************************ Bedrock.Client.create_guardrail_version(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.create_guardrail_version( guardrailIdentifier='string', description='string', clientRequestToken='string' ) Parameters: * **guardrailIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the guardrail. This can be an ID or the ARN. * **description** (*string*) -- A description of the guardrail version. * **clientRequestToken** (*string*) -- 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. Return type: dict Returns: **Response Syntax** { 'guardrailId': 'string', 'version': 'string' } **Response Structure** * *(dict) --* * **guardrailId** *(string) --* The unique identifier of the guardrail. * **version** *(string) --* The number of the version of the guardrail. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_model_invocation_logging_configuration delete_model_invocation_logging_configuration ********************************************* Bedrock.Client.delete_model_invocation_logging_configuration() Delete the invocation logging. See also: AWS API Documentation **Request Syntax** response = client.delete_model_invocation_logging_configuration() Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / update_automated_reasoning_policy update_automated_reasoning_policy ********************************* Bedrock.Client.update_automated_reasoning_policy(**kwargs) Updates an existing Automated Reasoning policy with new rules, variables, or configuration. This creates a new version of the policy while preserving the previous version. See also: AWS API Documentation **Request Syntax** response = client.update_automated_reasoning_policy( policyArn='string', policyDefinition={ 'version': 'string', 'types': [ { 'name': 'string', 'description': 'string', 'values': [ { 'value': 'string', 'description': 'string' }, ] }, ], 'rules': [ { 'id': 'string', 'expression': 'string', 'alternateExpression': 'string' }, ], 'variables': [ { 'name': 'string', 'type': 'string', 'description': 'string' }, ] }, name='string', description='string' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy to update. This must be the ARN of a draft policy. * **policyDefinition** (*dict*) -- **[REQUIRED]** The updated policy definition containing the formal logic rules, variables, and types. * **version** *(string) --* The version of the policy definition format. * **types** *(list) --* The custom user-defined vairable types used in the policy. Types are enum-based variable types that provide additional context beyond the predefined variable types. * *(dict) --* Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types. * **name** *(string) --* **[REQUIRED]** The name of the custom type. * **description** *(string) --* The description of what the custom type represents. * **values** *(list) --* **[REQUIRED]** The possible values for this enum-based type, each with its own description. * *(dict) --* Represents a single value within a custom type definition, including its identifier and description. * **value** *(string) --* **[REQUIRED]** The actual value or identifier for this type value. * **description** *(string) --* A human-readable description explaining what this type value represents and when it should be used. * **rules** *(list) --* The formal logic rules extracted from the source document. Rules define the logical constraints that determine whether model responses are valid, invalid, or satisfiable. * *(dict) --* Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints. * **id** *(string) --* **[REQUIRED]** The unique identifier of the rule within the policy. * **expression** *(string) --* **[REQUIRED]** The formal logic expression of the rule. * **alternateExpression** *(string) --* The human-readable form of the rule expression, often in natural language or simplified notation. * **variables** *(list) --* The variables that represent concepts in the policy. Variables can have values assigned when translating natural language into formal logic. Their descriptions are crucial for accurate translation. * *(dict) --* Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation. * **name** *(string) --* **[REQUIRED]** The name of the variable. Use descriptive names that clearly indicate the concept being represented. * **type** *(string) --* **[REQUIRED]** The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide. * **description** *(string) --* **[REQUIRED]** The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation. * **name** (*string*) -- The updated name for the Automated Reasoning policy. * **description** (*string*) -- The updated description for the Automated Reasoning policy. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'name': 'string', 'definitionHash': 'string', 'updatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the updated policy. * **name** *(string) --* The updated name of the policy. * **definitionHash** *(string) --* The hash of the updated policy definition. * **updatedAt** *(datetime) --* The timestamp when the policy was last updated. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_model_invocation_job get_model_invocation_job ************************ Bedrock.Client.get_model_invocation_job(**kwargs) Gets details about a batch inference job. For more information, see Monitor batch inference jobs See also: AWS API Documentation **Request Syntax** response = client.get_model_invocation_job( jobIdentifier='string' ) Parameters: **jobIdentifier** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the batch inference job. Return type: dict Returns: **Response Syntax** { 'jobArn': 'string', 'jobName': 'string', 'modelId': 'string', 'clientRequestToken': 'string', 'roleArn': 'string', 'status': 'Submitted'|'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'PartiallyCompleted'|'Expired'|'Validating'|'Scheduled', 'message': 'string', 'submitTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'inputDataConfig': { 's3InputDataConfig': { 's3InputFormat': 'JSONL', 's3Uri': 'string', 's3BucketOwner': 'string' } }, 'outputDataConfig': { 's3OutputDataConfig': { 's3Uri': 'string', 's3EncryptionKeyId': 'string', 's3BucketOwner': 'string' } }, 'vpcConfig': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, 'timeoutDurationInHours': 123, 'jobExpirationTime': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the batch inference job. * **jobName** *(string) --* The name of the batch inference job. * **modelId** *(string) --* The unique identifier of the foundation model used for model inference. * **clientRequestToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference. * **status** *(string) --* The status of the batch inference job. The following statuses are possible: * Submitted – This job has been submitted to a queue for validation. * Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following: * Your IAM service role has access to the Amazon S3 buckets containing your files. * Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the "modelInput" value matches the request body for the model. * Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock. * Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn. * Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request. * InProgress – This job has begun. You can start viewing the results in the output S3 location. * Completed – This job has successfully completed. View the output files in the output S3 location. * PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location. * Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web ServicesSupport Center. * Stopped – This job was stopped by a user. * Stopping – This job is being stopped by a user. * **message** *(string) --* If the batch inference job failed, this field contains a message describing why the job failed. * **submitTime** *(datetime) --* The time at which the batch inference job was submitted. * **lastModifiedTime** *(datetime) --* The time at which the batch inference job was last modified. * **endTime** *(datetime) --* The time at which the batch inference job ended. * **inputDataConfig** *(dict) --* Details about the location of the input to the batch inference job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3InputDataConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3InputDataConfig** *(dict) --* Contains the configuration of the S3 location of the input data. * **s3InputFormat** *(string) --* The format of the input data. * **s3Uri** *(string) --* The S3 location of the input data. * **s3BucketOwner** *(string) --* The ID of the Amazon Web Services account that owns the S3 bucket containing the input data. * **outputDataConfig** *(dict) --* Details about the location of the output of the batch inference job. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3OutputDataConfig". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3OutputDataConfig** *(dict) --* Contains the configuration of the S3 location of the output data. * **s3Uri** *(string) --* The S3 location of the output data. * **s3EncryptionKeyId** *(string) --* The unique identifier of the key that encrypts the S3 location of the output data. * **s3BucketOwner** *(string) --* The ID of the Amazon Web Services account that owns the S3 bucket containing the output data. * **vpcConfig** *(dict) --* The configuration of the Virtual Private Cloud (VPC) for the data in the batch inference job. For more information, see Protect batch inference jobs using a VPC. * **subnetIds** *(list) --* An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* An array of IDs for each security group in the VPC to use. * *(string) --* * **timeoutDurationInHours** *(integer) --* The number of hours after which batch inference job was set to time out. * **jobExpirationTime** *(datetime) --* The time at which the batch inference job times or timed out. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / close close ***** Bedrock.Client.close() Closes underlying endpoint connections. Bedrock / Client / list_marketplace_model_endpoints list_marketplace_model_endpoints ******************************** Bedrock.Client.list_marketplace_model_endpoints(**kwargs) Lists the endpoints for models from Amazon Bedrock Marketplace in your Amazon Web Services account. See also: AWS API Documentation **Request Syntax** response = client.list_marketplace_model_endpoints( maxResults=123, nextToken='string', modelSourceEquals='string' ) Parameters: * **maxResults** (*integer*) -- The maximum number of results to return in a single call. If more results are available, the operation returns a "NextToken" value. * **nextToken** (*string*) -- The token for the next set of results. You receive this token from a previous "ListMarketplaceModelEndpoints" call. * **modelSourceEquals** (*string*) -- If specified, only endpoints for the given model source identifier are returned. Return type: dict Returns: **Response Syntax** { 'marketplaceModelEndpoints': [ { 'endpointArn': 'string', 'modelSourceIdentifier': 'string', 'status': 'REGISTERED'|'INCOMPATIBLE_ENDPOINT', 'statusMessage': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **marketplaceModelEndpoints** *(list) --* An array of endpoint summaries. * *(dict) --* Provides a summary of an endpoint for a model from Amazon Bedrock Marketplace. * **endpointArn** *(string) --* The Amazon Resource Name (ARN) of the endpoint. * **modelSourceIdentifier** *(string) --* The ARN of the model from Amazon Bedrock Marketplace that is deployed on this endpoint. * **status** *(string) --* The overall status of the endpoint in Amazon Bedrock Marketplace. * **statusMessage** *(string) --* Additional information about the overall status, if available. * **createdAt** *(datetime) --* The timestamp when the endpoint was created. * **updatedAt** *(datetime) --* The timestamp when the endpoint was last updated. * **nextToken** *(string) --* The token for the next set of results. Use this token to get the next set of results. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_foundation_model_availability get_foundation_model_availability ********************************* Bedrock.Client.get_foundation_model_availability(**kwargs) Get information about the Foundation model availability. See also: AWS API Documentation **Request Syntax** response = client.get_foundation_model_availability( modelId='string' ) Parameters: **modelId** (*string*) -- **[REQUIRED]** The model Id of the foundation model. Return type: dict Returns: **Response Syntax** { 'modelId': 'string', 'agreementAvailability': { 'status': 'AVAILABLE'|'PENDING'|'NOT_AVAILABLE'|'ERROR', 'errorMessage': 'string' }, 'authorizationStatus': 'AUTHORIZED'|'NOT_AUTHORIZED', 'entitlementAvailability': 'AVAILABLE'|'NOT_AVAILABLE', 'regionAvailability': 'AVAILABLE'|'NOT_AVAILABLE' } **Response Structure** * *(dict) --* * **modelId** *(string) --* The model Id of the foundation model. * **agreementAvailability** *(dict) --* Agreement availability. * **status** *(string) --* Status of the agreement. * **errorMessage** *(string) --* Error message. * **authorizationStatus** *(string) --* Authorization status. * **entitlementAvailability** *(string) --* Entitlement availability. * **regionAvailability** *(string) --* Region availability. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_imported_model delete_imported_model ********************* Bedrock.Client.delete_imported_model(**kwargs) Deletes a custom model that you imported earlier. For more information, see Import a customized model in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.delete_imported_model( modelIdentifier='string' ) Parameters: **modelIdentifier** (*string*) -- **[REQUIRED]** Name of the imported model to delete. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_provisioned_model_throughput delete_provisioned_model_throughput *********************************** Bedrock.Client.delete_provisioned_model_throughput(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.delete_provisioned_model_throughput( provisionedModelId='string' ) Parameters: **provisionedModelId** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) or name of the Provisioned Throughput. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_prompt_router create_prompt_router ******************** Bedrock.Client.create_prompt_router(**kwargs) Creates a prompt router that manages the routing of requests between multiple foundation models based on the routing criteria. See also: AWS API Documentation **Request Syntax** response = client.create_prompt_router( clientRequestToken='string', promptRouterName='string', models=[ { 'modelArn': 'string' }, ], description='string', routingCriteria={ 'responseQualityDifference': 123.0 }, fallbackModel={ 'modelArn': 'string' }, tags=[ { 'key': 'string', 'value': 'string' }, ] ) Parameters: * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier that you provide to ensure idempotency of your requests. If not specified, the Amazon Web Services SDK automatically generates one for you. This field is autopopulated if not provided. * **promptRouterName** (*string*) -- **[REQUIRED]** The name of the prompt router. The name must be unique within your Amazon Web Services account in the current region. * **models** (*list*) -- **[REQUIRED]** A list of foundation models that the prompt router can route requests to. At least one model must be specified. * *(dict) --* The target model for a prompt router. * **modelArn** *(string) --* **[REQUIRED]** The target model's ARN. * **description** (*string*) -- An optional description of the prompt router to help identify its purpose. * **routingCriteria** (*dict*) -- **[REQUIRED]** The criteria, which is the response quality difference, used to determine how incoming requests are routed to different models. * **responseQualityDifference** *(float) --* **[REQUIRED]** The criteria's response quality difference. * **fallbackModel** (*dict*) -- **[REQUIRED]** The default model to use when the routing criteria is not met. * **modelArn** *(string) --* **[REQUIRED]** The target model's ARN. * **tags** (*list*) -- An array of key-value pairs to apply to this resource as tags. You can use tags to categorize and manage your Amazon Web Services resources. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. Return type: dict Returns: **Response Syntax** { 'promptRouterArn': 'string' } **Response Structure** * *(dict) --* * **promptRouterArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the prompt router. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_model_invocation_logging_configuration get_model_invocation_logging_configuration ****************************************** Bedrock.Client.get_model_invocation_logging_configuration() Get the current configuration values for model invocation logging. See also: AWS API Documentation **Request Syntax** response = client.get_model_invocation_logging_configuration() Return type: dict Returns: **Response Syntax** { 'loggingConfig': { 'cloudWatchConfig': { 'logGroupName': 'string', 'roleArn': 'string', 'largeDataDeliveryS3Config': { 'bucketName': 'string', 'keyPrefix': 'string' } }, 's3Config': { 'bucketName': 'string', 'keyPrefix': 'string' }, 'textDataDeliveryEnabled': True|False, 'imageDataDeliveryEnabled': True|False, 'embeddingDataDeliveryEnabled': True|False, 'videoDataDeliveryEnabled': True|False } } **Response Structure** * *(dict) --* * **loggingConfig** *(dict) --* The current configuration values. * **cloudWatchConfig** *(dict) --* CloudWatch logging configuration. * **logGroupName** *(string) --* The log group name. * **roleArn** *(string) --* The role Amazon Resource Name (ARN). * **largeDataDeliveryS3Config** *(dict) --* S3 configuration for delivering a large amount of data. * **bucketName** *(string) --* S3 bucket name. * **keyPrefix** *(string) --* S3 prefix. * **s3Config** *(dict) --* S3 configuration for storing log data. * **bucketName** *(string) --* S3 bucket name. * **keyPrefix** *(string) --* S3 prefix. * **textDataDeliveryEnabled** *(boolean) --* Set to include text data in the log delivery. * **imageDataDeliveryEnabled** *(boolean) --* Set to include image data in the log delivery. * **embeddingDataDeliveryEnabled** *(boolean) --* Set to include embeddings data in the log delivery. * **videoDataDeliveryEnabled** *(boolean) --* Set to include video data in the log delivery. **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / update_guardrail update_guardrail **************** Bedrock.Client.update_guardrail(**kwargs) Updates a guardrail with the values you specify. * Specify a "name" and optional "description". * Specify messages for when the guardrail successfully blocks a prompt or a model response in the "blockedInputMessaging" and "blockedOutputsMessaging" fields. * Specify topics for the guardrail to deny in the "topicPolicyConfig" object. Each GuardrailTopicConfig object in the "topicsConfig" list pertains to one topic. * Give a "name" and "description" so that the guardrail can properly identify the topic. * Specify "DENY" in the "type" field. * (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the "examples" list. * Specify filter strengths for the harmful categories defined in Amazon Bedrock in the "contentPolicyConfig" object. Each GuardrailContentFilterConfig object in the "filtersConfig" list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig. * Specify the category in the "type" field. * Specify the strength of the filter for prompts in the "inputStrength" field and for model responses in the "strength" field of the GuardrailContentFilterConfig. * (Optional) For security, include the ARN of a KMS key in the "kmsKeyId" field. See also: AWS API Documentation **Request Syntax** response = client.update_guardrail( guardrailIdentifier='string', name='string', description='string', topicPolicyConfig={ 'topicsConfig': [ { 'name': 'string', 'definition': 'string', 'examples': [ 'string', ], 'type': 'DENY', 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'tierConfig': { 'tierName': 'CLASSIC'|'STANDARD' } }, contentPolicyConfig={ 'filtersConfig': [ { 'type': 'SEXUAL'|'VIOLENCE'|'HATE'|'INSULTS'|'MISCONDUCT'|'PROMPT_ATTACK', 'inputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH', 'outputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH', 'inputModalities': [ 'TEXT'|'IMAGE', ], 'outputModalities': [ 'TEXT'|'IMAGE', ], 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'tierConfig': { 'tierName': 'CLASSIC'|'STANDARD' } }, wordPolicyConfig={ 'wordsConfig': [ { 'text': 'string', 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'managedWordListsConfig': [ { 'type': 'PROFANITY', 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ] }, sensitiveInformationPolicyConfig={ 'piiEntitiesConfig': [ { 'type': 'ADDRESS'|'AGE'|'AWS_ACCESS_KEY'|'AWS_SECRET_KEY'|'CA_HEALTH_NUMBER'|'CA_SOCIAL_INSURANCE_NUMBER'|'CREDIT_DEBIT_CARD_CVV'|'CREDIT_DEBIT_CARD_EXPIRY'|'CREDIT_DEBIT_CARD_NUMBER'|'DRIVER_ID'|'EMAIL'|'INTERNATIONAL_BANK_ACCOUNT_NUMBER'|'IP_ADDRESS'|'LICENSE_PLATE'|'MAC_ADDRESS'|'NAME'|'PASSWORD'|'PHONE'|'PIN'|'SWIFT_CODE'|'UK_NATIONAL_HEALTH_SERVICE_NUMBER'|'UK_NATIONAL_INSURANCE_NUMBER'|'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER'|'URL'|'USERNAME'|'US_BANK_ACCOUNT_NUMBER'|'US_BANK_ROUTING_NUMBER'|'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER'|'US_PASSPORT_NUMBER'|'US_SOCIAL_SECURITY_NUMBER'|'VEHICLE_IDENTIFICATION_NUMBER', 'action': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'outputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'regexesConfig': [ { 'name': 'string', 'description': 'string', 'pattern': 'string', 'action': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'outputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ] }, contextualGroundingPolicyConfig={ 'filtersConfig': [ { 'type': 'GROUNDING'|'RELEVANCE', 'threshold': 123.0, 'action': 'BLOCK'|'NONE', 'enabled': True|False }, ] }, automatedReasoningPolicyConfig={ 'policies': [ 'string', ], 'confidenceThreshold': 123.0 }, crossRegionConfig={ 'guardrailProfileIdentifier': 'string' }, blockedInputMessaging='string', blockedOutputsMessaging='string', kmsKeyId='string' ) Parameters: * **guardrailIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the guardrail. This can be an ID or the ARN. * **name** (*string*) -- **[REQUIRED]** A name for the guardrail. * **description** (*string*) -- A description of the guardrail. * **topicPolicyConfig** (*dict*) -- The topic policy to configure for the guardrail. * **topicsConfig** *(list) --* **[REQUIRED]** A list of policies related to topics that the guardrail should deny. * *(dict) --* Details about topics for the guardrail to identify and deny. * **name** *(string) --* **[REQUIRED]** The name of the topic to deny. * **definition** *(string) --* **[REQUIRED]** A definition of the topic to deny. * **examples** *(list) --* A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic. * *(string) --* * **type** *(string) --* **[REQUIRED]** Specifies to deny the topic. * **inputAction** *(string) --* Specifies the action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **tierConfig** *(dict) --* The tier that your guardrail uses for denied topic filters. * **tierName** *(string) --* **[REQUIRED]** The tier that your guardrail uses for denied topic filters. Valid values include: * "CLASSIC" tier – Provides established guardrails functionality supporting English, French, and Spanish languages. * "STANDARD" tier – Provides a more robust solution than the "CLASSIC" tier and has more comprehensive language support. This tier requires that your guardrail use cross-Region inference. * **contentPolicyConfig** (*dict*) -- The content policy to configure for the guardrail. * **filtersConfig** *(list) --* **[REQUIRED]** Contains the type of the content filter and how strongly it should apply to prompts and model responses. * *(dict) --* Contains filter strengths for harmful content. Guardrails support the following content filters to detect and filter harmful user inputs and FM-generated outputs. * **Hate** – Describes language or a statement that discriminates, criticizes, insults, denounces, or dehumanizes a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin). * **Insults** – Describes language or a statement that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying. * **Sexual** – Describes language or a statement that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex. * **Violence** – Describes language or a statement that includes glorification of or threats to inflict physical pain, hurt, or injury toward a person, group or thing. Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as *Hate* with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as *Hate* with HIGH confidence, *Insults* with LOW confidence, *Sexual* with NONE confidence, and *Violence* with MEDIUM confidence. For more information, see Guardrails content filters. * **type** *(string) --* **[REQUIRED]** The harmful category that the content filter is applied to. * **inputStrength** *(string) --* **[REQUIRED]** The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces. * **outputStrength** *(string) --* **[REQUIRED]** The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces. * **inputModalities** *(list) --* The input modalities selected for the guardrail content filter configuration. * *(string) --* * **outputModalities** *(list) --* The output modalities selected for the guardrail content filter configuration. * *(string) --* * **inputAction** *(string) --* Specifies the action to take when harmful content is detected. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **tierConfig** *(dict) --* The tier that your guardrail uses for content filters. * **tierName** *(string) --* **[REQUIRED]** The tier that your guardrail uses for content filters. Valid values include: * "CLASSIC" tier – Provides established guardrails functionality supporting English, French, and Spanish languages. * "STANDARD" tier – Provides a more robust solution than the "CLASSIC" tier and has more comprehensive language support. This tier requires that your guardrail use cross-Region inference. * **wordPolicyConfig** (*dict*) -- The word policy to configure for the guardrail. * **wordsConfig** *(list) --* A list of words to configure for the guardrail. * *(dict) --* A word to configure for the guardrail. * **text** *(string) --* **[REQUIRED]** Text of the word configured for the guardrail to block. * **inputAction** *(string) --* Specifies the action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the intput. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **managedWordListsConfig** *(list) --* A list of managed words to configure for the guardrail. * *(dict) --* The managed word list to configure for the guardrail. * **type** *(string) --* **[REQUIRED]** The managed word type to configure for the guardrail. * **inputAction** *(string) --* Specifies the action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **sensitiveInformationPolicyConfig** (*dict*) -- The sensitive information policy to configure for the guardrail. * **piiEntitiesConfig** *(list) --* A list of PII entities to configure to the guardrail. * *(dict) --* The PII entity to configure for the guardrail. * **type** *(string) --* **[REQUIRED]** Configure guardrail type when the PII entity is detected. The following PIIs are used to block or mask sensitive information: * **General** * **ADDRESS** A physical address, such as "100 Main Street, Anytown, USA" or "Suite #12, Building 123". An address can include information such as the street, building, location, city, state, country, county, zip code, precinct, and neighborhood. * **AGE** An individual's age, including the quantity and unit of time. For example, in the phrase "I am 40 years old," Guardrails recognizes "40 years" as an age. * **NAME** An individual's name. This entity type does not include titles, such as Dr., Mr., Mrs., or Miss. guardrails doesn't apply this entity type to names that are part of organizations or addresses. For example, guardrails recognizes the "John Doe Organization" as an organization, and it recognizes "Jane Doe Street" as an address. * **EMAIL** An email address, such as *marymajor@email.com*. * **PHONE** A phone number. This entity type also includes fax and pager numbers. * **USERNAME** A user name that identifies an account, such as a login name, screen name, nick name, or handle. * **PASSWORD** An alphanumeric string that is used as a password, such as "**very20special#pass**". * **DRIVER_ID** The number assigned to a driver's license, which is an official document permitting an individual to operate one or more motorized vehicles on a public road. A driver's license number consists of alphanumeric characters. * **LICENSE_PLATE** A license plate for a vehicle is issued by the state or country where the vehicle is registered. The format for passenger vehicles is typically five to eight digits, consisting of upper- case letters and numbers. The format varies depending on the location of the issuing state or country. * **VEHICLE_IDENTIFICATION_NUMBER** A Vehicle Identification Number (VIN) uniquely identifies a vehicle. VIN content and format are defined in the *ISO 3779* specification. Each country has specific codes and formats for VINs. * **Finance** * **CREDIT_DEBIT_CARD_CVV** A three-digit card verification code (CVV) that is present on VISA, MasterCard, and Discover credit and debit cards. For American Express credit or debit cards, the CVV is a four-digit numeric code. * **CREDIT_DEBIT_CARD_EXPIRY** The expiration date for a credit or debit card. This number is usually four digits long and is often formatted as *month/year* or *MM/YY*. Guardrails recognizes expiration dates such as *01/21*, *01/2021*, and *Jan 2021*. * **CREDIT_DEBIT_CARD_NUMBER** The number for a credit or debit card. These numbers can vary from 13 to 16 digits in length. However, Amazon Comprehend also recognizes credit or debit card numbers when only the last four digits are present. * **PIN** A four-digit personal identification number (PIN) with which you can access your bank account. * **INTERNATIONAL_BANK_ACCOUNT_NUMBER** An International Bank Account Number has specific formats in each country. For more information, see www.iban.com/structure. * **SWIFT_CODE** A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify a particular bank or branch. Banks use these codes for money transfers such as international wire transfers. SWIFT codes consist of eight or 11 characters. The 11-digit codes refer to specific branches, while eight-digit codes (or 11-digit codes ending in 'XXX') refer to the head or primary office. * **IT** * **IP_ADDRESS** An IPv4 address, such as *198.51.100.0*. * **MAC_ADDRESS** A *media access control* (MAC) address is a unique identifier assigned to a network interface controller (NIC). * **URL** A web address, such as *www.example.com*. * **AWS_ACCESS_KEY** A unique identifier that's associated with a secret access key; you use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically. * **AWS_SECRET_KEY** A unique identifier that's associated with an access key. You use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically. * **USA specific** * **US_BANK_ACCOUNT_NUMBER** A US bank account number, which is typically 10 to 12 digits long. * **US_BANK_ROUTING_NUMBER** A US bank account routing number. These are typically nine digits long, * **US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER** A US Individual Taxpayer Identification Number (ITIN) is a nine-digit number that starts with a "9" and contain a "7" or "8" as the fourth digit. An ITIN can be formatted with a space or a dash after the third and forth digits. * **US_PASSPORT_NUMBER** A US passport number. Passport numbers range from six to nine alphanumeric characters. * **US_SOCIAL_SECURITY_NUMBER** A US Social Security Number (SSN) is a nine-digit number that is issued to US citizens, permanent residents, and temporary working residents. * **Canada specific** * **CA_HEALTH_NUMBER** A Canadian Health Service Number is a 10-digit unique identifier, required for individuals to access healthcare benefits. * **CA_SOCIAL_INSURANCE_NUMBER** A Canadian Social Insurance Number (SIN) is a nine-digit unique identifier, required for individuals to access government programs and benefits. The SIN is formatted as three groups of three digits, such as *123-456-789*. A SIN can be validated through a simple check-digit process called the Luhn algorithm. * **UK Specific** * **UK_NATIONAL_HEALTH_SERVICE_NUMBER** A UK National Health Service Number is a 10-17 digit number, such as *485 777 3456*. The current system formats the 10-digit number with spaces after the third and sixth digits. The final digit is an error-detecting checksum. * **UK_NATIONAL_INSURANCE_NUMBER** A UK National Insurance Number (NINO) provides individuals with access to National Insurance (social security) benefits. It is also used for some purposes in the UK tax system. The number is nine digits long and starts with two letters, followed by six numbers and one letter. A NINO can be formatted with a space or a dash after the two letters and after the second, forth, and sixth digits. * **UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER** A UK Unique Taxpayer Reference (UTR) is a 10-digit number that identifies a taxpayer or a business. * **Custom** * **Regex filter** - You can use a regular expressions to define patterns for a guardrail to recognize and act upon such as serial number, booking ID etc.. * **action** *(string) --* **[REQUIRED]** Configure guardrail action when the PII entity is detected. * **inputAction** *(string) --* Specifies the action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "ANONYMIZE" – Mask the content and replace it with identifier tags. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "ANONYMIZE" – Mask the content and replace it with identifier tags. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **regexesConfig** *(list) --* A list of regular expressions to configure to the guardrail. * *(dict) --* The regular expression to configure for the guardrail. * **name** *(string) --* **[REQUIRED]** The name of the regular expression to configure for the guardrail. * **description** *(string) --* The description of the regular expression to configure for the guardrail. * **pattern** *(string) --* **[REQUIRED]** The regular expression pattern to configure for the guardrail. * **action** *(string) --* **[REQUIRED]** The guardrail action to configure when matching regular expression is detected. * **inputAction** *(string) --* Specifies the action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* Specifies the action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **contextualGroundingPolicyConfig** (*dict*) -- The contextual grounding policy configuration used to update a guardrail. * **filtersConfig** *(list) --* **[REQUIRED]** The filter configuration details for the guardrails contextual grounding policy. * *(dict) --* The filter configuration details for the guardrails contextual grounding filter. * **type** *(string) --* **[REQUIRED]** The filter details for the guardrails contextual grounding filter. * **threshold** *(float) --* **[REQUIRED]** The threshold details for the guardrails contextual grounding filter. * **action** *(string) --* Specifies the action to take when content fails the contextual grounding evaluation. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **enabled** *(boolean) --* Specifies whether to enable contextual grounding evaluation. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **automatedReasoningPolicyConfig** (*dict*) -- Updated configuration for Automated Reasoning policies associated with the guardrail. * **policies** *(list) --* **[REQUIRED]** The list of Automated Reasoning policy ARNs to include in the guardrail configuration. * *(string) --* * **confidenceThreshold** *(float) --* The confidence threshold for triggering guardrail actions based on Automated Reasoning policy violations. * **crossRegionConfig** (*dict*) -- The system-defined guardrail profile that you're using with your guardrail. Guardrail profiles define the destination Amazon Web Services Regions where guardrail inference requests can be automatically routed. For more information, see the Amazon Bedrock User Guide. * **guardrailProfileIdentifier** *(string) --* **[REQUIRED]** The ID or Amazon Resource Name (ARN) of the guardrail profile that your guardrail is using. Guardrail profile availability depends on your current Amazon Web Services Region. For more information, see the Amazon Bedrock User Guide. * **blockedInputMessaging** (*string*) -- **[REQUIRED]** The message to return when the guardrail blocks a prompt. * **blockedOutputsMessaging** (*string*) -- **[REQUIRED]** The message to return when the guardrail blocks a model response. * **kmsKeyId** (*string*) -- The ARN of the KMS key with which to encrypt the guardrail. Return type: dict Returns: **Response Syntax** { 'guardrailId': 'string', 'guardrailArn': 'string', 'version': 'string', 'updatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **guardrailId** *(string) --* The unique identifier of the guardrail * **guardrailArn** *(string) --* The ARN of the guardrail. * **version** *(string) --* The version of the guardrail. * **updatedAt** *(datetime) --* The date and time at which the guardrail was updated. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_model_import_job create_model_import_job *********************** Bedrock.Client.create_model_import_job(**kwargs) 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 See also: AWS API Documentation **Request Syntax** response = client.create_model_import_job( jobName='string', importedModelName='string', roleArn='string', modelDataSource={ 's3DataSource': { 's3Uri': 'string' } }, jobTags=[ { 'key': 'string', 'value': 'string' }, ], importedModelTags=[ { 'key': 'string', 'value': 'string' }, ], clientRequestToken='string', vpcConfig={ 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, importedModelKmsKeyId='string' ) Parameters: * **jobName** (*string*) -- **[REQUIRED]** The name of the import job. * **importedModelName** (*string*) -- **[REQUIRED]** The name of the imported model. * **roleArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the model import job. * **modelDataSource** (*dict*) -- **[REQUIRED]** The data source for the imported model. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "s3DataSource". * **s3DataSource** *(dict) --* The Amazon S3 data source of the model to import. * **s3Uri** *(string) --* **[REQUIRED]** The URI of the Amazon S3 data source. * **jobTags** (*list*) -- Tags to attach to this import job. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. * **importedModelTags** (*list*) -- Tags to attach to the imported model. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **vpcConfig** (*dict*) -- VPC configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for the import job. * **subnetIds** *(list) --* **[REQUIRED]** An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* **[REQUIRED]** An array of IDs for each security group in the VPC to use. * *(string) --* * **importedModelKmsKeyId** (*string*) -- The imported model is encrypted at rest using this key. Return type: dict Returns: **Response Syntax** { 'jobArn': 'string' } **Response Structure** * *(dict) --* * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the model import job. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_automated_reasoning_policy delete_automated_reasoning_policy ********************************* Bedrock.Client.delete_automated_reasoning_policy(**kwargs) Deletes an Automated Reasoning policy or policy version. This operation is idempotent. If you delete a policy more than once, each call succeeds. Deleting a policy removes it permanently and cannot be undone. See also: AWS API Documentation **Request Syntax** response = client.delete_automated_reasoning_policy( policyArn='string' ) Parameters: **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy to delete. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_foundation_model_agreement create_foundation_model_agreement ********************************* Bedrock.Client.create_foundation_model_agreement(**kwargs) Request a model access agreement for the specified model. See also: AWS API Documentation **Request Syntax** response = client.create_foundation_model_agreement( offerToken='string', modelId='string' ) Parameters: * **offerToken** (*string*) -- **[REQUIRED]** An offer token encapsulates the information for an offer. * **modelId** (*string*) -- **[REQUIRED]** Model Id of the model for the access request. Return type: dict Returns: **Response Syntax** { 'modelId': 'string' } **Response Structure** * *(dict) --* * **modelId** *(string) --* Model Id of the model for the access request. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_custom_models list_custom_models ****************** Bedrock.Client.list_custom_models(**kwargs) Returns a list of the custom models that you have created with the "CreateModelCustomizationJob" operation. For more information, see Custom models in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.list_custom_models( creationTimeBefore=datetime(2015, 1, 1), creationTimeAfter=datetime(2015, 1, 1), nameContains='string', baseModelArnEquals='string', foundationModelArnEquals='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', isOwned=True|False, modelStatus='Active'|'Creating'|'Failed' ) Parameters: * **creationTimeBefore** (*datetime*) -- Return custom models created before the specified time. * **creationTimeAfter** (*datetime*) -- Return custom models created after the specified time. * **nameContains** (*string*) -- Return custom models only if the job name contains these characters. * **baseModelArnEquals** (*string*) -- Return custom models only if the base model Amazon Resource Name (ARN) matches this parameter. * **foundationModelArnEquals** (*string*) -- Return custom models only if the foundation model Amazon Resource Name (ARN) matches this parameter. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. * **sortBy** (*string*) -- The field to sort by in the returned list of models. * **sortOrder** (*string*) -- The sort order of the results. * **isOwned** (*boolean*) -- Return custom models depending on if the current account owns them ( "true") or if they were shared with the current account ( "false"). * **modelStatus** (*string*) -- The status of them model to filter results by. Possible values include: * "Creating" - Include only models that are currently being created and validated. * "Active" - Include only models that have been successfully created and are ready for use. * "Failed" - Include only models where the creation process failed. If you don't specify a status, the API returns models in all states. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'modelSummaries': [ { 'modelArn': 'string', 'modelName': 'string', 'creationTime': datetime(2015, 1, 1), 'baseModelArn': 'string', 'baseModelName': 'string', 'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION'|'IMPORTED', 'ownerAccountId': 'string', 'modelStatus': 'Active'|'Creating'|'Failed' }, ] } **Response Structure** * *(dict) --* * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. * **modelSummaries** *(list) --* Model summaries. * *(dict) --* Summary information for a custom model. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the custom model. * **modelName** *(string) --* The name of the custom model. * **creationTime** *(datetime) --* Creation time of the model. * **baseModelArn** *(string) --* The base model Amazon Resource Name (ARN). * **baseModelName** *(string) --* The base model name. * **customizationType** *(string) --* Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models. * **ownerAccountId** *(string) --* The unique identifier of the account that owns the model. * **modelStatus** *(string) --* The current status of the custom model. Possible values include: * "Creating" - The model is being created and validated. * "Active" - The model has been successfully created and is ready for use. * "Failed" - The model creation process failed. **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_automated_reasoning_policy_test_results list_automated_reasoning_policy_test_results ******************************************** Bedrock.Client.list_automated_reasoning_policy_test_results(**kwargs) Lists test results for an Automated Reasoning policy, showing how the policy performed against various test scenarios and validation checks. See also: AWS API Documentation **Request Syntax** response = client.list_automated_reasoning_policy_test_results( policyArn='string', buildWorkflowId='string', nextToken='string', maxResults=123 ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy whose test results you want to list. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The unique identifier of the build workflow whose test results you want to list. * **nextToken** (*string*) -- A pagination token from a previous request to continue listing test results from where the previous request left off. * **maxResults** (*integer*) -- The maximum number of test results to return in a single response. Valid range is 1-100. Return type: dict Returns: **Response Syntax** { 'testResults': [ { 'testCase': { 'testCaseId': 'string', 'guardContent': 'string', 'queryContent': 'string', 'expectedAggregatedFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'confidenceThreshold': 123.0 }, 'policyArn': 'string', 'testRunStatus': 'NOT_STARTED'|'SCHEDULED'|'IN_PROGRESS'|'COMPLETED'|'FAILED', 'testFindings': [ { 'valid': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'claimsTrueScenario': { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, 'supportingRules': [ { 'id': 'string', 'policyVersionArn': 'string' }, ], 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'invalid': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'contradictingRules': [ { 'id': 'string', 'policyVersionArn': 'string' }, ], 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'satisfiable': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'claimsTrueScenario': { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, 'claimsFalseScenario': { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'impossible': { 'translation': { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, 'contradictingRules': [ { 'id': 'string', 'policyVersionArn': 'string' }, ], 'logicWarning': { 'type': 'ALWAYS_TRUE'|'ALWAYS_FALSE', 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] } }, 'translationAmbiguous': { 'options': [ { 'translations': [ { 'premises': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'claims': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ], 'untranslatedPremises': [ { 'text': 'string' }, ], 'untranslatedClaims': [ { 'text': 'string' }, ], 'confidence': 123.0 }, ] }, ], 'differenceScenarios': [ { 'statements': [ { 'logic': 'string', 'naturalLanguage': 'string' }, ] }, ] }, 'tooComplex': {}, 'noTranslations': {} }, ], 'testRunResult': 'PASSED'|'FAILED', 'aggregatedTestFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **testResults** *(list) --* A list of test results, each containing information about how the policy performed on specific test scenarios. * *(dict) --* Contains the results of testing an Automated Reasoning policy against various scenarios and validation checks. * **testCase** *(dict) --* Represents a test for validating an Automated Reasoning policy. tests contain sample inputs and expected outcomes to verify policy behavior. * **testCaseId** *(string) --* The unique identifier of the test. * **guardContent** *(string) --* The output content to be validated by the policy, typically representing a foundation model response. * **queryContent** *(string) --* The input query or prompt that generated the content. This provides context for the validation. * **expectedAggregatedFindingsResult** *(string) --* The expected result of the Automated Reasoning check for this test. * **createdAt** *(datetime) --* The timestamp when the test was created. * **updatedAt** *(datetime) --* The timestamp when the test was last updated. * **confidenceThreshold** *(float) --* The minimum confidence level for logic validation. Content meeting this threshold is considered high- confidence and can be validated. * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy that was tested. * **testRunStatus** *(string) --* The overall status of the test run (e.g., COMPLETED, FAILED, IN_PROGRESS). * **testFindings** *(list) --* Detailed findings from the test run, including any issues, violations, or unexpected behaviors discovered. * *(dict) --* Represents the result of an Automated Reasoning validation check, indicating whether the content is logically valid, invalid, or falls into other categories based on the policy rules. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "valid", "invalid", "satisfiable", "impossible", "translationAmbiguous", "tooComplex", "noTranslations". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **valid** *(dict) --* Indicates that the claims are true. The claims are implied by the premises and the Automated Reasoning policy. Given the Automated Reasoning policy and premises, it is not possible for these claims to be false. * **translation** *(dict) --* The logical translation of the input that this finding validates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **claimsTrueScenario** *(dict) --* An example scenario demonstrating how the claims are logically true. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **supportingRules** *(list) --* The automated reasoning policy rules that support why this result is considered valid. * *(dict) --* References a specific automated reasoning policy rule that was applied during evaluation. * **id** *(string) --* The unique identifier of the automated reasoning rule. * **policyVersionArn** *(string) --* The ARN of the automated reasoning policy version that contains this rule. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **invalid** *(dict) --* Indicates that the claims are false. The claims are not implied by the premises and Automated Reasoning policy. Furthermore, there exist different claims that are consistent with the premises and Automated Reasoning policy. * **translation** *(dict) --* The logical translation of the input that this finding invalidates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **contradictingRules** *(list) --* The automated reasoning policy rules that contradict the claims in the input. * *(dict) --* References a specific automated reasoning policy rule that was applied during evaluation. * **id** *(string) --* The unique identifier of the automated reasoning rule. * **policyVersionArn** *(string) --* The ARN of the automated reasoning policy version that contains this rule. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **satisfiable** *(dict) --* Indicates that the claims can be true or false. It depends on what assumptions are made for the claim to be implied from the premises and Automated Reasoning policy rules. In this situation, different assumptions can make input claims false and alternative claims true. * **translation** *(dict) --* The logical translation of the input that this finding evaluates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **claimsTrueScenario** *(dict) --* An example scenario demonstrating how the claims could be logically true. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claimsFalseScenario** *(dict) --* An example scenario demonstrating how the claims could be logically false. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **impossible** *(dict) --* Indicates that Automated Reasoning cannot make a statement about the claims. This can happen if the premises are logically incorrect, or if there is a conflict within the Automated Reasoning policy itself. * **translation** *(dict) --* The logical translation of the input that this finding evaluates. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **contradictingRules** *(list) --* The automated reasoning policy rules that contradict the claims and/or premises in the input. * *(dict) --* References a specific automated reasoning policy rule that was applied during evaluation. * **id** *(string) --* The unique identifier of the automated reasoning rule. * **policyVersionArn** *(string) --* The ARN of the automated reasoning policy version that contains this rule. * **logicWarning** *(dict) --* Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules. * **type** *(string) --* The category of the detected logical issue, such as statements that are always true or always false. * **premises** *(list) --* The logical statements that serve as premises under which the claims are validated. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are validated while assuming the policy and premises. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **translationAmbiguous** *(dict) --* Indicates that an ambiguity was detected in the translation, making it unsound to continue with validity checking. Additional context or follow-up questions might be needed to get translation to succeed. * **options** *(list) --* Different logical interpretations that were detected during translation of the input. * *(dict) --* Represents one possible logical interpretation of ambiguous input content. * **translations** *(list) --* Different logical interpretations that were detected during translation of the input. * *(dict) --* Contains the logical translation of natural language input into formal logical statements, including premises, claims, and confidence scores. * **premises** *(list) --* The logical statements that serve as the foundation or assumptions for the claims. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **claims** *(list) --* The logical statements that are being validated against the premises and policy rules. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human-readable interpretation of the formal logic. * **untranslatedPremises** *(list) --* References to portions of the original input text that correspond to the premises but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **untranslatedClaims** *(list) --* References to portions of the original input text that correspond to the claims but could not be fully translated. * *(dict) --* References a portion of the original input text that corresponds to logical elements. * **text** *(string) --* The specific text from the original input that this reference points to. * **confidence** *(float) --* A confidence score between 0 and 1 indicating how certain the system is about the logical translation. * **differenceScenarios** *(list) --* Scenarios showing how the different translation options differ in meaning. * *(dict) --* Represents a logical scenario where claims can be evaluated as true or false, containing specific logical assignments. * **statements** *(list) --* List of logical assignments and statements that define this scenario. * *(dict) --* Represents a logical statement that can be expressed both in formal logic notation and natural language, providing dual representations for better understanding and validation. * **logic** *(string) --* The formal logic representation of the statement using mathematical notation and logical operators. * **naturalLanguage** *(string) --* The natural language representation of the logical statement, providing a human- readable interpretation of the formal logic. * **tooComplex** *(dict) --* Indicates that the input contains too much information for Automated Reasoning to process within its latency limits. * **noTranslations** *(dict) --* Identifies that some or all of the input prompt wasn't translated into logic. This can happen if the input isn't relevant to the Automated Reasoning policy, or if the policy doesn't have variables to model relevant input. * **testRunResult** *(string) --* The overall result of the test run, indicating whether the policy passed or failed validation. * **aggregatedTestFindingsResult** *(string) --* A summary of all test findings, aggregated to provide an overall assessment of policy quality and correctness. * **updatedAt** *(datetime) --* The timestamp when the test results were last updated. * **nextToken** *(string) --* A pagination token to use in subsequent requests to retrieve additional test results. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ServiceQuotaExceededException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / list_guardrails list_guardrails *************** Bedrock.Client.list_guardrails(**kwargs) Lists details about all the guardrails in an account. To list the "DRAFT" version of all your guardrails, don't specify the "guardrailIdentifier" field. To list all versions of a guardrail, specify the ARN of the guardrail in the "guardrailIdentifier" field. You can set the maximum number of results to return in a response in the "maxResults" field. If there are more results than the number you set, the response returns a "nextToken" that you can send in another "ListGuardrails" request to see the next batch of results. See also: AWS API Documentation **Request Syntax** response = client.list_guardrails( guardrailIdentifier='string', maxResults=123, nextToken='string' ) Parameters: * **guardrailIdentifier** (*string*) -- The unique identifier of the guardrail. This can be an ID or the ARN. * **maxResults** (*integer*) -- The maximum number of results to return in the response. * **nextToken** (*string*) -- If there are more results than were returned in the response, the response returns a "nextToken" that you can send in another "ListGuardrails" request to see the next batch of results. Return type: dict Returns: **Response Syntax** { 'guardrails': [ { 'id': 'string', 'arn': 'string', 'status': 'CREATING'|'UPDATING'|'VERSIONING'|'READY'|'FAILED'|'DELETING', 'name': 'string', 'description': 'string', 'version': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'crossRegionDetails': { 'guardrailProfileId': 'string', 'guardrailProfileArn': 'string' } }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **guardrails** *(list) --* A list of objects, each of which contains details about a guardrail. * *(dict) --* Contains details about a guardrail. This data type is used in the following API operations: * ListGuardrails response body * **id** *(string) --* The unique identifier of the guardrail. * **arn** *(string) --* The ARN of the guardrail. * **status** *(string) --* The status of the guardrail. * **name** *(string) --* The name of the guardrail. * **description** *(string) --* A description of the guardrail. * **version** *(string) --* The version of the guardrail. * **createdAt** *(datetime) --* The date and time at which the guardrail was created. * **updatedAt** *(datetime) --* The date and time at which the guardrail was last updated. * **crossRegionDetails** *(dict) --* Details about the system-defined guardrail profile that you're using with your guardrail, including the guardrail profile ID and Amazon Resource Name (ARN). * **guardrailProfileId** *(string) --* The ID of the guardrail profile that your guardrail is using. Profile availability depends on your current Amazon Web Services Region. For more information, see the Amazon Bedrock User Guide. * **guardrailProfileArn** *(string) --* The Amazon Resource Name (ARN) of the guardrail profile that you're using with your guardrail. * **nextToken** *(string) --* If there are more results than were returned in the response, the response returns a "nextToken" that you can send in another "ListGuardrails" request to see the next batch of results. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_automated_reasoning_policy_test_case delete_automated_reasoning_policy_test_case ******************************************* Bedrock.Client.delete_automated_reasoning_policy_test_case(**kwargs) Deletes an Automated Reasoning policy test. This operation is idempotent; if you delete a test more than once, each call succeeds. See also: AWS API Documentation **Request Syntax** response = client.delete_automated_reasoning_policy_test_case( policyArn='string', testCaseId='string', lastUpdatedAt=datetime(2015, 1, 1) ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy that contains the test. * **testCaseId** (*string*) -- **[REQUIRED]** The unique identifier of the test to delete. * **lastUpdatedAt** (*datetime*) -- **[REQUIRED]** The timestamp when the test was last updated. This is used as a concurrency token to prevent conflicting modifications. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ResourceInUseException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / tag_resource tag_resource ************ Bedrock.Client.tag_resource(**kwargs) Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.tag_resource( resourceARN='string', tags=[ { 'key': 'string', 'value': 'string' }, ] ) Parameters: * **resourceARN** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource to tag. * **tags** (*list*) -- **[REQUIRED]** Tags to associate with the resource. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_marketplace_model_endpoint get_marketplace_model_endpoint ****************************** Bedrock.Client.get_marketplace_model_endpoint(**kwargs) Retrieves details about a specific endpoint for a model from Amazon Bedrock Marketplace. See also: AWS API Documentation **Request Syntax** response = client.get_marketplace_model_endpoint( endpointArn='string' ) Parameters: **endpointArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the endpoint you want to get information about. Return type: dict Returns: **Response Syntax** { 'marketplaceModelEndpoint': { 'endpointArn': 'string', 'modelSourceIdentifier': 'string', 'status': 'REGISTERED'|'INCOMPATIBLE_ENDPOINT', 'statusMessage': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'endpointConfig': { 'sageMaker': { 'initialInstanceCount': 123, 'instanceType': 'string', 'executionRole': 'string', 'kmsEncryptionKey': 'string', 'vpc': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] } } }, 'endpointStatus': 'string', 'endpointStatusMessage': 'string' } } **Response Structure** * *(dict) --* * **marketplaceModelEndpoint** *(dict) --* Details about the requested endpoint. * **endpointArn** *(string) --* The Amazon Resource Name (ARN) of the endpoint. * **modelSourceIdentifier** *(string) --* The ARN of the model from Amazon Bedrock Marketplace that is deployed on this endpoint. * **status** *(string) --* The overall status of the endpoint in Amazon Bedrock Marketplace (e.g., ACTIVE, INACTIVE). * **statusMessage** *(string) --* Additional information about the overall status, if available. * **createdAt** *(datetime) --* The timestamp when the endpoint was registered. * **updatedAt** *(datetime) --* The timestamp when the endpoint was last updated. * **endpointConfig** *(dict) --* The configuration of the endpoint, including the number and type of instances used. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "sageMaker". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **sageMaker** *(dict) --* The configuration specific to Amazon SageMaker for the endpoint. * **initialInstanceCount** *(integer) --* The number of Amazon EC2 compute instances to deploy for initial endpoint creation. * **instanceType** *(string) --* The Amazon EC2 compute instance type to deploy for hosting the model. * **executionRole** *(string) --* The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on Amazon EC2 compute instances or for batch transform jobs. * **kmsEncryptionKey** *(string) --* The Amazon Web Services KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the Amazon EC2 compute instance that hosts the endpoint. * **vpc** *(dict) --* The VPC configuration for the endpoint. * **subnetIds** *(list) --* An array of IDs for each subnet in the VPC to use. * *(string) --* * **securityGroupIds** *(list) --* An array of IDs for each security group in the VPC to use. * *(string) --* * **endpointStatus** *(string) --* The current status of the endpoint (e.g., Creating, InService, Updating, Failed). * **endpointStatusMessage** *(string) --* Additional information about the endpoint status, if available. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / update_provisioned_model_throughput update_provisioned_model_throughput *********************************** Bedrock.Client.update_provisioned_model_throughput(**kwargs) Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.update_provisioned_model_throughput( provisionedModelId='string', desiredProvisionedModelName='string', desiredModelId='string' ) Parameters: * **provisionedModelId** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) or name of the Provisioned Throughput to update. * **desiredProvisionedModelName** (*string*) -- The new name for this Provisioned Throughput. * **desiredModelId** (*string*) -- The Amazon Resource Name (ARN) of the new model to associate with this Provisioned Throughput. You can't specify this field if this Provisioned Throughput is associated with a base model. If this Provisioned Throughput is associated with a custom model, you can specify one of the following options: * The base model from which the custom model was customized. * Another custom model that was customized from the same base model as the custom model. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_use_case_for_model_access get_use_case_for_model_access ***************************** Bedrock.Client.get_use_case_for_model_access() Get usecase for model access. See also: AWS API Documentation **Request Syntax** response = client.get_use_case_for_model_access() Return type: dict Returns: **Response Syntax** { 'formData': b'bytes' } **Response Structure** * *(dict) --* * **formData** *(bytes) --* Get customer profile Response. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / create_model_copy_job create_model_copy_job ********************* Bedrock.Client.create_model_copy_job(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.create_model_copy_job( sourceModelArn='string', targetModelName='string', modelKmsKeyId='string', targetModelTags=[ { 'key': 'string', 'value': 'string' }, ], clientRequestToken='string' ) Parameters: * **sourceModelArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the model to be copied. * **targetModelName** (*string*) -- **[REQUIRED]** A name for the copied model. * **modelKmsKeyId** (*string*) -- The ARN of the KMS key that you use to encrypt the model copy. * **targetModelTags** (*list*) -- Tags to associate with the target model. For more information, see Tag resources in the Amazon Bedrock User Guide. * *(dict) --* Definition of the key/value pair for a tag. * **key** *(string) --* **[REQUIRED]** Key for the tag. * **value** *(string) --* **[REQUIRED]** Value for the tag. * **clientRequestToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. Return type: dict Returns: **Response Syntax** { 'jobArn': 'string' } **Response Structure** * *(dict) --* * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the model copy job. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.TooManyTagsException" Bedrock / Client / list_model_import_jobs list_model_import_jobs ********************** Bedrock.Client.list_model_import_jobs(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.list_model_import_jobs( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='InProgress'|'Completed'|'Failed', nameContains='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending' ) Parameters: * **creationTimeAfter** (*datetime*) -- Return import jobs that were created after the specified time. * **creationTimeBefore** (*datetime*) -- Return import jobs that were created before the specified time. * **statusEquals** (*string*) -- Return imported jobs with the specified status. * **nameContains** (*string*) -- Return imported jobs only if the job name contains these characters. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. * **sortBy** (*string*) -- The field to sort by in the returned list of imported jobs. * **sortOrder** (*string*) -- Specifies whether to sort the results in ascending or descending order. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'modelImportJobSummaries': [ { 'jobArn': 'string', 'jobName': 'string', 'status': 'InProgress'|'Completed'|'Failed', 'lastModifiedTime': datetime(2015, 1, 1), 'creationTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'importedModelArn': 'string', 'importedModelName': 'string' }, ] } **Response Structure** * *(dict) --* * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. * **modelImportJobSummaries** *(list) --* Import job summaries. * *(dict) --* Information about the import job. * **jobArn** *(string) --* The Amazon Resource Name (ARN) of the import job. * **jobName** *(string) --* The name of the import job. * **status** *(string) --* The status of the imported job. * **lastModifiedTime** *(datetime) --* The time when the import job was last modified. * **creationTime** *(datetime) --* The time import job was created. * **endTime** *(datetime) --* The time when import job ended. * **importedModelArn** *(string) --* The Amazon resource Name (ARN) of the imported model. * **importedModelName** *(string) --* The name of the imported model. **Exceptions** * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_automated_reasoning_policy_next_scenario get_automated_reasoning_policy_next_scenario ******************************************** Bedrock.Client.get_automated_reasoning_policy_next_scenario(**kwargs) Retrieves the next test scenario for validating an Automated Reasoning policy. This is used during the interactive policy refinement process to test policy behavior. See also: AWS API Documentation **Request Syntax** response = client.get_automated_reasoning_policy_next_scenario( policyArn='string', buildWorkflowId='string' ) Parameters: * **policyArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the Automated Reasoning policy for which you want to get the next test scenario. * **buildWorkflowId** (*string*) -- **[REQUIRED]** The unique identifier of the build workflow associated with the test scenarios. Return type: dict Returns: **Response Syntax** { 'policyArn': 'string', 'scenario': { 'expression': 'string', 'alternateExpression': 'string', 'ruleIds': [ 'string', ], 'expectedResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION' } } **Response Structure** * *(dict) --* * **policyArn** *(string) --* The Amazon Resource Name (ARN) of the Automated Reasoning policy. * **scenario** *(dict) --* The next test scenario to validate, including the test expression and expected results. * **expression** *(string) --* The logical expression or condition that defines this test scenario. * **alternateExpression** *(string) --* An alternative way to express the same test scenario, used for validation and comparison purposes. * **ruleIds** *(list) --* The list of rule identifiers that are expected to be triggered or evaluated by this test scenario. * *(string) --* * **expectedResult** *(string) --* The expected outcome when this scenario is evaluated against the policy (e.g., PASS, FAIL, VIOLATION). **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / get_guardrail get_guardrail ************* Bedrock.Client.get_guardrail(**kwargs) Gets details about a guardrail. If you don't specify a version, the response returns details for the "DRAFT" version. See also: AWS API Documentation **Request Syntax** response = client.get_guardrail( guardrailIdentifier='string', guardrailVersion='string' ) Parameters: * **guardrailIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the guardrail for which to get details. This can be an ID or the ARN. * **guardrailVersion** (*string*) -- The version of the guardrail for which to get details. If you don't specify a version, the response returns details for the "DRAFT" version. Return type: dict Returns: **Response Syntax** { 'name': 'string', 'description': 'string', 'guardrailId': 'string', 'guardrailArn': 'string', 'version': 'string', 'status': 'CREATING'|'UPDATING'|'VERSIONING'|'READY'|'FAILED'|'DELETING', 'topicPolicy': { 'topics': [ { 'name': 'string', 'definition': 'string', 'examples': [ 'string', ], 'type': 'DENY', 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'tier': { 'tierName': 'CLASSIC'|'STANDARD' } }, 'contentPolicy': { 'filters': [ { 'type': 'SEXUAL'|'VIOLENCE'|'HATE'|'INSULTS'|'MISCONDUCT'|'PROMPT_ATTACK', 'inputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH', 'outputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH', 'inputModalities': [ 'TEXT'|'IMAGE', ], 'outputModalities': [ 'TEXT'|'IMAGE', ], 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'tier': { 'tierName': 'CLASSIC'|'STANDARD' } }, 'wordPolicy': { 'words': [ { 'text': 'string', 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'managedWordLists': [ { 'type': 'PROFANITY', 'inputAction': 'BLOCK'|'NONE', 'outputAction': 'BLOCK'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ] }, 'sensitiveInformationPolicy': { 'piiEntities': [ { 'type': 'ADDRESS'|'AGE'|'AWS_ACCESS_KEY'|'AWS_SECRET_KEY'|'CA_HEALTH_NUMBER'|'CA_SOCIAL_INSURANCE_NUMBER'|'CREDIT_DEBIT_CARD_CVV'|'CREDIT_DEBIT_CARD_EXPIRY'|'CREDIT_DEBIT_CARD_NUMBER'|'DRIVER_ID'|'EMAIL'|'INTERNATIONAL_BANK_ACCOUNT_NUMBER'|'IP_ADDRESS'|'LICENSE_PLATE'|'MAC_ADDRESS'|'NAME'|'PASSWORD'|'PHONE'|'PIN'|'SWIFT_CODE'|'UK_NATIONAL_HEALTH_SERVICE_NUMBER'|'UK_NATIONAL_INSURANCE_NUMBER'|'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER'|'URL'|'USERNAME'|'US_BANK_ACCOUNT_NUMBER'|'US_BANK_ROUTING_NUMBER'|'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER'|'US_PASSPORT_NUMBER'|'US_SOCIAL_SECURITY_NUMBER'|'VEHICLE_IDENTIFICATION_NUMBER', 'action': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'outputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ], 'regexes': [ { 'name': 'string', 'description': 'string', 'pattern': 'string', 'action': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'outputAction': 'BLOCK'|'ANONYMIZE'|'NONE', 'inputEnabled': True|False, 'outputEnabled': True|False }, ] }, 'contextualGroundingPolicy': { 'filters': [ { 'type': 'GROUNDING'|'RELEVANCE', 'threshold': 123.0, 'action': 'BLOCK'|'NONE', 'enabled': True|False }, ] }, 'automatedReasoningPolicy': { 'policies': [ 'string', ], 'confidenceThreshold': 123.0 }, 'crossRegionDetails': { 'guardrailProfileId': 'string', 'guardrailProfileArn': 'string' }, 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'statusReasons': [ 'string', ], 'failureRecommendations': [ 'string', ], 'blockedInputMessaging': 'string', 'blockedOutputsMessaging': 'string', 'kmsKeyArn': 'string' } **Response Structure** * *(dict) --* * **name** *(string) --* The name of the guardrail. * **description** *(string) --* The description of the guardrail. * **guardrailId** *(string) --* The unique identifier of the guardrail. * **guardrailArn** *(string) --* The ARN of the guardrail. * **version** *(string) --* The version of the guardrail. * **status** *(string) --* The status of the guardrail. * **topicPolicy** *(dict) --* The topic policy that was configured for the guardrail. * **topics** *(list) --* A list of policies related to topics that the guardrail should deny. * *(dict) --* Details about topics for the guardrail to identify and deny. This data type is used in the following API operations: * GetGuardrail response body * **name** *(string) --* The name of the topic to deny. * **definition** *(string) --* A definition of the topic to deny. * **examples** *(list) --* A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic. * *(string) --* * **type** *(string) --* Specifies to deny the topic. * **inputAction** *(string) --* The action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* The action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **tier** *(dict) --* The tier that your guardrail uses for denied topic filters. * **tierName** *(string) --* The tier that your guardrail uses for denied topic filters. Valid values include: * "CLASSIC" tier – Provides established guardrails functionality supporting English, French, and Spanish languages. * "STANDARD" tier – Provides a more robust solution than the "CLASSIC" tier and has more comprehensive language support. This tier requires that your guardrail use cross-Region inference. * **contentPolicy** *(dict) --* The content policy that was configured for the guardrail. * **filters** *(list) --* Contains the type of the content filter and how strongly it should apply to prompts and model responses. * *(dict) --* Contains filter strengths for harmful content. Guardrails support the following content filters to detect and filter harmful user inputs and FM-generated outputs. * **Hate** – Describes language or a statement that discriminates, criticizes, insults, denounces, or dehumanizes a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin). * **Insults** – Describes language or a statement that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying. * **Sexual** – Describes language or a statement that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex. * **Violence** – Describes language or a statement that includes glorification of or threats to inflict physical pain, hurt, or injury toward a person, group or thing. Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as *Hate* with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as *Hate* with HIGH confidence, *Insults* with LOW confidence, *Sexual* with NONE confidence, and *Violence* with MEDIUM confidence. For more information, see Guardrails content filters. This data type is used in the following API operations: * GetGuardrail response body * **type** *(string) --* The harmful category that the content filter is applied to. * **inputStrength** *(string) --* The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces. * **outputStrength** *(string) --* The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces. * **inputModalities** *(list) --* The input modalities selected for the guardrail content filter. * *(string) --* * **outputModalities** *(list) --* The output modalities selected for the guardrail content filter. * *(string) --* * **inputAction** *(string) --* The action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* The action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **tier** *(dict) --* The tier that your guardrail uses for content filters. * **tierName** *(string) --* The tier that your guardrail uses for content filters. Valid values include: * "CLASSIC" tier – Provides established guardrails functionality supporting English, French, and Spanish languages. * "STANDARD" tier – Provides a more robust solution than the "CLASSIC" tier and has more comprehensive language support. This tier requires that your guardrail use cross-Region inference. * **wordPolicy** *(dict) --* The word policy that was configured for the guardrail. * **words** *(list) --* A list of words configured for the guardrail. * *(dict) --* A word configured for the guardrail. * **text** *(string) --* Text of the word configured for the guardrail to block. * **inputAction** *(string) --* The action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* The action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **managedWordLists** *(list) --* A list of managed words configured for the guardrail. * *(dict) --* The managed word list that was configured for the guardrail. (This is a list of words that are pre-defined and managed by guardrails only.) * **type** *(string) --* ManagedWords$type The managed word type that was configured for the guardrail. (For now, we only offer profanity word list) * **inputAction** *(string) --* The action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* The action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **sensitiveInformationPolicy** *(dict) --* The sensitive information policy that was configured for the guardrail. * **piiEntities** *(list) --* The list of PII entities configured for the guardrail. * *(dict) --* The PII entity configured for the guardrail. * **type** *(string) --* The type of PII entity. For example, Social Security Number. * **action** *(string) --* The configured guardrail action when PII entity is detected. * **inputAction** *(string) --* The action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "ANONYMIZE" – Mask the content and replace it with identifier tags. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* The action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "ANONYMIZE" – Mask the content and replace it with identifier tags. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **regexes** *(list) --* The list of regular expressions configured for the guardrail. * *(dict) --* The regular expression configured for the guardrail. * **name** *(string) --* The name of the regular expression for the guardrail. * **description** *(string) --* The description of the regular expression for the guardrail. * **pattern** *(string) --* The pattern of the regular expression configured for the guardrail. * **action** *(string) --* The action taken when a match to the regular expression is detected. * **inputAction** *(string) --* The action to take when harmful content is detected in the input. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **outputAction** *(string) --* The action to take when harmful content is detected in the output. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **inputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **outputEnabled** *(boolean) --* Indicates whether guardrail evaluation is enabled on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **contextualGroundingPolicy** *(dict) --* The contextual grounding policy used in the guardrail. * **filters** *(list) --* The filter details for the guardrails contextual grounding policy. * *(dict) --* The details for the guardrails contextual grounding filter. * **type** *(string) --* The filter type details for the guardrails contextual grounding filter. * **threshold** *(float) --* The threshold details for the guardrails contextual grounding filter. * **action** *(string) --* The action to take when content fails the contextual grounding evaluation. Supported values include: * "BLOCK" – Block the content and replace it with blocked messaging. * "NONE" – Take no action but return detection information in the trace response. * **enabled** *(boolean) --* Indicates whether contextual grounding is enabled for evaluation. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response. * **automatedReasoningPolicy** *(dict) --* The current Automated Reasoning policy configuration for the guardrail, if any is configured. * **policies** *(list) --* The list of Automated Reasoning policy ARNs that should be applied as part of this guardrail configuration. * *(string) --* * **confidenceThreshold** *(float) --* The minimum confidence level required for Automated Reasoning policy violations to trigger guardrail actions. Values range from 0.0 to 1.0. * **crossRegionDetails** *(dict) --* Details about the system-defined guardrail profile that you're using with your guardrail, including the guardrail profile ID and Amazon Resource Name (ARN). * **guardrailProfileId** *(string) --* The ID of the guardrail profile that your guardrail is using. Profile availability depends on your current Amazon Web Services Region. For more information, see the Amazon Bedrock User Guide. * **guardrailProfileArn** *(string) --* The Amazon Resource Name (ARN) of the guardrail profile that you're using with your guardrail. * **createdAt** *(datetime) --* The date and time at which the guardrail was created. * **updatedAt** *(datetime) --* The date and time at which the guardrail was updated. * **statusReasons** *(list) --* Appears if the "status" is "FAILED". A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted. * *(string) --* * **failureRecommendations** *(list) --* Appears if the "status" of the guardrail is "FAILED". A list of recommendations to carry out before retrying the request. * *(string) --* * **blockedInputMessaging** *(string) --* The message that the guardrail returns when it blocks a prompt. * **blockedOutputsMessaging** *(string) --* The message that the guardrail returns when it blocks a model response. * **kmsKeyArn** *(string) --* The ARN of the KMS key that encrypts the guardrail. **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException" Bedrock / Client / delete_custom_model delete_custom_model ******************* Bedrock.Client.delete_custom_model(**kwargs) Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.delete_custom_model( modelIdentifier='string' ) Parameters: **modelIdentifier** (*string*) -- **[REQUIRED]** Name of the model to delete. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "Bedrock.Client.exceptions.ResourceNotFoundException" * "Bedrock.Client.exceptions.AccessDeniedException" * "Bedrock.Client.exceptions.ValidationException" * "Bedrock.Client.exceptions.ConflictException" * "Bedrock.Client.exceptions.InternalServerException" * "Bedrock.Client.exceptions.ThrottlingException"