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[IResolvable, RecipesProperty, Dict[str, Any], 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[IResolvable, LifecycleEventConfigurationProperty, Dict[str, Any], 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[IResolvable, LoadBasedAutoScalingProperty, Dict[str, Any], 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[IResolvable, VolumeConfigurationProperty, Dict[str, Any]]], None]) – A VolumeConfigurations object that describes the layer’s Amazon EBS volumes.

See:

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.

See:

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

auto_assign_elastic_ips

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

See:

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

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 .

See:

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

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 .

See:

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

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 .

See:

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

custom_recipes

A LayerCustomRecipes object that specifies the layer custom recipes.

See:

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

custom_security_group_ids

An array containing the layer custom security group IDs.

See:

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

enable_auto_healing

Whether to disable auto healing for the layer.

See:

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

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`` .
See:

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

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.

See:

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

load_based_auto_scaling

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

See:

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

name

The layer name, which is used by the console.

Layer names can be a maximum of 32 characters.

See:

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

packages

An array of Package objects that describes the layer packages.

See:

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

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 .

See:

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

stack_id

The layer stack ID.

See:

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

tags

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

Use tags to manage your resources.

See:

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

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.

See:

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

use_ebs_optimized_instances

Whether to use Amazon EBS-optimized instances.

See:

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

volume_configurations

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

See:

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