Skip to content

LaunchTemplate

  • Implements: ros_cdk_ecs.datasource.ILaunchTemplate

This class encapsulates and extends the ROS resource type DATASOURCE::ECS::LaunchTemplate, which is used to query the information about a launch template.

Initializers

from ros_cdk_ecs import datasource
datasource.LaunchTemplate(
  scope: Construct,
  id: str,
  launch_template_id: typing.Union[str, IResolvable],
  refresh_options: 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_id typing.Union[str, ros_cdk_core.IResolvable] Property launchTemplateId: Template ID.
refresh_options typing.Union[str, ros_cdk_core.IResolvable] Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

launch_template_idRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property launchTemplateId: Template ID.


refresh_optionsOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.

Valid values:

  • Never: Never refresh the datasource resource when the stack is updated.
  • Always: Always refresh the datasource resource when the stack is updated. Default is Never.

enable_resource_property_constraintOptional

  • 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.
fetch_condition No description.
fetch_dependency No description.
fetch_resource_desc 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.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

fetch_condition

def fetch_condition() -> RosCondition

fetch_dependency

def fetch_dependency() -> typing.List[str]

fetch_resource_desc

def fetch_resource_desc() -> str

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

Name Description
is_construct Return whether the given object is a Construct.

is_construct

from ros_cdk_ecs import datasource
datasource.LaunchTemplate.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
env ros_cdk_core.IResourceEnvironment The environment this resource belongs to.
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_auto_release_time typing.Union[str, ros_cdk_core.IResolvable] Attribute AutoReleaseTime: Automatic release time (UTC).
attr_created_by typing.Union[str, ros_cdk_core.IResolvable] Attribute CreatedBy: The creator of the launch template.
attr_create_time typing.Union[str, ros_cdk_core.IResolvable] Attribute CreateTime: The time when the instance launch template was created.
attr_data_disk typing.Union[str, ros_cdk_core.IResolvable] Attribute DataDisk: Data disk information list.
attr_default_version_number typing.Union[str, ros_cdk_core.IResolvable] Attribute DefaultVersionNumber: The default version number of the template.
attr_deletion_protection typing.Union[str, ros_cdk_core.IResolvable] Attribute DeletionProtection: Instance deletion protection attribute.
attr_deployment_set_id typing.Union[str, ros_cdk_core.IResolvable] Attribute DeploymentSetId: The ID of the deployment set.
attr_description typing.Union[str, ros_cdk_core.IResolvable] Attribute Description: Instance description.
attr_host_name typing.Union[str, ros_cdk_core.IResolvable] Attribute HostName: The hostname of the instance.
attr_image_id typing.Union[str, ros_cdk_core.IResolvable] Attribute ImageId: The ID of the image.
attr_image_owner_alias typing.Union[str, ros_cdk_core.IResolvable] Attribute ImageOwnerAlias: The source of the image.
attr_instance_charge_type typing.Union[str, ros_cdk_core.IResolvable] Attribute InstanceChargeType: The billing method of the instance.
attr_instance_name typing.Union[str, ros_cdk_core.IResolvable] Attribute InstanceName: The name of the instance.
attr_instance_type typing.Union[str, ros_cdk_core.IResolvable] Attribute InstanceType: The instance type.
attr_internet_charge_type typing.Union[str, ros_cdk_core.IResolvable] Attribute InternetChargeType: Network billing method.
attr_internet_max_bandwidth_in typing.Union[str, ros_cdk_core.IResolvable] Attribute InternetMaxBandwidthIn: The maximum public inbound bandwidth, in Mbit/s.
attr_internet_max_bandwidth_out typing.Union[str, ros_cdk_core.IResolvable] Attribute InternetMaxBandwidthOut: The maximum outbound bandwidth of the public network.
attr_io_optimized typing.Union[str, ros_cdk_core.IResolvable] Attribute IoOptimized: Whether to optimize the instance for I/O.
attr_ipv6_address_count typing.Union[str, ros_cdk_core.IResolvable] Attribute Ipv6AddressCount: Specify the number of randomly generated IPv6 addresses for the primary network card.
attr_key_pair_name typing.Union[str, ros_cdk_core.IResolvable] Attribute KeyPairName: The name of the key pair.
attr_latest_version_number typing.Union[str, ros_cdk_core.IResolvable] Attribute LatestVersionNumber: The latest version number of the template.
attr_launch_template_id typing.Union[str, ros_cdk_core.IResolvable] Attribute LaunchTemplateId: The ID of the launch template.
attr_launch_template_name typing.Union[str, ros_cdk_core.IResolvable] Attribute LaunchTemplateName: The name of the launch template.
attr_modified_time typing.Union[str, ros_cdk_core.IResolvable] Attribute ModifiedTime: The time when the launch template was modified.
attr_network_interface typing.Union[str, ros_cdk_core.IResolvable] Attribute NetworkInterface: The elastic network interfaces (ENIs).
attr_network_type typing.Union[str, ros_cdk_core.IResolvable] Attribute NetworkType: The network type of the instance.
attr_password_inherit typing.Union[str, ros_cdk_core.IResolvable] Attribute PasswordInherit: Whether to use the password preset by the image.
attr_period typing.Union[str, ros_cdk_core.IResolvable] Attribute Period: The duration of the purchase of resources, in months.
attr_private_ip_address typing.Union[str, ros_cdk_core.IResolvable] Attribute PrivateIpAddress: The private IP address of the instance.
attr_ram_role_name typing.Union[str, ros_cdk_core.IResolvable] Attribute RamRoleName: The instance RAM role name.
attr_resource_group_id typing.Union[str, ros_cdk_core.IResolvable] Attribute ResourceGroupId: The ID of the resource group to which the instance, Elastic Block Storage (EBS) device, and ENI belong.
attr_security_enhancement_strategy typing.Union[str, ros_cdk_core.IResolvable] Attribute SecurityEnhancementStrategy: Whether to turn on security reinforcement for the operating system.
attr_security_group_ids typing.Union[str, ros_cdk_core.IResolvable] Attribute SecurityGroupIds: The IDs of one or more security groups to which you want to add the instance.
attr_spot_price_limit typing.Union[str, ros_cdk_core.IResolvable] Attribute SpotPriceLimit: Set the maximum price per hour for the instance.
attr_spot_strategy typing.Union[str, ros_cdk_core.IResolvable] Attribute SpotStrategy: The preemption policy for a pay-as-you-go instance.
attr_system_disk typing.Union[str, ros_cdk_core.IResolvable] Attribute SystemDisk: System disk configuration.
attr_tags typing.Union[str, ros_cdk_core.IResolvable] Attribute Tags: The tags of the launch template.
attr_template_resource_group_id typing.Union[str, ros_cdk_core.IResolvable] Attribute TemplateResourceGroupId: Q.
attr_template_tag typing.Union[str, ros_cdk_core.IResolvable] Attribute TemplateTag: The tags of the launch template.
attr_user_data typing.Union[str, ros_cdk_core.IResolvable] Attribute UserData: The user-defined data of the instance must be encoded in Base64.
attr_version_description typing.Union[str, ros_cdk_core.IResolvable] Attribute VersionDescription: Instance launch template version description.
attr_vpc_id typing.Union[str, ros_cdk_core.IResolvable] Attribute VpcId: VPC Id.
attr_v_switch_id typing.Union[str, ros_cdk_core.IResolvable] Attribute VSwitchId: The ID of the vSwitch.
attr_zone_id typing.Union[str, ros_cdk_core.IResolvable] Attribute ZoneId: The ID of the zone to which the instance belongs.
props LaunchTemplateProps No description.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


envRequired

env: IResourceEnvironment
  • Type: ros_cdk_core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_auto_release_timeRequired

attr_auto_release_time: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute AutoReleaseTime: Automatic release time (UTC).

The format is: yyyy-MM-ddTHH:mm:ssZ.


attr_created_byRequired

attr_created_by: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute CreatedBy: The creator of the launch template.


attr_create_timeRequired

attr_create_time: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute CreateTime: The time when the instance launch template was created.


attr_data_diskRequired

attr_data_disk: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute DataDisk: Data disk information list.


attr_default_version_numberRequired

attr_default_version_number: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute DefaultVersionNumber: The default version number of the template.


attr_deletion_protectionRequired

attr_deletion_protection: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute DeletionProtection: Instance deletion protection attribute.


attr_deployment_set_idRequired

attr_deployment_set_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute DeploymentSetId: The ID of the deployment set.


attr_descriptionRequired

attr_description: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute Description: Instance description.

2 to 256 English or Chinese characters in length and cannot start with' http:// 'or' https.


attr_host_nameRequired

attr_host_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute HostName: The hostname of the instance.


attr_image_idRequired

attr_image_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ImageId: The ID of the image.


attr_image_owner_aliasRequired

attr_image_owner_alias: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ImageOwnerAlias: The source of the image.


attr_instance_charge_typeRequired

attr_instance_charge_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute InstanceChargeType: The billing method of the instance.


attr_instance_nameRequired

attr_instance_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute InstanceName: The name of the instance.

The length is 2~128 English or Chinese characters. It must start with a large or small letter or Chinese, and cannot start with' http:// 'or' https. It can contain numbers, colons (:), underscores (_), or dashes (-).


attr_instance_typeRequired

attr_instance_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute InstanceType: The instance type.


attr_internet_charge_typeRequired

attr_internet_charge_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute InternetChargeType: Network billing method.


attr_internet_max_bandwidth_inRequired

attr_internet_max_bandwidth_in: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute InternetMaxBandwidthIn: The maximum public inbound bandwidth, in Mbit/s.


attr_internet_max_bandwidth_outRequired

attr_internet_max_bandwidth_out: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute InternetMaxBandwidthOut: The maximum outbound bandwidth of the public network.

The unit is Mbit/s. The value range is 0~100.


attr_io_optimizedRequired

attr_io_optimized: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute IoOptimized: Whether to optimize the instance for I/O.


attr_ipv6_address_countRequired

attr_ipv6_address_count: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute Ipv6AddressCount: Specify the number of randomly generated IPv6 addresses for the primary network card.

The value range is 1 to 10.


attr_key_pair_nameRequired

attr_key_pair_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute KeyPairName: The name of the key pair.


attr_latest_version_numberRequired

attr_latest_version_number: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute LatestVersionNumber: The latest version number of the template.


attr_launch_template_idRequired

attr_launch_template_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute LaunchTemplateId: The ID of the launch template.


attr_launch_template_nameRequired

attr_launch_template_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute LaunchTemplateName: The name of the launch template.


attr_modified_timeRequired

attr_modified_time: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ModifiedTime: The time when the launch template was modified.


attr_network_interfaceRequired

attr_network_interface: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute NetworkInterface: The elastic network interfaces (ENIs).


attr_network_typeRequired

attr_network_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute NetworkType: The network type of the instance.


attr_password_inheritRequired

attr_password_inherit: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute PasswordInherit: Whether to use the password preset by the image.


attr_periodRequired

attr_period: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute Period: The duration of the purchase of resources, in months.

When creating an instance, the parameter 'InstanceChargeType' takes effect and is required only when the value of the parameter 'PrePaid' is 'PrePaid. Value range: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60.


attr_private_ip_addressRequired

attr_private_ip_address: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute PrivateIpAddress: The private IP address of the instance.


attr_ram_role_nameRequired

attr_ram_role_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute RamRoleName: The instance RAM role name.


attr_resource_group_idRequired

attr_resource_group_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ResourceGroupId: The ID of the resource group to which the instance, Elastic Block Storage (EBS) device, and ENI belong.


attr_security_enhancement_strategyRequired

attr_security_enhancement_strategy: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute SecurityEnhancementStrategy: Whether to turn on security reinforcement for the operating system.


attr_security_group_idsRequired

attr_security_group_ids: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute SecurityGroupIds: The IDs of one or more security groups to which you want to add the instance.


attr_spot_price_limitRequired

attr_spot_price_limit: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute SpotPriceLimit: Set the maximum price per hour for the instance.

The maximum number of 3 decimal places is supported. The value of the parameter 'SpotStrategy' is 'SpotWithPriceLimit.


attr_spot_strategyRequired

attr_spot_strategy: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute SpotStrategy: The preemption policy for a pay-as-you-go instance.

This parameter takes effect when the value of the parameter 'InstanceChargeType' is 'PostPaid.


attr_system_diskRequired

attr_system_disk: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute SystemDisk: System disk configuration.


attr_tagsRequired

attr_tags: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute Tags: The tags of the launch template.


attr_template_resource_group_idRequired

attr_template_resource_group_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute TemplateResourceGroupId: Q.


attr_template_tagRequired

attr_template_tag: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute TemplateTag: The tags of the launch template.


attr_user_dataRequired

attr_user_data: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute UserData: The user-defined data of the instance must be encoded in Base64.

The maximum original data is 16KB.


attr_version_descriptionRequired

attr_version_description: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute VersionDescription: Instance launch template version description.

2 to 256 English or Chinese characters in length and cannot start with' http:// 'or' https.


attr_vpc_idRequired

attr_vpc_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute VpcId: VPC Id.


attr_v_switch_idRequired

attr_v_switch_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute VSwitchId: The ID of the vSwitch.


attr_zone_idRequired

attr_zone_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ZoneId: The ID of the zone to which the instance belongs.


propsRequired

props: LaunchTemplateProps