CfnLayer

class aws_cdk.aws_opsworks.CfnLayer(scope, id, *, 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: CfnResource

A CloudFormation AWS::OpsWorks::Layer.

Creates a layer. For more information, see How to Create a Layer . .. epigraph:

You should use *CreateLayer* for noncustom layer types such as PHP App Server only if the stack does not have an existing layer of that type. A stack can have at most one instance of each noncustom layer; if you attempt to create a second instance, *CreateLayer* fails. A stack can have an arbitrary number of custom layers, so you can call *CreateLayer* as many times as you like for that layer type.

Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .

CloudformationResource:

AWS::OpsWorks::Layer

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.
import aws_cdk.aws_opsworks as opsworks

# custom_json: Any

cfn_layer = opsworks.CfnLayer(self, "MyCfnLayer",
    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"
    )]
)

Create a new AWS::OpsWorks::Layer.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

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

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::OpsWorks::Layer'
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

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

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

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

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

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

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

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

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

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

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

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

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

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

node

The construct tree node associated with this construct.

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

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

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

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

stack_id

The layer stack ID.

Link:

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.

Link:

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.

Link:

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.

Link:

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.

Link:

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

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

AutoScalingThresholdsProperty

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

Bases: object

Describes a load-based auto scaling upscaling or downscaling threshold configuration, which specifies when AWS OpsWorks Stacks starts or stops load-based instances.

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 AWS OpsWorks Stacks should ignore metrics and suppress additional scaling events. For example, AWS 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 AWS 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.

Link:

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

auto_scaling_thresholds_property = opsworks.CfnLayer.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.

Link:

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

ignore_metrics_time

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

For example, AWS 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 AWS OpsWorks Stacks to suppress scaling events long enough to get the new instances online.

Link:

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

instance_count

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-loadbasedautoscaling-autoscalingthresholds.html#cfn-opsworks-layer-loadbasedautoscaling-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) .

Link:

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

memory_threshold

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

A value of -1 disables the threshold.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-loadbasedautoscaling-autoscalingthresholds.html#cfn-opsworks-layer-loadbasedautoscaling-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.

Link:

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

LifecycleEventConfigurationProperty

class CfnLayer.LifecycleEventConfigurationProperty(*, shutdown_event_configuration=None)

Bases: object

Specifies the lifecycle event configuration.

Parameters:

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

Link:

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.
import aws_cdk.aws_opsworks as opsworks

lifecycle_event_configuration_property = opsworks.CfnLayer.LifecycleEventConfigurationProperty(
    shutdown_event_configuration=opsworks.CfnLayer.ShutdownEventConfigurationProperty(
        delay_until_elb_connections_drained=False,
        execution_timeout=123
    )
)

Attributes

shutdown_event_configuration

The Shutdown event configuration.

Link:

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

LoadBasedAutoScalingProperty

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

Bases: object

Describes a layer’s load-based auto scaling configuration.

Parameters:
  • down_scaling (Union[IResolvable, AutoScalingThresholdsProperty, Dict[str, Any], None]) – An AutoScalingThresholds object that describes the downscaling configuration, which defines how and when AWS 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 AWS OpsWorks Stacks increases the number of instances.

Link:

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.
import aws_cdk.aws_opsworks as opsworks

load_based_auto_scaling_property = 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
    )
)

Attributes

down_scaling

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

Link:

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.

Link:

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 AWS OpsWorks Stacks increases the number of instances.

Link:

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

RecipesProperty

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

Bases: object

AWS OpsWorks Stacks supports five lifecycle events: setup , configuration , deploy , undeploy , and shutdown .

For each layer, AWS OpsWorks Stacks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks Stacks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

To specify a recipe, use the cookbook’s directory name in the repository followed by two colons and the recipe name, which is the recipe’s file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository’s phpapp2 folder.

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.

Link:

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.
import aws_cdk.aws_opsworks as opsworks

recipes_property = opsworks.CfnLayer.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.

Link:

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

deploy

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

Link:

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

setup

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

Link:

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

shutdown

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

Link:

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

undeploy

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

Link:

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

ShutdownEventConfigurationProperty

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

Bases: object

The Shutdown event configuration.

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 AWS OpsWorks Stacks waits after triggering a Shutdown event before shutting down an instance.

Link:

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

shutdown_event_configuration_property = opsworks.CfnLayer.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

Link:

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

execution_timeout

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

Link:

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

VolumeConfigurationProperty

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

Bases: object

Describes an Amazon EBS volume configuration.

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 500 GiB and a maximum size of 16384 GiB. - sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 500 GiB and a maximum size of 16384 GiB.

Link:

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.
import aws_cdk.aws_opsworks as opsworks

volume_configuration_property = opsworks.CfnLayer.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 .

Link:

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.

Link:

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

mount_point

The volume mount point.

For example “/dev/sdh”.

Link:

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

number_of_disks

The number of disks in the volume.

Link:

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

raid_level

//en.wikipedia.org/wiki/Standard_RAID_levels>`_ .

Link:

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

Type:

The volume `RAID level <https

Type:

//docs.aws.amazon.com/http

size

The volume size.

Link:

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

volume_type

//docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ .

  • 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 500 GiB and a maximum size of 16384 GiB.

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

Link:

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

Type:

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