2024/10/29 - Amazon Bedrock - 2 new2 updated api methods
Changes Update Application Inference Profile
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
client.create_inference_profile( inferenceProfileName='string', description='string', clientRequestToken='string', modelSource={ 'copyFrom': 'string' }, tags=[ { 'key': 'string', 'value': 'string' }, ] )
string
[REQUIRED]
A name for the inference profile.
string
A description for the inference profile.
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.
dict
[REQUIRED]
The foundation model or system-defined inference profile that the inference profile will track metrics and costs for.
copyFrom (string) --
The ARN of the model or system-defined inference profile that is the source for the inference profile.
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.
dict
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.
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
client.delete_inference_profile( inferenceProfileIdentifier='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) or ID of the application inference profile to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
{'type': {'APPLICATION'}}
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
client.get_inference_profile( inferenceProfileIdentifier='string' )
string
[REQUIRED]
The ID or Amazon Resource Name (ARN) of the inference profile.
dict
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.
{'typeEquals': 'SYSTEM_DEFINED | APPLICATION'}Response
{'inferenceProfileSummaries': {'type': {'APPLICATION'}}}
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
client.list_inference_profiles( maxResults=123, nextToken='string', typeEquals='SYSTEM_DEFINED'|'APPLICATION' )
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.
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.
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.
dict
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.