create_capacity_provider
¶
create_capacity_provider(
name: CapacityProviderName,
permissions_configuration: PermissionsConfiguration,
compute_configuration: ComputeConfiguration,
*,
config_overrides: Optional[BedrockAgentCoreControlClientConfig] = None,
description: Optional[Description] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagsMap] = 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(CapacityProviderName) –The name of the capacity provider. The name must be unique within your account.
-
description(Optional[Description], default:None) –An optional description of the capacity provider. If you don't specify a description, the service creates the capacity provider without one.
-
permissions_configuration(PermissionsConfiguration) –The permissions configuration for the capacity provider. This specifies the IAM role that AgentCore uses to manage the Amazon EC2 instances on your behalf.
-
client_token(Optional[ClientToken], default: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.
-
tags(Optional[TagsMap], default: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.
-
compute_configuration(ComputeConfiguration) –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.
Raises:
-
AccessDeniedException–This exception is thrown when a request is denied per access permissions
-
ConflictException–This exception is thrown when there is a conflict performing an operation
-
InternalServerException–This exception is thrown if there was an unexpected error during processing of request
-
ResourceNotFoundException–This exception is thrown when a resource referenced by the operation does not exist
-
RetryableConflictException–The operation failed because of a conflicting request. Retry the request.
-
ServiceQuotaExceededException–This exception is thrown when a request is made beyond the service quota
-
ThrottlingException–This exception is thrown when the number of requests exceeds the limit
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agentcore_control/_services/bedrock_agent_core_control.py
3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 | |