CfnCapacityProviderPropsMixin
- class aws_cdk.mixins_preview.aws_lambda.mixins.CfnCapacityProviderPropsMixin(props, *, strategy=None)
Bases:
MixinCreates a capacity provider that manages compute resources for Lambda functions.
- See:
- CloudformationResource:
AWS::Lambda::CapacityProvider
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
from aws_cdk import CfnTag # The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins cfn_capacity_provider_props_mixin = lambda_mixins.CfnCapacityProviderPropsMixin(lambda_mixins.CfnCapacityProviderMixinProps( capacity_provider_name="capacityProviderName", capacity_provider_scaling_config=lambda_mixins.CfnCapacityProviderPropsMixin.CapacityProviderScalingConfigProperty( max_vCpu_count=123, scaling_mode="scalingMode", scaling_policies=[lambda_mixins.CfnCapacityProviderPropsMixin.TargetTrackingScalingPolicyProperty( predefined_metric_type="predefinedMetricType", target_value=123 )] ), instance_requirements=lambda_mixins.CfnCapacityProviderPropsMixin.InstanceRequirementsProperty( allowed_instance_types=["allowedInstanceTypes"], architectures=["architectures"], excluded_instance_types=["excludedInstanceTypes"] ), kms_key_arn="kmsKeyArn", permissions_config=lambda_mixins.CfnCapacityProviderPropsMixin.CapacityProviderPermissionsConfigProperty( capacity_provider_operator_role_arn="capacityProviderOperatorRoleArn" ), tags=[CfnTag( key="key", value="value" )], vpc_config=lambda_mixins.CfnCapacityProviderPropsMixin.CapacityProviderVpcConfigProperty( security_group_ids=["securityGroupIds"], subnet_ids=["subnetIds"] ) ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Lambda::CapacityProvider.- Parameters:
props (
Union[CfnCapacityProviderMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['capacityProviderName', 'capacityProviderScalingConfig', 'instanceRequirements', 'kmsKeyArn', 'permissionsConfig', 'tags', 'vpcConfig']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
CapacityProviderPermissionsConfigProperty
- class CfnCapacityProviderPropsMixin.CapacityProviderPermissionsConfigProperty(*, capacity_provider_operator_role_arn=None)
Bases:
objectConfiguration that specifies the permissions required for the capacity provider to manage compute resources.
- Parameters:
capacity_provider_operator_role_arn (
Optional[str]) – The ARN of the IAM role that the capacity provider uses to manage compute instances and other AWS resources.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins capacity_provider_permissions_config_property = lambda_mixins.CfnCapacityProviderPropsMixin.CapacityProviderPermissionsConfigProperty( capacity_provider_operator_role_arn="capacityProviderOperatorRoleArn" )
Attributes
- capacity_provider_operator_role_arn
The ARN of the IAM role that the capacity provider uses to manage compute instances and other AWS resources.
CapacityProviderScalingConfigProperty
- class CfnCapacityProviderPropsMixin.CapacityProviderScalingConfigProperty(*, max_v_cpu_count=None, scaling_mode=None, scaling_policies=None)
Bases:
objectConfiguration that defines how the capacity provider scales compute instances based on demand and policies.
- Parameters:
max_v_cpu_count (
Union[int,float,None]) – The maximum number of vCPUs that the capacity provider can provision across all compute instances.scaling_mode (
Optional[str]) – The scaling mode that determines how the capacity provider responds to changes in demand.scaling_policies (
Union[IResolvable,Sequence[Union[IResolvable,TargetTrackingScalingPolicyProperty,Dict[str,Any]]],None]) – A list of target tracking scaling policies for the capacity provider.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins capacity_provider_scaling_config_property = lambda_mixins.CfnCapacityProviderPropsMixin.CapacityProviderScalingConfigProperty( max_vCpu_count=123, scaling_mode="scalingMode", scaling_policies=[lambda_mixins.CfnCapacityProviderPropsMixin.TargetTrackingScalingPolicyProperty( predefined_metric_type="predefinedMetricType", target_value=123 )] )
Attributes
- max_v_cpu_count
The maximum number of vCPUs that the capacity provider can provision across all compute instances.
- scaling_mode
The scaling mode that determines how the capacity provider responds to changes in demand.
- scaling_policies
A list of target tracking scaling policies for the capacity provider.
CapacityProviderVpcConfigProperty
- class CfnCapacityProviderPropsMixin.CapacityProviderVpcConfigProperty(*, security_group_ids=None, subnet_ids=None)
Bases:
objectVPC configuration that specifies the network settings for compute instances managed by the capacity provider.
- Parameters:
security_group_ids (
Optional[Sequence[str]]) – A list of security group IDs that control network access for compute instances managed by the capacity provider.subnet_ids (
Optional[Sequence[str]]) – A list of subnet IDs where the capacity provider launches compute instances.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins capacity_provider_vpc_config_property = lambda_mixins.CfnCapacityProviderPropsMixin.CapacityProviderVpcConfigProperty( security_group_ids=["securityGroupIds"], subnet_ids=["subnetIds"] )
Attributes
- security_group_ids
A list of security group IDs that control network access for compute instances managed by the capacity provider.
- subnet_ids
A list of subnet IDs where the capacity provider launches compute instances.
InstanceRequirementsProperty
- class CfnCapacityProviderPropsMixin.InstanceRequirementsProperty(*, allowed_instance_types=None, architectures=None, excluded_instance_types=None)
Bases:
objectSpecifications that define the characteristics and constraints for compute instances used by the capacity provider.
- Parameters:
allowed_instance_types (
Optional[Sequence[str]]) – A list of EC2 instance types that the capacity provider is allowed to use. If not specified, all compatible instance types are allowed.architectures (
Optional[Sequence[str]]) – A list of supported CPU architectures for compute instances. Valid values includex86_64andarm64.excluded_instance_types (
Optional[Sequence[str]]) – A list of EC2 instance types that the capacity provider should not use, even if they meet other requirements.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins instance_requirements_property = lambda_mixins.CfnCapacityProviderPropsMixin.InstanceRequirementsProperty( allowed_instance_types=["allowedInstanceTypes"], architectures=["architectures"], excluded_instance_types=["excludedInstanceTypes"] )
Attributes
- allowed_instance_types
A list of EC2 instance types that the capacity provider is allowed to use.
If not specified, all compatible instance types are allowed.
- architectures
A list of supported CPU architectures for compute instances.
Valid values include
x86_64andarm64.
- excluded_instance_types
A list of EC2 instance types that the capacity provider should not use, even if they meet other requirements.
TargetTrackingScalingPolicyProperty
- class CfnCapacityProviderPropsMixin.TargetTrackingScalingPolicyProperty(*, predefined_metric_type=None, target_value=None)
Bases:
objectA scaling policy for the capacity provider that automatically adjusts capacity to maintain a target value for a specific metric.
- Parameters:
predefined_metric_type (
Optional[str]) – The predefined metric type to track for scaling decisions.target_value (
Union[int,float,None]) – The target value for the metric that the scaling policy attempts to maintain through scaling actions.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins target_tracking_scaling_policy_property = lambda_mixins.CfnCapacityProviderPropsMixin.TargetTrackingScalingPolicyProperty( predefined_metric_type="predefinedMetricType", target_value=123 )
Attributes
- predefined_metric_type
The predefined metric type to track for scaling decisions.
- target_value
The target value for the metric that the scaling policy attempts to maintain through scaling actions.