Skip to content

create_capacity_provider

Operation

create_capacity_provider

create_capacity_provider(request: CreateCapacityProviderInput | CreateCapacityProviderInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateCapacityProviderInputDict]) -> 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
request CreateCapacityProviderInput | CreateCapacityProviderInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[CreateCapacityProviderInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateCapacityProviderOutput

An instance of CreateCapacityProviderOutput.

create_capacity_provider async

create_capacity_provider(request: CreateCapacityProviderInput | CreateCapacityProviderInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateCapacityProviderInputDict]) -> 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
request CreateCapacityProviderInput | CreateCapacityProviderInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[CreateCapacityProviderInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateCapacityProviderOutput

An instance of CreateCapacityProviderOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

CreateCapacityProviderInputDict

Bases: TypedDict

Dictionary form of CreateCapacityProviderInput.

Attributes

client_token instance-attribute
client_token: str | 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.

This field is autopopulated if not provided.

compute_configuration instance-attribute

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 instance-attribute
description: str | None

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

name instance-attribute
name: Required[str]

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

permissions_configuration instance-attribute

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 instance-attribute
tags: Mapping[str, str] | 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.

CreateCapacityProviderInput dataclass

Bases: _SerdeShape

Dataclass for CreateCapacityProviderInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | 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.

This field is autopopulated if not provided.

compute_configuration class-attribute instance-attribute
compute_configuration: ComputeConfiguration | 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 = ...

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 = ...

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

permissions_configuration class-attribute instance-attribute
permissions_configuration: PermissionsConfiguration | 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 = ...

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

Bases: _SerdeShape

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.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

status instance-attribute
status: str

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