CfnLayerProps

class aws_cdk.aws_opsworks.CfnLayerProps(*, auto_assign_elastic_ips, auto_assign_public_ips, enable_auto_healing, name, shortname, stack_id, type, attributes=None, custom_instance_profile_arn=None, custom_json=None, custom_recipes=None, custom_security_group_ids=None, install_updates_on_boot=None, lifecycle_event_configuration=None, load_based_auto_scaling=None, packages=None, tags=None, use_ebs_optimized_instances=None, volume_configurations=None)

Bases: object

Properties for defining a CfnLayer.

Parameters
  • auto_assign_elastic_ips (Union[bool, IResolvable]) – Whether to automatically assign an Elastic IP address to the layer’s instances. For more information, see How to Edit a Layer .

  • auto_assign_public_ips (Union[bool, IResolvable]) –

    For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer’s instances. For more information, see How to Edit a Layer .

  • enable_auto_healing (Union[bool, IResolvable]) – Whether to disable auto healing for the layer.

  • name (str) – The layer name, which is used by the console. Layer names can be a maximum of 32 characters.

  • shortname (str) – For custom layers only, use this parameter to specify the layer’s short name, which is used internally by AWS OpsWorks Stacks and by Chef recipes. The short name is also used as the name for the directory where your app files are installed. It can have a maximum of 32 characters, which are limited to the alphanumeric characters, ‘-’, ‘_’, and ‘.’. Built-in layer short names are defined by AWS OpsWorks Stacks. For more information, see the Layer Reference .

  • stack_id (str) – The layer stack ID.

  • type (str) – The layer type. A stack cannot have more than one built-in layer of the same type. It can have any number of custom layers. Built-in layers are not available in Chef 12 stacks.

  • attributes (Union[IResolvable, Mapping[str, str], None]) – One or more user-defined key-value pairs to be added to the stack attributes. To create a cluster layer, set the EcsClusterArn attribute to the cluster’s ARN.

  • custom_instance_profile_arn (Optional[str]) – The ARN of an IAM profile to be used for the layer’s EC2 instances. For more information about IAM ARNs, see Using Identifiers .

  • custom_json (Optional[Any]) – A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer’s instances. For more information, see Using Custom JSON . This feature is supported as of version 1.7.42 of the AWS CLI .

  • custom_recipes (Union[RecipesProperty, Dict[str, Any], IResolvable, None]) – A LayerCustomRecipes object that specifies the layer custom recipes.

  • custom_security_group_ids (Optional[Sequence[str]]) – An array containing the layer custom security group IDs.

  • install_updates_on_boot (Union[bool, IResolvable, None]) – Whether to install operating system and package updates when the instance boots. The default value is true . To control when updates are installed, set this value to false . You must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. .. epigraph:: To ensure that your instances have the latest security updates, we strongly recommend using the default value of true .

  • lifecycle_event_configuration (Union[LifecycleEventConfigurationProperty, Dict[str, Any], IResolvable, None]) – A LifeCycleEventConfiguration object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.

  • load_based_auto_scaling (Union[LoadBasedAutoScalingProperty, Dict[str, Any], IResolvable, None]) – The load-based scaling configuration for the AWS OpsWorks layer.

  • packages (Optional[Sequence[str]]) – An array of Package objects that describes the layer packages.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer. Use tags to manage your resources.

  • use_ebs_optimized_instances (Union[bool, IResolvable, None]) – Whether to use Amazon EBS-optimized instances.

  • volume_configurations (Union[IResolvable, Sequence[Union[VolumeConfigurationProperty, Dict[str, Any], IResolvable]], None]) – A VolumeConfigurations object that describes the layer’s Amazon EBS volumes.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.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 import aws_opsworks as opsworks

# custom_json: Any

cfn_layer_props = opsworks.CfnLayerProps(
    auto_assign_elastic_ips=False,
    auto_assign_public_ips=False,
    enable_auto_healing=False,
    name="name",
    shortname="shortname",
    stack_id="stackId",
    type="type",

    # the properties below are optional
    attributes={
        "attributes_key": "attributes"
    },
    custom_instance_profile_arn="customInstanceProfileArn",
    custom_json=custom_json,
    custom_recipes=opsworks.CfnLayer.RecipesProperty(
        configure=["configure"],
        deploy=["deploy"],
        setup=["setup"],
        shutdown=["shutdown"],
        undeploy=["undeploy"]
    ),
    custom_security_group_ids=["customSecurityGroupIds"],
    install_updates_on_boot=False,
    lifecycle_event_configuration=opsworks.CfnLayer.LifecycleEventConfigurationProperty(
        shutdown_event_configuration=opsworks.CfnLayer.ShutdownEventConfigurationProperty(
            delay_until_elb_connections_drained=False,
            execution_timeout=123
        )
    ),
    load_based_auto_scaling=opsworks.CfnLayer.LoadBasedAutoScalingProperty(
        down_scaling=opsworks.CfnLayer.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.CfnLayer.AutoScalingThresholdsProperty(
            cpu_threshold=123,
            ignore_metrics_time=123,
            instance_count=123,
            load_threshold=123,
            memory_threshold=123,
            thresholds_wait_time=123
        )
    ),
    packages=["packages"],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    use_ebs_optimized_instances=False,
    volume_configurations=[opsworks.CfnLayer.VolumeConfigurationProperty(
        encrypted=False,
        iops=123,
        mount_point="mountPoint",
        number_of_disks=123,
        raid_level=123,
        size=123,
        volume_type="volumeType"
    )]
)

Attributes

attributes

One or more user-defined key-value pairs to be added to the stack attributes.

To create a cluster layer, set the EcsClusterArn attribute to the cluster’s ARN.

Link

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

Return type

Union[IResolvable, Mapping[str, str], None]

auto_assign_elastic_ips

//docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html>`_ .

Link

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

Type

Whether to automatically assign an `Elastic IP address <https

Type

//docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ to the layer’s instances. For more information, see `How to Edit a Layer <https

Return type

Union[bool, IResolvable]

auto_assign_public_ips

For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer’s instances.

For more information, see How to Edit a Layer .

Link

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

Return type

Union[bool, IResolvable]

custom_instance_profile_arn

The ARN of an IAM profile to be used for the layer’s EC2 instances.

For more information about IAM ARNs, see Using Identifiers .

Link

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

Return type

Optional[str]

custom_json

A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer’s instances.

For more information, see Using Custom JSON . This feature is supported as of version 1.7.42 of the AWS CLI .

Link

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

Return type

Any

custom_recipes

A LayerCustomRecipes object that specifies the layer custom recipes.

Link

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

Return type

Union[RecipesProperty, IResolvable, None]

custom_security_group_ids

An array containing the layer custom security group IDs.

Link

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

Return type

Optional[List[str]]

enable_auto_healing

Whether to disable auto healing for the layer.

Link

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

Return type

Union[bool, IResolvable]

install_updates_on_boot

Whether to install operating system and package updates when the instance boots.

The default value is true . To control when updates are installed, set this value to false . You must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. .. epigraph:

To ensure that your instances have the latest security updates, we strongly recommend using the default value of ``true`` .
Link

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

Return type

Union[bool, IResolvable, None]

lifecycle_event_configuration

A LifeCycleEventConfiguration object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.

Link

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

Return type

Union[LifecycleEventConfigurationProperty, IResolvable, None]

load_based_auto_scaling

The load-based scaling configuration for the AWS OpsWorks layer.

Link

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

Return type

Union[LoadBasedAutoScalingProperty, IResolvable, None]

name

The layer name, which is used by the console.

Layer names can be a maximum of 32 characters.

Link

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

Return type

str

packages

An array of Package objects that describes the layer packages.

Link

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

Return type

Optional[List[str]]

shortname

For custom layers only, use this parameter to specify the layer’s short name, which is used internally by AWS OpsWorks Stacks and by Chef recipes.

The short name is also used as the name for the directory where your app files are installed. It can have a maximum of 32 characters, which are limited to the alphanumeric characters, ‘-’, ‘_’, and ‘.’.

Built-in layer short names are defined by AWS OpsWorks Stacks. For more information, see the Layer Reference .

Link

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

Return type

str

stack_id

The layer stack ID.

Link

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

Return type

str

tags

Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer.

Use tags to manage your resources.

Link

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

Return type

Optional[List[CfnTag]]

type

The layer type.

A stack cannot have more than one built-in layer of the same type. It can have any number of custom layers. Built-in layers are not available in Chef 12 stacks.

Link

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

Return type

str

use_ebs_optimized_instances

Whether to use Amazon EBS-optimized instances.

Link

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

Return type

Union[bool, IResolvable, None]

volume_configurations

A VolumeConfigurations object that describes the layer’s Amazon EBS volumes.

Link

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

Return type

Union[IResolvable, List[Union[VolumeConfigurationProperty, IResolvable]], None]