CfnLayerPropsMixin

class aws_cdk.mixins_preview.aws_opsworks.mixins.CfnLayerPropsMixin(props, *, strategy=None)

Bases: Mixin

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html

CloudformationResource:

AWS::OpsWorks::Layer

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_opsworks import mixins as opsworks_mixins

# custom_json: Any

cfn_layer_props_mixin = opsworks_mixins.CfnLayerPropsMixin(opsworks_mixins.CfnLayerMixinProps(
    attributes={
        "attributes_key": "attributes"
    },
    auto_assign_elastic_ips=False,
    auto_assign_public_ips=False,
    custom_instance_profile_arn="customInstanceProfileArn",
    custom_json=custom_json,
    custom_recipes=opsworks_mixins.CfnLayerPropsMixin.RecipesProperty(
        configure=["configure"],
        deploy=["deploy"],
        setup=["setup"],
        shutdown=["shutdown"],
        undeploy=["undeploy"]
    ),
    custom_security_group_ids=["customSecurityGroupIds"],
    enable_auto_healing=False,
    install_updates_on_boot=False,
    lifecycle_event_configuration=opsworks_mixins.CfnLayerPropsMixin.LifecycleEventConfigurationProperty(
        shutdown_event_configuration=opsworks_mixins.CfnLayerPropsMixin.ShutdownEventConfigurationProperty(
            delay_until_elb_connections_drained=False,
            execution_timeout=123
        )
    ),
    load_based_auto_scaling=opsworks_mixins.CfnLayerPropsMixin.LoadBasedAutoScalingProperty(
        down_scaling=opsworks_mixins.CfnLayerPropsMixin.AutoScalingThresholdsProperty(
            cpu_threshold=123,
            ignore_metrics_time=123,
            instance_count=123,
            load_threshold=123,
            memory_threshold=123,
            thresholds_wait_time=123
        ),
        enable=False,
        up_scaling=opsworks_mixins.CfnLayerPropsMixin.AutoScalingThresholdsProperty(
            cpu_threshold=123,
            ignore_metrics_time=123,
            instance_count=123,
            load_threshold=123,
            memory_threshold=123,
            thresholds_wait_time=123
        )
    ),
    name="name",
    packages=["packages"],
    shortname="shortname",
    stack_id="stackId",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    type="type",
    use_ebs_optimized_instances=False,
    volume_configurations=[opsworks_mixins.CfnLayerPropsMixin.VolumeConfigurationProperty(
        encrypted=False,
        iops=123,
        mount_point="mountPoint",
        number_of_disks=123,
        raid_level=123,
        size=123,
        volume_type="volumeType"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::OpsWorks::Layer.

Parameters:
  • props (Union[CfnLayerMixinProps, 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:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['attributes', 'autoAssignElasticIps', 'autoAssignPublicIps', 'customInstanceProfileArn', 'customJson', 'customRecipes', 'customSecurityGroupIds', 'enableAutoHealing', 'installUpdatesOnBoot', 'lifecycleEventConfiguration', 'loadBasedAutoScaling', 'name', 'packages', 'shortname', 'stackId', 'tags', 'type', 'useEbsOptimizedInstances', 'volumeConfigurations']

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

AutoScalingThresholdsProperty

class CfnLayerPropsMixin.AutoScalingThresholdsProperty(*, cpu_threshold=None, ignore_metrics_time=None, instance_count=None, load_threshold=None, memory_threshold=None, thresholds_wait_time=None)

Bases: object

Parameters:
  • cpu_threshold (Union[int, float, None]) – The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.

  • ignore_metrics_time (Union[int, float, None]) – The amount of time (in minutes) after a scaling event occurs that OpsWorks Stacks should ignore metrics and suppress additional scaling events. For example, OpsWorks Stacks adds new instances following an upscaling event but the instances won’t start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime allows you to direct OpsWorks Stacks to suppress scaling events long enough to get the new instances online.

  • instance_count (Union[int, float, None]) – The number of instances to add or remove when the load exceeds a threshold.

  • load_threshold (Union[int, float, None]) – The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing) .

  • memory_threshold (Union[int, float, None]) – The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.

  • thresholds_wait_time (Union[int, float, None]) – The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-autoscalingthresholds.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_opsworks import mixins as opsworks_mixins

auto_scaling_thresholds_property = opsworks_mixins.CfnLayerPropsMixin.AutoScalingThresholdsProperty(
    cpu_threshold=123,
    ignore_metrics_time=123,
    instance_count=123,
    load_threshold=123,
    memory_threshold=123,
    thresholds_wait_time=123
)

Attributes

cpu_threshold

The CPU utilization threshold, as a percent of the available CPU.

A value of -1 disables the threshold.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-autoscalingthresholds.html#cfn-opsworks-layer-autoscalingthresholds-cputhreshold

ignore_metrics_time

The amount of time (in minutes) after a scaling event occurs that OpsWorks Stacks should ignore metrics and suppress additional scaling events.

For example, OpsWorks Stacks adds new instances following an upscaling event but the instances won’t start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime allows you to direct OpsWorks Stacks to suppress scaling events long enough to get the new instances online.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-autoscalingthresholds.html#cfn-opsworks-layer-autoscalingthresholds-ignoremetricstime

instance_count

The number of instances to add or remove when the load exceeds a threshold.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-autoscalingthresholds.html#cfn-opsworks-layer-autoscalingthresholds-instancecount

load_threshold

The load threshold.

A value of -1 disables the threshold. For more information about how load is computed, see Load (computing) .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-autoscalingthresholds.html#cfn-opsworks-layer-autoscalingthresholds-loadthreshold

memory_threshold

The memory utilization threshold, as a percent of the available memory.

A value of -1 disables the threshold.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-autoscalingthresholds.html#cfn-opsworks-layer-autoscalingthresholds-memorythreshold

thresholds_wait_time

The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-autoscalingthresholds.html#cfn-opsworks-layer-autoscalingthresholds-thresholdswaittime

LifecycleEventConfigurationProperty

class CfnLayerPropsMixin.LifecycleEventConfigurationProperty(*, shutdown_event_configuration=None)

Bases: object

Parameters:

shutdown_event_configuration (Union[IResolvable, ShutdownEventConfigurationProperty, Dict[str, Any], None]) – The Shutdown event configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-lifecycleeventconfiguration.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_opsworks import mixins as opsworks_mixins

lifecycle_event_configuration_property = opsworks_mixins.CfnLayerPropsMixin.LifecycleEventConfigurationProperty(
    shutdown_event_configuration=opsworks_mixins.CfnLayerPropsMixin.ShutdownEventConfigurationProperty(
        delay_until_elb_connections_drained=False,
        execution_timeout=123
    )
)

Attributes

shutdown_event_configuration

The Shutdown event configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-lifecycleeventconfiguration.html#cfn-opsworks-layer-lifecycleeventconfiguration-shutdowneventconfiguration

LoadBasedAutoScalingProperty

class CfnLayerPropsMixin.LoadBasedAutoScalingProperty(*, down_scaling=None, enable=None, up_scaling=None)

Bases: object

Parameters:
  • down_scaling (Union[IResolvable, AutoScalingThresholdsProperty, Dict[str, Any], None]) – An AutoScalingThresholds object that describes the downscaling configuration, which defines how and when OpsWorks Stacks reduces the number of instances.

  • enable (Union[bool, IResolvable, None]) – Whether load-based auto scaling is enabled for the layer.

  • up_scaling (Union[IResolvable, AutoScalingThresholdsProperty, Dict[str, Any], None]) – An AutoScalingThresholds object that describes the upscaling configuration, which defines how and when OpsWorks Stacks increases the number of instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-loadbasedautoscaling.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_opsworks import mixins as opsworks_mixins

load_based_auto_scaling_property = opsworks_mixins.CfnLayerPropsMixin.LoadBasedAutoScalingProperty(
    down_scaling=opsworks_mixins.CfnLayerPropsMixin.AutoScalingThresholdsProperty(
        cpu_threshold=123,
        ignore_metrics_time=123,
        instance_count=123,
        load_threshold=123,
        memory_threshold=123,
        thresholds_wait_time=123
    ),
    enable=False,
    up_scaling=opsworks_mixins.CfnLayerPropsMixin.AutoScalingThresholdsProperty(
        cpu_threshold=123,
        ignore_metrics_time=123,
        instance_count=123,
        load_threshold=123,
        memory_threshold=123,
        thresholds_wait_time=123
    )
)

Attributes

down_scaling

An AutoScalingThresholds object that describes the downscaling configuration, which defines how and when OpsWorks Stacks reduces the number of instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-loadbasedautoscaling.html#cfn-opsworks-layer-loadbasedautoscaling-downscaling

enable

Whether load-based auto scaling is enabled for the layer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-loadbasedautoscaling.html#cfn-opsworks-layer-loadbasedautoscaling-enable

up_scaling

An AutoScalingThresholds object that describes the upscaling configuration, which defines how and when OpsWorks Stacks increases the number of instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-loadbasedautoscaling.html#cfn-opsworks-layer-loadbasedautoscaling-upscaling

RecipesProperty

class CfnLayerPropsMixin.RecipesProperty(*, configure=None, deploy=None, setup=None, shutdown=None, undeploy=None)

Bases: object

Parameters:
  • configure (Optional[Sequence[str]]) – An array of custom recipe names to be run following a configure event.

  • deploy (Optional[Sequence[str]]) – An array of custom recipe names to be run following a deploy event.

  • setup (Optional[Sequence[str]]) – An array of custom recipe names to be run following a setup event.

  • shutdown (Optional[Sequence[str]]) – An array of custom recipe names to be run following a shutdown event.

  • undeploy (Optional[Sequence[str]]) – An array of custom recipe names to be run following a undeploy event.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-recipes.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_opsworks import mixins as opsworks_mixins

recipes_property = opsworks_mixins.CfnLayerPropsMixin.RecipesProperty(
    configure=["configure"],
    deploy=["deploy"],
    setup=["setup"],
    shutdown=["shutdown"],
    undeploy=["undeploy"]
)

Attributes

configure

An array of custom recipe names to be run following a configure event.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-recipes.html#cfn-opsworks-layer-recipes-configure

deploy

An array of custom recipe names to be run following a deploy event.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-recipes.html#cfn-opsworks-layer-recipes-deploy

setup

An array of custom recipe names to be run following a setup event.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-recipes.html#cfn-opsworks-layer-recipes-setup

shutdown

An array of custom recipe names to be run following a shutdown event.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-recipes.html#cfn-opsworks-layer-recipes-shutdown

undeploy

An array of custom recipe names to be run following a undeploy event.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-recipes.html#cfn-opsworks-layer-recipes-undeploy

ShutdownEventConfigurationProperty

class CfnLayerPropsMixin.ShutdownEventConfigurationProperty(*, delay_until_elb_connections_drained=None, execution_timeout=None)

Bases: object

Parameters:
  • delay_until_elb_connections_drained (Union[bool, IResolvable, None]) – Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining

  • execution_timeout (Union[int, float, None]) – The time, in seconds, that OpsWorks Stacks waits after triggering a Shutdown event before shutting down an instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-shutdowneventconfiguration.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_opsworks import mixins as opsworks_mixins

shutdown_event_configuration_property = opsworks_mixins.CfnLayerPropsMixin.ShutdownEventConfigurationProperty(
    delay_until_elb_connections_drained=False,
    execution_timeout=123
)

Attributes

delay_until_elb_connections_drained

Whether to enable Elastic Load Balancing connection draining.

For more information, see Connection Draining

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-shutdowneventconfiguration.html#cfn-opsworks-layer-shutdowneventconfiguration-delayuntilelbconnectionsdrained

execution_timeout

The time, in seconds, that OpsWorks Stacks waits after triggering a Shutdown event before shutting down an instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-shutdowneventconfiguration.html#cfn-opsworks-layer-shutdowneventconfiguration-executiontimeout

VolumeConfigurationProperty

class CfnLayerPropsMixin.VolumeConfigurationProperty(*, encrypted=None, iops=None, mount_point=None, number_of_disks=None, raid_level=None, size=None, volume_type=None)

Bases: object

Parameters:
  • encrypted (Union[bool, IResolvable, None]) – Specifies whether an Amazon EBS volume is encrypted. For more information, see Amazon EBS Encryption .

  • iops (Union[int, float, None]) – The number of I/O operations per second (IOPS) to provision for the volume. For PIOPS volumes, the IOPS per disk. If you specify io1 for the volume type, you must specify this property.

  • mount_point (Optional[str]) – The volume mount point. For example “/dev/sdh”.

  • number_of_disks (Union[int, float, None]) – The number of disks in the volume.

  • raid_level (Union[int, float, None]) – The volume RAID level .

  • size (Union[int, float, None]) – The volume size.

  • volume_type (Optional[str]) – The volume type. For more information, see Amazon EBS Volume Types . - standard - Magnetic. Magnetic volumes must have a minimum size of 1 GiB and a maximum size of 1024 GiB. - io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size of 4 GiB and a maximum size of 16384 GiB. - gp2 - General Purpose (SSD). General purpose volumes must have a minimum size of 1 GiB and a maximum size of 16384 GiB. - st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB. - sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-volumeconfiguration.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_opsworks import mixins as opsworks_mixins

volume_configuration_property = opsworks_mixins.CfnLayerPropsMixin.VolumeConfigurationProperty(
    encrypted=False,
    iops=123,
    mount_point="mountPoint",
    number_of_disks=123,
    raid_level=123,
    size=123,
    volume_type="volumeType"
)

Attributes

encrypted

Specifies whether an Amazon EBS volume is encrypted.

For more information, see Amazon EBS Encryption .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-volumeconfiguration.html#cfn-opsworks-layer-volumeconfiguration-encrypted

iops

The number of I/O operations per second (IOPS) to provision for the volume.

For PIOPS volumes, the IOPS per disk.

If you specify io1 for the volume type, you must specify this property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-volumeconfiguration.html#cfn-opsworks-layer-volumeconfiguration-iops

mount_point

The volume mount point.

For example “/dev/sdh”.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-volumeconfiguration.html#cfn-opsworks-layer-volumeconfiguration-mountpoint

number_of_disks

The number of disks in the volume.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-volumeconfiguration.html#cfn-opsworks-layer-volumeconfiguration-numberofdisks

raid_level

The volume RAID level .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-volumeconfiguration.html#cfn-opsworks-layer-volumeconfiguration-raidlevel

size

The volume size.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-volumeconfiguration.html#cfn-opsworks-layer-volumeconfiguration-size

volume_type

The volume type. For more information, see Amazon EBS Volume Types .

  • standard - Magnetic. Magnetic volumes must have a minimum size of 1 GiB and a maximum size of 1024 GiB.

  • io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size of 4 GiB and a maximum size of 16384 GiB.

  • gp2 - General Purpose (SSD). General purpose volumes must have a minimum size of 1 GiB and a maximum size of 16384 GiB.

  • st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

  • sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-volumeconfiguration.html#cfn-opsworks-layer-volumeconfiguration-volumetype