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

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

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 = 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"
    )]
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • 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_dependency(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_depends_on(target)

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

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

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 intermediate 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). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

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 resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

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.

  • type_hint (Optional[ResolutionTypeHint]) –

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

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

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

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
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'
attr_id

Id

Type:

cloudformationAttribute

attributes

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

auto_assign_elastic_ips

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

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.

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.

custom_json

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

custom_recipes

A LayerCustomRecipes object that specifies the layer custom recipes.

custom_security_group_ids

An array containing the layer custom security group IDs.

enable_auto_healing

Whether to disable auto healing for the layer.

install_updates_on_boot

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

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.

load_based_auto_scaling

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

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.

node

The tree node.

packages

An array of Package objects that describes the 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.

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.

tags

Tag Manager which manages the tags for this resource.

tags_raw

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

type

The layer type.

use_ebs_optimized_instances

Whether to use Amazon EBS-optimized instances.

volume_configurations

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

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(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

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

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.

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

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

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 CfnLayer.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 import 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.

See:

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

LoadBasedAutoScalingProperty

class CfnLayer.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 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.

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

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 AWS 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 CfnLayer.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 import 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.

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 CfnLayer.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 AWS 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 import 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

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 AWS 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 CfnLayer.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 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.

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

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

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

See:

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

Type:

The volume `RAID level <https

Type:

//docs.aws.amazon.com/http

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

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

See:

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

Type:

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