CfnInstancePropsMixin

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

Bases: Mixin

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

See:

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

CloudformationResource:

AWS::OpsWorks::Instance

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_opsworks import mixins as opsworks_mixins

cfn_instance_props_mixin = opsworks_mixins.CfnInstancePropsMixin(opsworks_mixins.CfnInstanceMixinProps(
    agent_version="agentVersion",
    ami_id="amiId",
    architecture="architecture",
    auto_scaling_type="autoScalingType",
    availability_zone="availabilityZone",
    block_device_mappings=[opsworks_mixins.CfnInstancePropsMixin.BlockDeviceMappingProperty(
        device_name="deviceName",
        ebs=opsworks_mixins.CfnInstancePropsMixin.EbsBlockDeviceProperty(
            delete_on_termination=False,
            iops=123,
            snapshot_id="snapshotId",
            volume_size=123,
            volume_type="volumeType"
        ),
        no_device="noDevice",
        virtual_name="virtualName"
    )],
    ebs_optimized=False,
    elastic_ips=["elasticIps"],
    hostname="hostname",
    install_updates_on_boot=False,
    instance_type="instanceType",
    layer_ids=["layerIds"],
    os="os",
    root_device_type="rootDeviceType",
    ssh_key_name="sshKeyName",
    stack_id="stackId",
    subnet_id="subnetId",
    tenancy="tenancy",
    time_based_auto_scaling=opsworks_mixins.CfnInstancePropsMixin.TimeBasedAutoScalingProperty(
        friday={
            "friday_key": "friday"
        },
        monday={
            "monday_key": "monday"
        },
        saturday={
            "saturday_key": "saturday"
        },
        sunday={
            "sunday_key": "sunday"
        },
        thursday={
            "thursday_key": "thursday"
        },
        tuesday={
            "tuesday_key": "tuesday"
        },
        wednesday={
            "wednesday_key": "wednesday"
        }
    ),
    virtualization_type="virtualizationType",
    volumes=["volumes"]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

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

Parameters:
  • props (Union[CfnInstanceMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['agentVersion', 'amiId', 'architecture', 'autoScalingType', 'availabilityZone', 'blockDeviceMappings', 'ebsOptimized', 'elasticIps', 'hostname', 'installUpdatesOnBoot', 'instanceType', 'layerIds', 'os', 'rootDeviceType', 'sshKeyName', 'stackId', 'subnetId', 'tenancy', 'timeBasedAutoScaling', 'virtualizationType', 'volumes']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

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

Stability:

experimental

BlockDeviceMappingProperty

class CfnInstancePropsMixin.BlockDeviceMappingProperty(*, device_name=None, ebs=None, no_device=None, virtual_name=None)

Bases: object

Parameters:
  • device_name (Optional[str]) – The device name that is exposed to the instance, such as /dev/sdh . For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.

  • ebs (Union[IResolvable, EbsBlockDeviceProperty, Dict[str, Any], None]) – An EBSBlockDevice that defines how to configure an Amazon EBS volume when the instance is launched. You can specify either the VirtualName or Ebs , but not both.

  • no_device (Optional[str]) – Suppresses the specified device included in the AMI’s block device mapping.

  • virtual_name (Optional[str]) – The virtual device name. For more information, see BlockDeviceMapping . You can specify either the VirtualName or Ebs , but not both.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-blockdevicemapping.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_opsworks import mixins as opsworks_mixins

block_device_mapping_property = opsworks_mixins.CfnInstancePropsMixin.BlockDeviceMappingProperty(
    device_name="deviceName",
    ebs=opsworks_mixins.CfnInstancePropsMixin.EbsBlockDeviceProperty(
        delete_on_termination=False,
        iops=123,
        snapshot_id="snapshotId",
        volume_size=123,
        volume_type="volumeType"
    ),
    no_device="noDevice",
    virtual_name="virtualName"
)

Attributes

device_name

The device name that is exposed to the instance, such as /dev/sdh .

For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-blockdevicemapping.html#cfn-opsworks-instance-blockdevicemapping-devicename

ebs

An EBSBlockDevice that defines how to configure an Amazon EBS volume when the instance is launched.

You can specify either the VirtualName or Ebs , but not both.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-blockdevicemapping.html#cfn-opsworks-instance-blockdevicemapping-ebs

no_device

Suppresses the specified device included in the AMI’s block device mapping.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-blockdevicemapping.html#cfn-opsworks-instance-blockdevicemapping-nodevice

virtual_name

The virtual device name.

For more information, see BlockDeviceMapping . You can specify either the VirtualName or Ebs , but not both.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-blockdevicemapping.html#cfn-opsworks-instance-blockdevicemapping-virtualname

EbsBlockDeviceProperty

class CfnInstancePropsMixin.EbsBlockDeviceProperty(*, delete_on_termination=None, iops=None, snapshot_id=None, volume_size=None, volume_type=None)

Bases: object

Parameters:
  • delete_on_termination (Union[bool, IResolvable, None]) – Whether the volume is deleted on instance termination.

  • iops (Union[int, float, None]) – The number of I/O operations per second (IOPS) that the volume supports. For more information, see EbsBlockDevice .

  • snapshot_id (Optional[str]) – The snapshot ID.

  • volume_size (Union[int, float, None]) –

    The volume size, in GiB. For more information, see EbsBlockDevice .

  • volume_type (Optional[str]) – The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and standard for Magnetic volumes. If you specify the io1 volume type, you must also specify a value for the Iops attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. AWS uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-ebsblockdevice.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_opsworks import mixins as opsworks_mixins

ebs_block_device_property = opsworks_mixins.CfnInstancePropsMixin.EbsBlockDeviceProperty(
    delete_on_termination=False,
    iops=123,
    snapshot_id="snapshotId",
    volume_size=123,
    volume_type="volumeType"
)

Attributes

delete_on_termination

Whether the volume is deleted on instance termination.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-ebsblockdevice.html#cfn-opsworks-instance-ebsblockdevice-deleteontermination

iops

The number of I/O operations per second (IOPS) that the volume supports.

For more information, see EbsBlockDevice .

See:

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

snapshot_id

The snapshot ID.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-ebsblockdevice.html#cfn-opsworks-instance-ebsblockdevice-snapshotid

volume_size

The volume size, in GiB.

For more information, see EbsBlockDevice .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-ebsblockdevice.html#cfn-opsworks-instance-ebsblockdevice-volumesize

volume_type

The volume type.

gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and standard for Magnetic volumes.

If you specify the io1 volume type, you must also specify a value for the Iops attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. AWS uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).

See:

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

TimeBasedAutoScalingProperty

class CfnInstancePropsMixin.TimeBasedAutoScalingProperty(*, friday=None, monday=None, saturday=None, sunday=None, thursday=None, tuesday=None, wednesday=None)

Bases: object

Parameters:
  • friday (Union[Mapping[str, str], IResolvable, None]) – The schedule for Friday.

  • monday (Union[Mapping[str, str], IResolvable, None]) – The schedule for Monday.

  • saturday (Union[Mapping[str, str], IResolvable, None]) – The schedule for Saturday.

  • sunday (Union[Mapping[str, str], IResolvable, None]) – The schedule for Sunday.

  • thursday (Union[Mapping[str, str], IResolvable, None]) – The schedule for Thursday.

  • tuesday (Union[Mapping[str, str], IResolvable, None]) – The schedule for Tuesday.

  • wednesday (Union[Mapping[str, str], IResolvable, None]) – The schedule for Wednesday.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-timebasedautoscaling.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_opsworks import mixins as opsworks_mixins

time_based_auto_scaling_property = opsworks_mixins.CfnInstancePropsMixin.TimeBasedAutoScalingProperty(
    friday={
        "friday_key": "friday"
    },
    monday={
        "monday_key": "monday"
    },
    saturday={
        "saturday_key": "saturday"
    },
    sunday={
        "sunday_key": "sunday"
    },
    thursday={
        "thursday_key": "thursday"
    },
    tuesday={
        "tuesday_key": "tuesday"
    },
    wednesday={
        "wednesday_key": "wednesday"
    }
)

Attributes

friday

The schedule for Friday.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-timebasedautoscaling.html#cfn-opsworks-instance-timebasedautoscaling-friday

monday

The schedule for Monday.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-timebasedautoscaling.html#cfn-opsworks-instance-timebasedautoscaling-monday

saturday

The schedule for Saturday.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-timebasedautoscaling.html#cfn-opsworks-instance-timebasedautoscaling-saturday

sunday

The schedule for Sunday.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-timebasedautoscaling.html#cfn-opsworks-instance-timebasedautoscaling-sunday

thursday

The schedule for Thursday.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-timebasedautoscaling.html#cfn-opsworks-instance-timebasedautoscaling-thursday

tuesday

The schedule for Tuesday.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-timebasedautoscaling.html#cfn-opsworks-instance-timebasedautoscaling-tuesday

wednesday

The schedule for Wednesday.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-timebasedautoscaling.html#cfn-opsworks-instance-timebasedautoscaling-wednesday