Skip to main content

capacity_providers

Creates, updates, deletes, gets or lists a capacity_providers resource.

Overview

Namecapacity_providers
TypeResource
Idaws.bedrock_agentcore_control.capacity_providers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the capacity provider. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}</code>)
capacity_provider_arnstringThe Amazon Resource Name (ARN) of the capacity provider. (pattern: <code>arn:aws(-[^:]+)?:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:capacity-provider/[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10}</code>)
capacity_provider_idstringThe unique identifier of the capacity provider. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10}</code>)
compute_configurationobjectThe compute configuration for a capacity provider. This structure defines the type and settings of the compute resources used to launch instances.
created_atstring (date-time)The timestamp when the capacity provider was created.
descriptionstringThe description of the capacity provider, if one was provided.
last_updated_atstring (date-time)The timestamp when the capacity provider was last updated.
permissions_configurationobjectThe permissions configuration for a capacity provider. This specifies the IAM role that AgentCore uses to manage the Amazon EC2 instances for the capacity provider on your behalf.
statusstringThe current status of the capacity provider. For possible values, see CapacityProviderStatus. (CREATING, CREATE_FAILED, UPDATING, UPDATE_FAILED, READY, DELETING, DELETE_FAILED)
status_codestringA reason code for a capacity provider that is not in the READY state. Use this code for programmatic error handling. (VALIDATION_ERROR, QUOTA_EXCEEDED, THROTTLED, INTERNAL_SERVER_EXCEPTION)
status_reasonstringA human-readable message that describes why the capacity provider is not in the READY state. Because these messages can change, use statusCode for programmatic error handling.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_capacity_providerselectcapacity_provider_id, regionRetrieves information about a capacity provider, including its status, permissions configuration, and compute configuration.
list_capacity_providersselectregionmaxResults, nextTokenLists the capacity providers in your account and returns summary information for each one. To retrieve the full configuration for a specific capacity provider, use GetCapacityProvider. Results are paginated; use the nextToken parameter to retrieve additional results.
create_capacity_providerinsertregion, name, permissionsConfiguration, computeConfigurationCreates a capacity provider. A capacity provider defines the Amazon EC2 infrastructure for AgentCore Runtime, including the operating system, allowed instance types, networking, and storage. It also specifies the IAM permissions that AgentCore uses to manage those instances. The capacity provider name must be unique within your account. After you create the capacity provider, it enters a CREATING state and transitions to READY when it is available for use.
update_capacity_providerupdatecapacity_provider_id, regionUpdates a capacity provider. Only the description can be changed. To change other configuration, such as instance types, networking, or storage, create a new capacity provider.
delete_capacity_providerdeletecapacity_provider_id, regionclientTokenDeletes a capacity provider. Before you delete a capacity provider, disassociate all agent runtimes and runtime versions that reference it. If any references remain, the operation fails.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
capacity_provider_idstringThe unique identifier of the capacity provider to delete.
regionstringAWS region (default: us-east-1)
clientTokenstringA unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.
maxResultsintegerThe 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.
nextTokenstringIf 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.

SELECT examples

Retrieves information about a capacity provider, including its status, permissions configuration, and compute configuration.

SELECT
name,
capacity_provider_arn,
capacity_provider_id,
compute_configuration,
created_at,
description,
last_updated_at,
permissions_configuration,
status,
status_code,
status_reason
FROM aws.bedrock_agentcore_control.capacity_providers
WHERE capacity_provider_id = '{{ capacity_provider_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a capacity provider. A capacity provider defines the Amazon EC2 infrastructure for AgentCore Runtime, including the operating system, allowed instance types, networking, and storage. It also specifies the IAM permissions that AgentCore uses to manage those instances. The capacity provider name must be unique within your account. After you create the capacity provider, it enters a CREATING state and transitions to READY when it is available for use.

INSERT INTO aws.bedrock_agentcore_control.capacity_providers (
name,
description,
permissionsConfiguration,
clientToken,
tags,
computeConfiguration,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ permissionsConfiguration }}' /* required */,
'{{ clientToken }}',
'{{ tags }}',
'{{ computeConfiguration }}' /* required */,
'{{ region }}'
RETURNING
name,
capacity_provider_arn,
capacity_provider_id,
status
;

UPDATE examples

Updates a capacity provider. Only the description can be changed. To change other configuration, such as instance types, networking, or storage, create a new capacity provider.

UPDATE aws.bedrock_agentcore_control.capacity_providers
SET
description = '{{ description }}',
clientToken = '{{ clientToken }}'
WHERE
capacity_provider_id = '{{ capacity_provider_id }}' --required
AND region = '{{ region }}' --required
RETURNING
name,
capacity_provider_arn,
capacity_provider_id,
created_at,
last_updated_at,
status;

DELETE examples

Deletes a capacity provider. Before you delete a capacity provider, disassociate all agent runtimes and runtime versions that reference it. If any references remain, the operation fails.

DELETE FROM aws.bedrock_agentcore_control.capacity_providers
WHERE capacity_provider_id = '{{ capacity_provider_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;