LaunchTemplate
This class encapsulates and extends the ROS resource type ALIYUN::ECS::LaunchTemplate
, which is used to create a launch template.
You can use a launch template to create an Elastic Compute Service (ECS) instance.
Initializers
import ros_cdk_ecs
ros_cdk_ecs.LaunchTemplate(
scope: Construct,
id: str,
launch_template_name: typing.Union[str, IResolvable],
auto_release_time: typing.Union[str, IResolvable] = None,
deployment_set_id: typing.Union[str, IResolvable] = None,
description: typing.Union[str, IResolvable] = None,
disk_mappings: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, DiskMappingsProperty]]] = None,
host_name: typing.Union[str, IResolvable] = None,
image_id: typing.Union[str, IResolvable] = None,
image_owner_alias: typing.Union[str, IResolvable] = None,
instance_charge_type: typing.Union[str, IResolvable] = None,
instance_name: typing.Union[str, IResolvable] = None,
instance_type: typing.Union[str, IResolvable] = None,
internet_charge_type: typing.Union[str, IResolvable] = None,
internet_max_bandwidth_out: typing.Union[typing.Union[int, float], IResolvable] = None,
io_optimized: typing.Union[str, IResolvable] = None,
ipv6_address_count: typing.Union[typing.Union[int, float], IResolvable] = None,
key_pair_name: typing.Union[str, IResolvable] = None,
network_interfaces: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, NetworkInterfacesProperty]]] = None,
network_type: typing.Union[str, IResolvable] = None,
password_inherit: typing.Union[bool, IResolvable] = None,
period: typing.Union[typing.Union[int, float], IResolvable] = None,
private_ip_address: typing.Union[str, IResolvable] = None,
ram_role_name: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
security_enhancement_strategy: typing.Union[str, IResolvable] = None,
security_group_id: typing.Union[str, IResolvable] = None,
security_group_ids: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
spot_duration: typing.Union[typing.Union[int, float], IResolvable] = None,
spot_price_limit: typing.Union[str, IResolvable] = None,
spot_strategy: typing.Union[str, IResolvable] = None,
system_disk_category: typing.Union[str, IResolvable] = None,
system_disk_delete_with_instance: typing.Union[bool, IResolvable] = None,
system_disk_description: typing.Union[str, IResolvable] = None,
system_disk_disk_name: typing.Union[str, IResolvable] = None,
system_disk_performance_level: typing.Union[str, IResolvable] = None,
system_disk_size: typing.Union[typing.Union[int, float], IResolvable] = None,
tags: typing.List[TagsProperty] = None,
template_resource_group_id: typing.Union[str, IResolvable] = None,
template_tags: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, TemplateTagsProperty]]] = None,
user_data: typing.Union[str, IResolvable] = None,
version_description: typing.Union[str, IResolvable] = None,
v_switch_id: typing.Union[str, IResolvable] = None,
zone_id: typing.Union[str, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
launch_template_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property launchTemplateName: The name of launch template. |
auto_release_time |
typing.Union[str, ros_cdk_core.IResolvable] |
Property autoReleaseTime: Auto release time for created instance, Follow ISO8601 standard using UTC time. |
deployment_set_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property deploymentSetId: The ID of the deployment set. |
description |
typing.Union[str, ros_cdk_core.IResolvable] |
Property description: Description of the instance, [2, 256] characters. |
disk_mappings |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, DiskMappingsProperty]]] |
Property diskMappings: Disk mappings to attach to instance. |
host_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property hostName: Host name of created ecs instance. |
image_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property imageId: Image ID to create ecs instance. |
image_owner_alias |
typing.Union[str, ros_cdk_core.IResolvable] |
Property imageOwnerAlias: The source of the image. |
instance_charge_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceChargeType: The billing method of the instance. |
instance_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceName: Display name of the instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'. |
instance_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceType: Ecs instance supported instance type, make sure it should be correct. |
internet_charge_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property internetChargeType: Instance internet access charge type.Support 'PayByBandwidth' and 'PayByTraffic' only. |
internet_max_bandwidth_out |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property internetMaxBandwidthOut: Max internet out bandwidth in Mbps(Mega bit per second). |
io_optimized |
typing.Union[str, ros_cdk_core.IResolvable] |
Property ioOptimized: The 'optimized' instance can provide better IO performance. |
ipv6_address_count |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property ipv6AddressCount: The number of IPv6 addresses to be randomly generated for the primary ENI. |
key_pair_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property keyPairName: SSH key pair name. |
network_interfaces |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, NetworkInterfacesProperty]]] |
Property networkInterfaces: Elastic network interfaces to be attached to instance. |
network_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property networkType: Instance network type. |
password_inherit |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property passwordInherit: Specifies whether to use the password preset in the image. |
period |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property period: The subscription period of the instance. |
private_ip_address |
typing.Union[str, ros_cdk_core.IResolvable] |
Property privateIpAddress: The private IP address of the instance. |
ram_role_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property ramRoleName: Instance RAM role name. |
resource_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property resourceGroupId: The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and elastic network interface (ENI). |
security_enhancement_strategy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property securityEnhancementStrategy: Activate or deactivate security enhancement,Value range: "Active" and "Deactive". |
security_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property securityGroupId: Security group to create ecs instance. |
security_group_ids |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] |
Property securityGroupIds: The ID of security group list to which to assign the instance. |
spot_duration |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property spotDuration: The protection period of the preemptible instance. |
spot_price_limit |
typing.Union[str, ros_cdk_core.IResolvable] |
Property spotPriceLimit: The hourly price threshold of a instance, and it takes effect only when parameter InstanceChargeType is PostPaid. |
spot_strategy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property spotStrategy: The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter InstanceChargeType is PostPaid. |
system_disk_category |
typing.Union[str, ros_cdk_core.IResolvable] |
Property systemDiskCategory: Category of system disk. |
system_disk_delete_with_instance |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property systemDiskDeleteWithInstance: Specifies whether to release the system disk when the instance is released. |
system_disk_description |
typing.Union[str, ros_cdk_core.IResolvable] |
Property systemDiskDescription: Description of created system disk. |
system_disk_disk_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property systemDiskDiskName: Name of created system disk. |
system_disk_performance_level |
typing.Union[str, ros_cdk_core.IResolvable] |
Property systemDiskPerformanceLevel: The performance level of the ESSD that is used as the system disk. |
system_disk_size |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property systemDiskSize: Disk size of the system disk, range from 20 to 500 GB. |
tags |
typing.List[TagsProperty] |
Property tags: Tags to attach to instance, security group, disk and network interface. |
template_resource_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property templateResourceGroupId: The ID of the resource group to which to assign the launch template. |
template_tags |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, TemplateTagsProperty]]] |
Property templateTags: Template tags to attach to launch template. |
user_data |
typing.Union[str, ros_cdk_core.IResolvable] |
Property userData: User data to pass to instance. |
version_description |
typing.Union[str, ros_cdk_core.IResolvable] |
Property versionDescription: Description for version 1 of launch template. |
v_switch_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property vSwitchId: The vSwitch Id to create ecs instance. |
zone_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property zoneId: Current zone to create the instance. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
launch_template_name
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property launchTemplateName: The name of launch template.
auto_release_time
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property autoReleaseTime: Auto release time for created instance, Follow ISO8601 standard using UTC time.
format is 'yyyy-MM-ddTHH:mm:ssZ'. Not bigger than 3 years from this day onwards
deployment_set_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property deploymentSetId: The ID of the deployment set.
description
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property description: Description of the instance, [2, 256] characters.
disk_mappings
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, DiskMappingsProperty]]]
Property diskMappings: Disk mappings to attach to instance.
Max support 16 disks.
host_name
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property hostName: Host name of created ecs instance.
at least 2 characters, and '.' '-' Is not the first and last characters as hostname, not continuous use. Windows platform can be up to 15 characters, allowing letters (without limiting case), numbers and '-', and does not support the number of points, not all is digital ('.').Other (Linux, etc.) platform up to 30 characters, allowing support number multiple points for the period between the points, each permit letters (without limiting case), numbers and '-' components.
image_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property imageId: Image ID to create ecs instance.
image_owner_alias
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property imageOwnerAlias: The source of the image.
Valid values: system: public images provided by Alibaba Cloud. self: your custom images. others: shared images from other Alibaba Cloud accounts. marketplace: Alibaba Cloud Marketplace images. If Alibaba Cloud Marketplace images are found, you can use these images without prior subscription. You must pay attention to the billing details of Alibaba Cloud Marketplace images.
instance_charge_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceChargeType: The billing method of the instance.
Valid values: PrePaid: subscription. If you set this parameter to PrePaid, make sure that your account supports payment by credit. Otherwise, an InvalidPayMethod error is returned. PostPaid: pay-as-you-go.
instance_name
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceName: Display name of the instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'.
instance_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceType: Ecs instance supported instance type, make sure it should be correct.
internet_charge_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property internetChargeType: Instance internet access charge type.Support 'PayByBandwidth' and 'PayByTraffic' only.
internet_max_bandwidth_out
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property internetMaxBandwidthOut: Max internet out bandwidth in Mbps(Mega bit per second).
Range is [0,200].While the property is not 0, public ip will be assigned for instance.
io_optimized
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property ioOptimized: The 'optimized' instance can provide better IO performance.
Support 'none' and 'optimized' only.
ipv6_address_count
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property ipv6AddressCount: The number of IPv6 addresses to be randomly generated for the primary ENI.
Valid values: 1 to 10.
key_pair_name
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property keyPairName: SSH key pair name.
network_interfaces
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, NetworkInterfacesProperty]]]
Property networkInterfaces: Elastic network interfaces to be attached to instance.
network_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property networkType: Instance network type.
Support 'vpc' and 'classic'
password_inherit
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property passwordInherit: Specifies whether to use the password preset in the image.
Note When you use this parameter, leave Password empty and make sure that the selected image has a password preset.
period
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property period: The subscription period of the instance.
Unit: months. This parameter is valid and required only when InstanceChargeType is set to PrePaid. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
private_ip_address
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property privateIpAddress: The private IP address of the instance.
To assign a private IP address to an instance of the VPC type, make sure that the IP address is an idle IP address within the CIDR block of the vSwitch specified by the VSwitchId parameter.
ram_role_name
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property ramRoleName: Instance RAM role name.
The name is provided and maintained by Resource Access Management (RAM) and can be queried using ListRoles. For more information, see RAM API CreateRole and ListRoles.
resource_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and elastic network interface (ENI).
security_enhancement_strategy
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property securityEnhancementStrategy: Activate or deactivate security enhancement,Value range: "Active" and "Deactive".
security_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property securityGroupId: Security group to create ecs instance.
For classic instance need the security group not belong to VPC, for VPC instance, please make sure the security group belong to specified VPC.
security_group_ids
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]
Property securityGroupIds: The ID of security group list to which to assign the instance.
spot_duration
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property spotDuration: The protection period of the preemptible instance.
Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Protection periods of 2, 3, 4, 5, and 6 hours are in invitational preview. If you want to set this parameter to one of these values, submit a ticket. If this parameter is set to 0, no protection period is configured for the preemptible instance. Default value: 1.
spot_price_limit
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property spotPriceLimit: The hourly price threshold of a instance, and it takes effect only when parameter InstanceChargeType is PostPaid.
Three decimals is allowed at most.
spot_strategy
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property spotStrategy: The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter InstanceChargeType is PostPaid.
Value range: "NoSpot: A regular Pay-As-You-Go instance", "SpotWithPriceLimit: A price threshold for a spot instance, ""SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance. "
system_disk_category
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property systemDiskCategory: Category of system disk.
support cloud|cloud_efficiency|cloud_ssd|cloud_essd|ephemeral_ssd
system_disk_delete_with_instance
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property systemDiskDeleteWithInstance: Specifies whether to release the system disk when the instance is released.
Valid values: true: releases the system disk when the instance is released. false: does not release the system disk when the instance is released. Default value: true.
system_disk_description
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property systemDiskDescription: Description of created system disk.
system_disk_disk_name
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property systemDiskDiskName: Name of created system disk.
system_disk_performance_level
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property systemDiskPerformanceLevel: The performance level of the ESSD that is used as the system disk.
Valid values: PL0: A single ESSD can deliver up to 10,000 random read/write IOPS. PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.
system_disk_size
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property systemDiskSize: Disk size of the system disk, range from 20 to 500 GB.
If you specify with your own image, make sure the system disk size bigger than image size.
tags
Optional
- Type: typing.List[TagsProperty]
Property tags: Tags to attach to instance, security group, disk and network interface.
template_resource_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property templateResourceGroupId: The ID of the resource group to which to assign the launch template.
template_tags
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, TemplateTagsProperty]]]
Property templateTags: Template tags to attach to launch template.
user_data
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property userData: User data to pass to instance.
[1, 16KB] characters.
version_description
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property versionDescription: Description for version 1 of launch template.
v_switch_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vSwitchId: The vSwitch Id to create ecs instance.
zone_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property zoneId: Current zone to create the instance.
enable_resource_property_constraint
Optional
- Type: bool
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_ecs
ros_cdk_ecs.LaunchTemplate.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_default_version_number |
ros_cdk_core.IResolvable |
Attribute DefaultVersionNumber: The default version number of launch template. |
attr_latest_version_number |
ros_cdk_core.IResolvable |
Attribute LatestVersionNumber: The latest version number of launch template. |
attr_launch_template_id |
ros_cdk_core.IResolvable |
Attribute LaunchTemplateId: The id of launch template. |
attr_launch_template_name |
ros_cdk_core.IResolvable |
Attribute LaunchTemplateName: The name of launch template. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_default_version_number
Required
attr_default_version_number: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute DefaultVersionNumber: The default version number of launch template.
attr_latest_version_number
Required
attr_latest_version_number: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute LatestVersionNumber: The latest version number of launch template.
attr_launch_template_id
Required
attr_launch_template_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute LaunchTemplateId: The id of launch template.
attr_launch_template_name
Required
attr_launch_template_name: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute LaunchTemplateName: The name of launch template.