CfnInstancePropsMixin
- class aws_cdk.mixins_preview.aws_opsworks.mixins.CfnInstancePropsMixin(props, *, strategy=None)
Bases:
Mixinhttp://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:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- 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 toROOT_DEVICEand OpsWorks Stacks will provide the correct device name.ebs (
Union[IResolvable,EbsBlockDeviceProperty,Dict[str,Any],None]) – AnEBSBlockDevicethat defines how to configure an Amazon EBS volume when the instance is launched. You can specify either theVirtualNameorEbs, 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 theVirtualNameorEbs, but not both.
- See:
- 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_DEVICEand OpsWorks Stacks will provide the correct device name.
- ebs
An
EBSBlockDevicethat defines how to configure an Amazon EBS volume when the instance is launched.You can specify either the
VirtualNameorEbs, but not both.
- no_device
Suppresses the specified device included in the AMI’s block device mapping.
- virtual_name
The virtual device name.
For more information, see BlockDeviceMapping . You can specify either the
VirtualNameorEbs, but not both.
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.gp2for General Purpose (SSD) volumes,io1for Provisioned IOPS (SSD) volumes,st1for Throughput Optimized hard disk drives (HDD),sc1for Cold HDD,andstandardfor Magnetic volumes. If you specify theio1volume type, you must also specify a value for theIopsattribute. 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:
- 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.
- iops
The number of I/O operations per second (IOPS) that the volume supports.
For more information, see EbsBlockDevice .
- snapshot_id
The snapshot ID.
- volume_size
The volume size, in GiB.
For more information, see EbsBlockDevice .
- volume_type
The volume type.
gp2for General Purpose (SSD) volumes,io1for Provisioned IOPS (SSD) volumes,st1for Throughput Optimized hard disk drives (HDD),sc1for Cold HDD,andstandardfor Magnetic volumes.If you specify the
io1volume type, you must also specify a value for theIopsattribute. 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).
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:
- 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.
- monday
The schedule for Monday.
- saturday
The schedule for Saturday.
- sunday
The schedule for Sunday.
- thursday
The schedule for Thursday.
- tuesday
The schedule for Tuesday.