BedrockAgentCoreControl / Client / get_capacity_provider
get_capacity_provider¶
- BedrockAgentCoreControl.Client.get_capacity_provider(**kwargs)¶
Retrieves information about a capacity provider, including its status, permissions configuration, and compute configuration.
See also: AWS API Documentation
Request Syntax
response = client.get_capacity_provider( capacityProviderId='string' )
- Parameters:
capacityProviderId (string) –
[REQUIRED]
The unique identifier of the capacity provider.
- Return type:
dict
- Returns:
Response Syntax
{ 'capacityProviderId': 'string', 'capacityProviderArn': 'string', 'name': 'string', 'status': 'CREATING'|'CREATE_FAILED'|'UPDATING'|'UPDATE_FAILED'|'READY'|'DELETING'|'DELETE_FAILED', 'description': 'string', 'statusCode': 'VALIDATION_ERROR'|'QUOTA_EXCEEDED'|'THROTTLED'|'INTERNAL_SERVER_EXCEPTION', 'statusReason': 'string', 'permissionsConfiguration': { 'capacityProviderOperatorRoleArn': 'string' }, 'computeConfiguration': { 'ec2Configuration': { 'launchTemplateSource': { 'launchParameters': { 'operatingSystem': 'LINUX_X86_64'|'LINUX_ARM64', 'instanceRequirements': { 'allowedInstanceTypes': [ 'string', ] }, 'ephemeralVolumes': [ { 'deviceName': 'string', 'virtualName': 'string', 'ebs': { 'volumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3', 'iops': 123, 'throughput': 123, 'encrypted': True|False, 'kmsKeyId': 'string', 'snapshotId': 'string', 'volumeSize': 123, 'volumeInitializationRate': 123, 'ebsCardIndex': 123 } }, ], 'monitoring': 'BASIC'|'DETAILED', 'licenseSpecifications': [ { 'licenseConfigurationArn': 'string' }, ], 'capacityReservationSpecification': { 'capacityReservationPreference': 'capacity-reservations-only'|'open'|'none', 'capacityReservationTarget': { 'capacityReservationId': 'string', 'capacityReservationResourceGroupArn': 'string' } }, 'sshKeyName': 'string', 'instanceProfileArn': 'string', 'propagatedTags': { 'string': 'string' } } }, 'vpcConfiguration': { 'subnets': [ 'string', ], 'securityGroups': [ 'string', ] }, 'volumes': [ { 'ebsConfiguration': { 'name': 'string', 'sizeGiB': 123, 'volumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3', 'iops': 123, 'throughput': 123, 'encrypted': True|False, 'kmsKeyId': 'string', 'snapshotId': 'string' } }, ], 'lifecycleConfiguration': { 'idleInstanceTimeout': 123, 'maxLifetime': 123 }, 'rootVolume': { 'volumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3', 'iops': 123, 'throughput': 123, 'encrypted': True|False, 'kmsKeyId': 'string', 'freeSpaceGiB': 123 } } }, 'createdAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) –
capacityProviderId (string) –
The unique identifier of the capacity provider.
capacityProviderArn (string) –
The Amazon Resource Name (ARN) of the capacity provider.
name (string) –
The name of the capacity provider.
status (string) –
The current status of the capacity provider. For possible values, see
CapacityProviderStatus.description (string) –
The description of the capacity provider, if one was provided.
statusCode (string) –
A reason code for a capacity provider that is not in the
READYstate. Use this code for programmatic error handling.statusReason (string) –
A human-readable message that describes why the capacity provider is not in the
READYstate. Because these messages can change, usestatusCodefor programmatic error handling.permissionsConfiguration (dict) –
The permissions configuration for the capacity provider.
capacityProviderOperatorRoleArn (string) –
The Amazon Resource Name (ARN) of the IAM role that AgentCore assumes to manage the capacity provider, including launching, tagging, and terminating instances and their network interfaces. We recommend scoping this role to the minimum permissions that your workloads require.
computeConfiguration (dict) –
The compute configuration for the capacity provider.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
ec2Configuration. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
ec2Configuration (dict) –
The Amazon EC2 compute configuration for the capacity provider.
launchTemplateSource (dict) –
The source of the launch template configuration that defines how instances are launched.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
launchParameters. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
launchParameters (dict) –
The parameters that AgentCore uses to create the launch template.
operatingSystem (string) –
The operating system and CPU architecture for the instances.
instanceRequirements (dict) –
The requirements that determine which instance types can be launched.
allowedInstanceTypes (list) –
The list of allowed instance types. You can specify up to 30 instance types.
(string) –
ephemeralVolumes (list) –
The block device mappings for instance store (ephemeral) volumes. You can specify up to five mappings.
(dict) –
A block device mapping for an instance store (ephemeral) volume.
deviceName (string) –
The device name, for example
/dev/sdhorxvdh.virtualName (string) –
The virtual device name (
ephemeralN). Instance store volumes are numbered starting from 0. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.ebs (dict) –
The shared Amazon EBS performance and encryption properties for a volume. These properties are common across the different volume configurations for a capacity provider.
volumeType (string) –
The Amazon EBS volume type. If you do not specify a type, the default is
gp3.iops (integer) –
The number of IOPS to provision. For
gp3,io1, andio2volumes, this is the number of IOPS provisioned for the volume. Forgp2volumes, this sets the baseline IOPS performance. It also controls the rate at which the volume accumulates I/O credits for bursting. Supported values:gp3, 3,000–80,000;io1, 100–64,000;io2, 100–256,000.throughput (integer) –
The throughput to provision, in MiB/s. Valid only for
gp3volumes. Valid range: 125–2,000 MiB/s.encrypted (boolean) –
Specifies whether to encrypt the volume. Encrypted volumes can be attached only to instances that support Amazon EBS encryption. If you create a volume from a snapshot, you cannot specify an encryption value.
kmsKeyId (string) –
The identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed KMS key to use for Amazon EBS encryption.
snapshotId (string) –
The ID of the snapshot.
volumeSize (integer) –
The size of the volume, in GiB. You must specify either a snapshot ID or a volume size. Supported sizes:
gp2, 1–16,384;gp3, 1–65,536;io1, 4–16,384;io2, 4–65,536.volumeInitializationRate (integer) –
The rate at which the volume is initialized after creation, in MiB/s. Supported only for volumes created from snapshots. Valid range: 100–300 MiB/s.
ebsCardIndex (integer) –
The index of the Amazon EBS card. Applies to instances with multiple Amazon EBS cards.
monitoring (string) –
The monitoring level for the instances.
licenseSpecifications (list) –
The license configurations to associate with the instances. You can specify up to five configurations.
(dict) –
A license configuration to associate with the instances.
licenseConfigurationArn (string) –
The Amazon Resource Name (ARN) of the license configuration.
capacityReservationSpecification (dict) –
The Capacity Reservation targeting option for the instances.
capacityReservationPreference (string) –
The Capacity Reservation preference for the instances.
capacityReservationTarget (dict) –
The target Capacity Reservation or Capacity Reservation group for the instances.
capacityReservationId (string) –
The ID of the Capacity Reservation in which to run the instances.
capacityReservationResourceGroupArn (string) –
The Amazon Resource Name (ARN) of the Capacity Reservation resource group in which to run the instances.
sshKeyName (string) –
The name of the SSH key pair to configure on the instances for SSH connectivity.
instanceProfileArn (string) –
The Amazon Resource Name (ARN) of the IAM instance profile to associate with launched instances. If provided, this overrides the default instance profile.
propagatedTags (dict) –
The tags to propagate to all Amazon EC2 resources (instances, volumes, and network interfaces) that the capacity provider creates.
(string) –
(string) –
vpcConfiguration (dict) –
The VPC configuration for launching instances, including subnets and security groups.
subnets (list) –
The IDs of the subnets in which to launch instances. You must specify at least one subnet.
(string) –
securityGroups (list) –
The IDs of the security groups to associate with the instances. You must specify at least one security group.
(string) –
volumes (list) –
The named persistent Amazon EBS volumes for the capacity provider. A capacity provider can define up to five volumes.
(dict) –
The configuration for a persistent volume attached to a capacity provider. This structure defines the storage backing for the persistent volumes used by agents that run on capacity provider instances.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
ebsConfiguration. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
ebsConfiguration (dict) –
The configuration for an Amazon EBS-backed persistent volume.
name (string) –
The logical name of the volume. Use this name to reference the volume when you mount it into an agent runtime.
sizeGiB (integer) –
The size of the volume, in GiB.
volumeType (string) –
The Amazon EBS volume type. If you do not specify a type, the default is
gp3.iops (integer) –
The number of IOPS to provision. Valid only for
gp3,io1, andio2volumes.throughput (integer) –
The throughput, in MiB/s. Valid only for
gp3volumes.encrypted (boolean) –
Specifies whether to encrypt the volume. If
true, the service encrypts the volume with the KMS key that you specify inkmsKeyId, or the default KMS key for Amazon EBS if you do not specify one. The default istrue.kmsKeyId (string) –
The identifier of the KMS key to use for encryption.
snapshotId (string) –
An optional Amazon EBS snapshot ID. If provided, the volume is initialized from this snapshot the first time it is created. On subsequent restarts, the existing volume is used and the snapshot is ignored.
lifecycleConfiguration (dict) –
The lifecycle configuration for instances in the capacity provider.
idleInstanceTimeout (integer) –
The number of seconds an instance can remain idle before it is stopped. An instance is considered idle when all of its agents are idle. The default is 900 seconds (15 minutes).
maxLifetime (integer) –
The maximum lifetime of an instance, in seconds. When an instance reaches this limit, the service terminates it regardless of activity. The default is 28800 seconds (8 hours). The maximum is 1209600 seconds (14 days).
rootVolume (dict) –
The configuration for the instance root volume. Specify the amount of free space to guarantee and, optionally, the Amazon EBS performance and encryption settings. The device name and delete-on-termination behavior are not configurable.
volumeType (string) –
The Amazon EBS volume type. If you do not specify a type, the default is
gp3.iops (integer) –
The number of IOPS to provision. For
gp3,io1, andio2volumes, this is the number of IOPS provisioned for the volume. Forgp2volumes, this sets the baseline IOPS performance. It also controls the rate at which the volume accumulates I/O credits for bursting. Supported values:gp3, 3,000–80,000;io1, 100–64,000;io2, 100–256,000.throughput (integer) –
The throughput to provision, in MiB/s. Valid only for
gp3volumes. Valid range: 125–2,000 MiB/s.encrypted (boolean) –
Specifies whether to encrypt the volume. Encrypted volumes can be attached only to instances that support Amazon EBS encryption. If you create a volume from a snapshot, you cannot specify an encryption value.
kmsKeyId (string) –
The identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed KMS key to use for Amazon EBS encryption.
freeSpaceGiB (integer) –
The free space guaranteed on the root volume, in GiB. AgentCore adds the operating system overhead on top of this value. The default is 8 GiB.
createdAt (datetime) –
The timestamp when the capacity provider was created.
lastUpdatedAt (datetime) –
The timestamp when the capacity provider was last updated.
Exceptions
BedrockAgentCoreControl.Client.exceptions.ValidationExceptionBedrockAgentCoreControl.Client.exceptions.AccessDeniedExceptionBedrockAgentCoreControl.Client.exceptions.ResourceNotFoundExceptionBedrockAgentCoreControl.Client.exceptions.ThrottlingExceptionBedrockAgentCoreControl.Client.exceptions.InternalServerException