capacity_providers
Creates, updates, deletes, gets or lists a capacity_providers resource.
Overview
| Name | capacity_providers |
| Type | Resource |
| Id | aws.lambda.capacity_providers |
Fields
The following fields are returned by SELECT queries:
- get_capacity_provider
- list_capacity_providers
| Name | Datatype | Description |
|---|---|---|
capacity_provider_arn | string | The Amazon Resource Name (ARN) of the capacity provider. (pattern: <code>arn:aws[a-zA-Z-]*:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:capacity-provider:[a-zA-Z0-9-_]+</code>) |
capacity_provider_scaling_config | object | Configuration that defines how the capacity provider scales compute instances based on demand and policies. |
instance_requirements | object | Specifications that define the characteristics and constraints for compute instances used by the capacity provider. |
kms_key_arn | string | The ARN of the KMS key used to encrypt the capacity provider's resources. (pattern: <code>(arn:(aws[a-zA-Z-])?:[a-z0-9-.]+:.)|()</code>) |
last_modified | string | The date and time when the capacity provider was last modified. (pattern: <code>.*</code>) |
permissions_config | object | Configuration that specifies the permissions required for the capacity provider to manage compute resources. |
propagate_tags | object | Configuration for tag propagation to managed resources launched by the capacity provider. |
state | string | The current state of the capacity provider. (Pending, Active, Failed, Deleting) |
telemetry_config | object | Configuration that specifies the telemetry collection for the capacity provider. |
vpc_config | object | VPC configuration that specifies the network settings for compute instances managed by the capacity provider. |
| Name | Datatype | Description |
|---|---|---|
capacity_provider_arn | string | The Amazon Resource Name (ARN) of the capacity provider. (pattern: <code>arn:aws[a-zA-Z-]*:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:capacity-provider:[a-zA-Z0-9-_]+</code>) |
capacity_provider_scaling_config | object | Configuration that defines how the capacity provider scales compute instances based on demand and policies. |
instance_requirements | object | Specifications that define the characteristics and constraints for compute instances used by the capacity provider. |
kms_key_arn | string | The ARN of the KMS key used to encrypt the capacity provider's resources. (pattern: <code>(arn:(aws[a-zA-Z-])?:[a-z0-9-.]+:.)|()</code>) |
last_modified | string | The date and time when the capacity provider was last modified. (pattern: <code>.*</code>) |
permissions_config | object | Configuration that specifies the permissions required for the capacity provider to manage compute resources. |
propagate_tags | object | Configuration for tag propagation to managed resources launched by the capacity provider. |
state | string | The current state of the capacity provider. (Pending, Active, Failed, Deleting) |
telemetry_config | object | Configuration that specifies the telemetry collection for the capacity provider. |
vpc_config | object | VPC configuration that specifies the network settings for compute instances managed by the capacity provider. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_capacity_provider | select | capacity_provider_name, region | Retrieves information about a specific capacity provider, including its configuration, state, and associated resources. | |
list_capacity_providers | select | region | State, Marker, MaxItems | Returns a list of capacity providers in your account. |
create_capacity_provider | insert | region, CapacityProviderName, VpcConfig, PermissionsConfig | Creates a capacity provider that manages compute resources for Lambda functions | |
update_capacity_provider | update | capacity_provider_name, region | Updates the configuration of an existing capacity provider. | |
delete_capacity_provider | delete | capacity_provider_name, region | Deletes a capacity provider. You cannot delete a capacity provider that is currently being used by Lambda functions. |
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_name | string | The name of the capacity provider to delete. |
region | string | AWS region (default: us-east-1) |
Marker | string | Specify the pagination token that's returned by a previous request to retrieve the next page of results. |
MaxItems | integer | The maximum number of capacity providers to return. |
State | string | Filter capacity providers by their current state. |
SELECT examples
- get_capacity_provider
- list_capacity_providers
Retrieves information about a specific capacity provider, including its configuration, state, and associated resources.
SELECT
capacity_provider_arn,
capacity_provider_scaling_config,
instance_requirements,
kms_key_arn,
last_modified,
permissions_config,
propagate_tags,
state,
telemetry_config,
vpc_config
FROM aws.lambda.capacity_providers
WHERE capacity_provider_name = '{{ capacity_provider_name }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of capacity providers in your account.
SELECT
capacity_provider_arn,
capacity_provider_scaling_config,
instance_requirements,
kms_key_arn,
last_modified,
permissions_config,
propagate_tags,
state,
telemetry_config,
vpc_config
FROM aws.lambda.capacity_providers
WHERE region = '{{ region }}' -- required
AND State = '{{ State }}'
AND Marker = '{{ Marker }}'
AND MaxItems = '{{ MaxItems }}'
;
INSERT examples
- create_capacity_provider
- Manifest
Creates a capacity provider that manages compute resources for Lambda functions
INSERT INTO aws.lambda.capacity_providers (
CapacityProviderName,
VpcConfig,
PermissionsConfig,
InstanceRequirements,
CapacityProviderScalingConfig,
KmsKeyArn,
Tags,
PropagateTags,
TelemetryConfig,
region
)
SELECT
'{{ CapacityProviderName }}' /* required */,
'{{ VpcConfig }}' /* required */,
'{{ PermissionsConfig }}' /* required */,
'{{ InstanceRequirements }}',
'{{ CapacityProviderScalingConfig }}',
'{{ KmsKeyArn }}',
'{{ Tags }}',
'{{ PropagateTags }}',
'{{ TelemetryConfig }}',
'{{ region }}'
RETURNING
capacity_provider
;
# Description fields are for documentation purposes
- name: capacity_providers
props:
- name: region
value: "{{ region }}"
description: Required parameter for the capacity_providers resource.
- name: CapacityProviderName
value: "{{ CapacityProviderName }}"
- name: VpcConfig
description: |
VPC configuration that specifies the network settings for compute instances managed by the capacity provider.
value:
SubnetIds:
- "{{ SubnetIds }}"
SecurityGroupIds:
- "{{ SecurityGroupIds }}"
- name: PermissionsConfig
description: |
Configuration that specifies the permissions required for the capacity provider to manage compute resources.
value:
CapacityProviderOperatorRoleArn: "{{ CapacityProviderOperatorRoleArn }}"
- name: InstanceRequirements
description: |
Specifications that define the characteristics and constraints for compute instances used by the capacity provider.
value:
Architectures:
- "{{ Architectures }}"
AllowedInstanceTypes:
- "{{ AllowedInstanceTypes }}"
ExcludedInstanceTypes:
- "{{ ExcludedInstanceTypes }}"
- name: CapacityProviderScalingConfig
description: |
Configuration that defines how the capacity provider scales compute instances based on demand and policies.
value:
MaxVCpuCount: {{ MaxVCpuCount }}
ScalingMode: "{{ ScalingMode }}"
ScalingPolicies:
- PredefinedMetricType: "{{ PredefinedMetricType }}"
TargetValue: {{ TargetValue }}
- name: KmsKeyArn
value: "{{ KmsKeyArn }}"
- name: Tags
value: "{{ Tags }}"
- name: PropagateTags
description: |
Configuration for tag propagation to managed resources launched by the capacity provider.
value:
Mode: "{{ Mode }}"
ExplicitTags: "{{ ExplicitTags }}"
- name: TelemetryConfig
description: |
Configuration that specifies the telemetry collection for the capacity provider.
value:
LoggingConfig:
SystemLogLevel: "{{ SystemLogLevel }}"
LogGroup: "{{ LogGroup }}"
UPDATE examples
- update_capacity_provider
Updates the configuration of an existing capacity provider.
UPDATE aws.lambda.capacity_providers
SET
CapacityProviderScalingConfig = '{{ CapacityProviderScalingConfig }}',
PropagateTags = '{{ PropagateTags }}',
TelemetryConfig = '{{ TelemetryConfig }}'
WHERE
capacity_provider_name = '{{ capacity_provider_name }}' --required
AND region = '{{ region }}' --required
RETURNING
capacity_provider;
DELETE examples
- delete_capacity_provider
Deletes a capacity provider. You cannot delete a capacity provider that is currently being used by Lambda functions.
DELETE FROM aws.lambda.capacity_providers
WHERE capacity_provider_name = '{{ capacity_provider_name }}' --required
AND region = '{{ region }}' --required
;