capacity_providers
Creates, updates, deletes, gets or lists a capacity_providers resource.
Overview
| Name | capacity_providers |
| Type | Resource |
| Id | aws.bedrock_agentcore_control.capacity_providers |
Fields
The following fields are returned by SELECT queries:
- get_capacity_provider
- list_capacity_providers
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the capacity provider. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}</code>) |
capacity_provider_arn | string | The 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_id | string | The unique identifier of the capacity provider. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10}</code>) |
compute_configuration | object | The compute configuration for a capacity provider. This structure defines the type and settings of the compute resources used to launch instances. |
created_at | string (date-time) | The timestamp when the capacity provider was created. |
description | string | The description of the capacity provider, if one was provided. |
last_updated_at | string (date-time) | The timestamp when the capacity provider was last updated. |
permissions_configuration | object | The 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. |
status | string | The current status of the capacity provider. For possible values, see CapacityProviderStatus. (CREATING, CREATE_FAILED, UPDATING, UPDATE_FAILED, READY, DELETING, DELETE_FAILED) |
status_code | string | A 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_reason | string | A 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. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the capacity provider. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}</code>) |
capacity_provider_arn | string | The 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_id | string | The unique identifier of the capacity provider. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10}</code>) |
last_updated_at | string (date-time) | The timestamp when the capacity provider was last updated. |
status | string | The current status of the capacity provider. For possible values, see CapacityProviderStatus. (CREATING, CREATE_FAILED, UPDATING, UPDATE_FAILED, READY, DELETING, DELETE_FAILED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_capacity_provider | select | capacity_provider_id, region | Retrieves information about a capacity provider, including its status, permissions configuration, and compute configuration. | |
list_capacity_providers | select | region | maxResults, nextToken | Lists 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_provider | insert | region, name, permissionsConfiguration, computeConfiguration | 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. | |
update_capacity_provider | update | capacity_provider_id, region | 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. | |
delete_capacity_provider | delete | capacity_provider_id, region | clientToken | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
capacity_provider_id | string | The unique identifier of the capacity provider to delete. |
region | string | AWS region (default: us-east-1) |
clientToken | string | A 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. |
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. |
SELECT examples
- get_capacity_provider
- list_capacity_providers
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
;
Lists 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.
SELECT
name,
capacity_provider_arn,
capacity_provider_id,
last_updated_at,
status
FROM aws.bedrock_agentcore_control.capacity_providers
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_capacity_provider
- Manifest
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
;
# Description fields are for documentation purposes
- name: capacity_providers
props:
- name: region
value: "{{ region }}"
description: Required parameter for the capacity_providers resource.
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: permissionsConfiguration
description: |
The 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.
value:
capacityProviderOperatorRoleArn: "{{ capacityProviderOperatorRoleArn }}"
- name: clientToken
value: "{{ clientToken }}"
- name: tags
value: "{{ tags }}"
- name: computeConfiguration
description: |
The compute configuration for a capacity provider. This structure defines the type and settings of the compute resources used to launch instances.
value:
ec2Configuration:
launchTemplateSource:
launchParameters:
operatingSystem: "{{ operatingSystem }}"
instanceRequirements:
allowedInstanceTypes: "{{ allowedInstanceTypes }}"
ephemeralVolumes:
- deviceName: "{{ deviceName }}"
virtualName: "{{ virtualName }}"
ebs:
volumeType: "{{ volumeType }}"
iops: {{ iops }}
throughput: {{ throughput }}
encrypted: {{ encrypted }}
kmsKeyId: "{{ kmsKeyId }}"
snapshotId: "{{ snapshotId }}"
volumeSize: {{ volumeSize }}
volumeInitializationRate: {{ volumeInitializationRate }}
ebsCardIndex: {{ ebsCardIndex }}
monitoring: "{{ monitoring }}"
licenseSpecifications:
- licenseConfigurationArn: "{{ licenseConfigurationArn }}"
capacityReservationSpecification:
capacityReservationPreference: "{{ capacityReservationPreference }}"
capacityReservationTarget: "{{ capacityReservationTarget }}"
sshKeyName: "{{ sshKeyName }}"
instanceProfileArn: "{{ instanceProfileArn }}"
propagatedTags: "{{ propagatedTags }}"
vpcConfiguration:
subnets:
- "{{ subnets }}"
securityGroups:
- "{{ securityGroups }}"
volumes:
- ebsConfiguration:
name: "{{ name }}"
sizeGiB: {{ sizeGiB }}
volumeType: "{{ volumeType }}"
iops: {{ iops }}
throughput: {{ throughput }}
encrypted: {{ encrypted }}
kmsKeyId: "{{ kmsKeyId }}"
snapshotId: "{{ snapshotId }}"
lifecycleConfiguration:
idleInstanceTimeout: {{ idleInstanceTimeout }}
maxLifetime: {{ maxLifetime }}
rootVolume:
volumeType: "{{ volumeType }}"
iops: {{ iops }}
throughput: {{ throughput }}
encrypted: {{ encrypted }}
kmsKeyId: "{{ kmsKeyId }}"
freeSpaceGiB: {{ freeSpaceGiB }}
UPDATE examples
- update_capacity_provider
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
- delete_capacity_provider
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 }}'
;