CfnCapacityProviderPropsMixin

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

Bases: Mixin

Creates a capacity provider that manages compute resources for Lambda functions.

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.cfn_property_mixins import aws_lambda as lambda_
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy

cfn_capacity_provider_props_mixin = lambda_.CfnCapacityProviderPropsMixin(lambda.CfnCapacityProviderMixinProps(
    capacity_provider_name="capacityProviderName",
    capacity_provider_scaling_config=lambda.CfnCapacityProviderPropsMixin.CapacityProviderScalingConfigProperty(
        max_v_cpu_count=123,
        scaling_mode="scalingMode",
        scaling_policies=[lambda.CfnCapacityProviderPropsMixin.TargetTrackingScalingPolicyProperty(
            predefined_metric_type="predefinedMetricType",
            target_value=123
        )]
    ),
    instance_requirements=lambda.CfnCapacityProviderPropsMixin.InstanceRequirementsProperty(
        allowed_instance_types=["allowedInstanceTypes"],
        architectures=["architectures"],
        excluded_instance_types=["excludedInstanceTypes"]
    ),
    kms_key_arn="kmsKeyArn",
    permissions_config=lambda.CfnCapacityProviderPropsMixin.CapacityProviderPermissionsConfigProperty(
        capacity_provider_operator_role_arn="capacityProviderOperatorRoleArn"
    ),
    propagate_tags=lambda.CfnCapacityProviderPropsMixin.PropagateTagsConfigProperty(
        explicit_tags=[cdk.CfnTag(
            key="key",
            value="value"
        )],
        mode="mode"
    ),
    tags=[cdk.CfnTag(
        key="key",
        value="value"
    )],
    telemetry_config=lambda.CfnCapacityProviderPropsMixin.CapacityProviderTelemetryConfigProperty(
        logging_config=lambda.CfnCapacityProviderPropsMixin.CapacityProviderLoggingConfigProperty(
            log_group="logGroup",
            system_log_level="systemLogLevel"
        )
    ),
    vpc_config=lambda.CfnCapacityProviderPropsMixin.CapacityProviderVpcConfigProperty(
        security_group_ids=["securityGroupIds"],
        subnet_ids=["subnetIds"]
    )
),
    strategy=merge_strategy
)

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:

None

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', 'propagateTags', 'tags', 'telemetryConfig', 'vpcConfig']

Static Methods

classmethod is_mixin(x)

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.

CapacityProviderLoggingConfigProperty

class CfnCapacityProviderPropsMixin.CapacityProviderLoggingConfigProperty(*, log_group=None, system_log_level=None)

Bases: object

The capacity provider’s Amazon CloudWatch Logs configuration settings.

Parameters:
  • log_group (Optional[str]) – The name of the Amazon CloudWatch log group the capacity provider sends logs to. By default, Lambda capacity providers send logs to a default log group named /aws/lambda/capacity-provider/<capacity provider name>. To use a different log group, enter an existing log group or enter a new log group name.

  • system_log_level (Optional[str]) – Set this property to filter the system logs for your capacity provider that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityproviderloggingconfig.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.cfn_property_mixins import aws_lambda as lambda_

capacity_provider_logging_config_property = lambda.CfnCapacityProviderPropsMixin.CapacityProviderLoggingConfigProperty(
    log_group="logGroup",
    system_log_level="systemLogLevel"
)

Attributes

log_group

The name of the Amazon CloudWatch log group the capacity provider sends logs to.

By default, Lambda capacity providers send logs to a default log group named /aws/lambda/capacity-provider/<capacity provider name>. To use a different log group, enter an existing log group or enter a new log group name.

See:

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

system_log_level

Set this property to filter the system logs for your capacity provider that Lambda sends to CloudWatch.

Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.

See:

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

CapacityProviderPermissionsConfigProperty

class CfnCapacityProviderPropsMixin.CapacityProviderPermissionsConfigProperty(*, capacity_provider_operator_role_arn=None)

Bases: object

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

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.cfn_property_mixins import aws_lambda as lambda_

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

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

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

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.cfn_property_mixins import aws_lambda as lambda_

capacity_provider_scaling_config_property = lambda.CfnCapacityProviderPropsMixin.CapacityProviderScalingConfigProperty(
    max_v_cpu_count=123,
    scaling_mode="scalingMode",
    scaling_policies=[lambda.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.

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 that determines how the capacity provider responds to changes in demand.

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

CapacityProviderTelemetryConfigProperty

class CfnCapacityProviderPropsMixin.CapacityProviderTelemetryConfigProperty(*, logging_config=None)

Bases: object

Configuration that specifies the telemetry collection for the capacity provider.

Parameters:

logging_config (Union[IResolvable, CapacityProviderLoggingConfigProperty, Dict[str, Any], None]) – The capacity provider’s Amazon CloudWatch Logs configuration settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-capacityprovider-capacityprovidertelemetryconfig.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.cfn_property_mixins import aws_lambda as lambda_

capacity_provider_telemetry_config_property = lambda.CfnCapacityProviderPropsMixin.CapacityProviderTelemetryConfigProperty(
    logging_config=lambda.CfnCapacityProviderPropsMixin.CapacityProviderLoggingConfigProperty(
        log_group="logGroup",
        system_log_level="systemLogLevel"
    )
)

Attributes

logging_config

The capacity provider’s Amazon CloudWatch Logs configuration settings.

See:

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

CapacityProviderVpcConfigProperty

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

Bases: object

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

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.cfn_property_mixins import aws_lambda as lambda_

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

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 launches compute 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 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 include x86_64 and arm64 .

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

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.cfn_property_mixins import aws_lambda as lambda_

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

See:

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

architectures

A list of supported CPU architectures for compute instances.

Valid values include x86_64 and 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 EC2 instance types that the capacity provider should not use, even if they meet other requirements.

See:

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

PropagateTagsConfigProperty

class CfnCapacityProviderPropsMixin.PropagateTagsConfigProperty(*, explicit_tags=None, mode=None)

Bases: object

Configuration that defines how tags are propagated to managed resources.

Parameters:
  • explicit_tags (Union[IResolvable, Sequence[Union[IResolvable, CfnTag, Dict[str, Any]]], None]) – A list of tags to explicitly propagate to managed resources. Maximum of 40 tags.

  • mode (Optional[str]) – The mode for tag propagation.

See:

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

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.cfn_property_mixins import aws_lambda as lambda_

propagate_tags_config_property = lambda.CfnCapacityProviderPropsMixin.PropagateTagsConfigProperty(
    explicit_tags=[CfnTag(
        key="key",
        value="value"
    )],
    mode="mode"
)

Attributes

explicit_tags

A list of tags to explicitly propagate to managed resources.

Maximum of 40 tags.

See:

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

mode

The mode for tag propagation.

See:

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

TargetTrackingScalingPolicyProperty

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

Bases: object

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

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.cfn_property_mixins import aws_lambda as lambda_

target_tracking_scaling_policy_property = lambda.CfnCapacityProviderPropsMixin.TargetTrackingScalingPolicyProperty(
    predefined_metric_type="predefinedMetricType",
    target_value=123
)

Attributes

predefined_metric_type

The predefined metric type to track for scaling decisions.

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 that the scaling policy attempts to maintain through scaling actions.

See:

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