CfnCapacityProviderPropsMixin

class aws_cdk.mixins_preview.aws_lambda.mixins.CfnCapacityProviderPropsMixin(props, *, strategy=None)

Bases: Mixin

Resource Type definition for AWS::Lambda::CapacityProvider.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-capacityprovider.html

CloudformationResource:

AWS::Lambda::CapacityProvider

Mixin:

true

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 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:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

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 x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

CapacityProviderPermissionsConfigProperty

class CfnCapacityProviderPropsMixin.CapacityProviderPermissionsConfigProperty(*, capacity_provider_operator_role_arn=None)

Bases: object

IAM permissions configuration for the capacity provider.

Parameters:

capacity_provider_operator_role_arn (Optional[str]) – The ARN of the IAM role that Lambda assumes to manage the capacity provider.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityproviderpermissionsconfig.html

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 Lambda assumes to manage the capacity provider.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityproviderpermissionsconfig.html#cfn-lambda-capacityprovider-capacityproviderpermissionsconfig-capacityprovideroperatorrolearn

CapacityProviderScalingConfigProperty

class CfnCapacityProviderPropsMixin.CapacityProviderScalingConfigProperty(*, max_v_cpu_count=None, scaling_mode=None, scaling_policies=None)

Bases: object

The scaling configuration for the capacity provider.

Parameters:
  • max_v_cpu_count (Union[int, float, None]) – The maximum number of EC2 instances that the capacity provider can scale up to.

  • scaling_mode (Optional[str]) – The scaling mode for the capacity provider.

  • scaling_policies (Union[IResolvable, Sequence[Union[IResolvable, TargetTrackingScalingPolicyProperty, Dict[str, Any]]], None]) – A list of target tracking scaling policies for the capacity provider.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityproviderscalingconfig.html

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 EC2 instances that the capacity provider can scale up to.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityproviderscalingconfig.html#cfn-lambda-capacityprovider-capacityproviderscalingconfig-maxvcpucount

scaling_mode

The scaling mode for the capacity provider.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityproviderscalingconfig.html#cfn-lambda-capacityprovider-capacityproviderscalingconfig-scalingmode

scaling_policies

A list of target tracking scaling policies for the capacity provider.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityproviderscalingconfig.html#cfn-lambda-capacityprovider-capacityproviderscalingconfig-scalingpolicies

CapacityProviderVpcConfigProperty

class CfnCapacityProviderPropsMixin.CapacityProviderVpcConfigProperty(*, security_group_ids=None, subnet_ids=None)

Bases: object

VPC configuration for the capacity provider.

Parameters:
  • security_group_ids (Optional[Sequence[str]]) – A list of security group IDs to associate with EC2 instances.

  • subnet_ids (Optional[Sequence[str]]) – A list of subnet IDs where the capacity provider can launch EC2 instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityprovidervpcconfig.html

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 to associate with EC2 instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityprovidervpcconfig.html#cfn-lambda-capacityprovider-capacityprovidervpcconfig-securitygroupids

subnet_ids

A list of subnet IDs where the capacity provider can launch EC2 instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityprovidervpcconfig.html#cfn-lambda-capacityprovider-capacityprovidervpcconfig-subnetids

InstanceRequirementsProperty

class CfnCapacityProviderPropsMixin.InstanceRequirementsProperty(*, allowed_instance_types=None, architectures=None, excluded_instance_types=None)

Bases: object

Specifications for the types of EC2 instances that the capacity provider can use.

Parameters:
  • allowed_instance_types (Optional[Sequence[str]]) – A list of instance types that the capacity provider can use. Supports wildcards (for example, m5.*).

  • architectures (Optional[Sequence[str]]) – The instruction set architecture for EC2 instances. Specify either x86_64 or arm64.

  • excluded_instance_types (Optional[Sequence[str]]) – A list of instance types that the capacity provider should not use. Takes precedence over AllowedInstanceTypes.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-instancerequirements.html

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 instance types that the capacity provider can use.

Supports wildcards (for example, m5.*).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-instancerequirements.html#cfn-lambda-capacityprovider-instancerequirements-allowedinstancetypes

architectures

The instruction set architecture for EC2 instances.

Specify either x86_64 or arm64.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-instancerequirements.html#cfn-lambda-capacityprovider-instancerequirements-architectures

excluded_instance_types

A list of instance types that the capacity provider should not use.

Takes precedence over AllowedInstanceTypes.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-instancerequirements.html#cfn-lambda-capacityprovider-instancerequirements-excludedinstancetypes

TargetTrackingScalingPolicyProperty

class CfnCapacityProviderPropsMixin.TargetTrackingScalingPolicyProperty(*, predefined_metric_type=None, target_value=None)

Bases: object

A target tracking scaling policy for the capacity provider.

Parameters:
  • predefined_metric_type (Optional[str]) – The predefined metric for target tracking.

  • target_value (Union[int, float, None]) – The target value for the metric as a percentage (for example, 70.0 for 70%).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-targettrackingscalingpolicy.html

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 for target tracking.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-targettrackingscalingpolicy.html#cfn-lambda-capacityprovider-targettrackingscalingpolicy-predefinedmetrictype

target_value

The target value for the metric as a percentage (for example, 70.0 for 70%).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-targettrackingscalingpolicy.html#cfn-lambda-capacityprovider-targettrackingscalingpolicy-targetvalue