Skip to content

Bedrock AgentCore Control  >  Operations  >  create_capacity_provider

create_capacity_provider

Operation

create_capacity_provider async

create_capacity_provider(input: CreateCapacityProviderInput, plugins: list[Plugin] | None = None) -> CreateCapacityProviderOutput

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.

Parameters:

Name Type Description Default
input CreateCapacityProviderInput

An instance of CreateCapacityProviderInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateCapacityProviderOutput

An instance of CreateCapacityProviderOutput.

Input

CreateCapacityProviderInput dataclass

Dataclass for CreateCapacityProviderInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = None

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.

compute_configuration class-attribute instance-attribute
compute_configuration: ComputeConfiguration | None = None

The compute configuration for the capacity provider. This defines the Amazon EC2 compute resources used to launch instances: the operating system, allowed instance types, networking, and storage.

description class-attribute instance-attribute
description: str | None = field(repr=False, default=None)

An optional description of the capacity provider. If you don't specify a description, the service creates the capacity provider without one.

name class-attribute instance-attribute
name: str | None = None

The name of the capacity provider. The name must be unique within your account.

permissions_configuration class-attribute instance-attribute
permissions_configuration: PermissionsConfiguration | None = None

The permissions configuration for the capacity provider. This specifies the IAM role that AgentCore uses to manage the Amazon EC2 instances on your behalf.

tags class-attribute instance-attribute
tags: dict[str, str] | None = None

A map of tag keys and values to associate with the capacity provider. If you don't specify tags, the capacity provider is created with no tags.

Output

CreateCapacityProviderOutput dataclass

Dataclass for CreateCapacityProviderOutput structure.

Attributes

capacity_provider_arn instance-attribute
capacity_provider_arn: str

The Amazon Resource Name (ARN) of the capacity provider.

capacity_provider_id instance-attribute
capacity_provider_id: str

The unique identifier of the created capacity provider.

name instance-attribute
name: str

The name of the capacity provider.

status instance-attribute

The current status of the capacity provider. For possible values, see CapacityProviderStatus.