Skip to content

LaunchTemplate

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

Initializers

import com.aliyun.ros.cdk.ecs.datasource.LaunchTemplate;
LaunchTemplate.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .launchTemplateId(java.lang.String)
    .launchTemplateId(IResolvable)
//  .refreshOptions(java.lang.String)
//  .refreshOptions(IResolvable)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
launchTemplateId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property launchTemplateId: Template ID.
refreshOptions java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

launchTemplateIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property launchTemplateId: Template ID.


refreshOptionsOptional

  • Type: java.lang.String OR com.aliyun.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.

Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

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: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

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

isConstruct

import com.aliyun.ros.cdk.ecs.datasource.LaunchTemplate;
LaunchTemplate.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrAutoReleaseTime com.aliyun.ros.cdk.core.IResolvable Attribute AutoReleaseTime: Automatic release time (UTC).
attrCreatedBy com.aliyun.ros.cdk.core.IResolvable Attribute CreatedBy: The creator of the launch template.
attrCreateTime com.aliyun.ros.cdk.core.IResolvable Attribute CreateTime: The time when the instance launch template was created.
attrDataDisk com.aliyun.ros.cdk.core.IResolvable Attribute DataDisk: Data disk information list.
attrDefaultVersionNumber com.aliyun.ros.cdk.core.IResolvable Attribute DefaultVersionNumber: The default version number of the template.
attrDeletionProtection com.aliyun.ros.cdk.core.IResolvable Attribute DeletionProtection: Instance deletion protection attribute.
attrDeploymentSetId com.aliyun.ros.cdk.core.IResolvable Attribute DeploymentSetId: The ID of the deployment set.
attrDescription com.aliyun.ros.cdk.core.IResolvable Attribute Description: Instance description.
attrHostName com.aliyun.ros.cdk.core.IResolvable Attribute HostName: The hostname of the instance.
attrImageId com.aliyun.ros.cdk.core.IResolvable Attribute ImageId: The ID of the image.
attrImageOwnerAlias com.aliyun.ros.cdk.core.IResolvable Attribute ImageOwnerAlias: The source of the image.
attrInstanceChargeType com.aliyun.ros.cdk.core.IResolvable Attribute InstanceChargeType: The billing method of the instance.
attrInstanceName com.aliyun.ros.cdk.core.IResolvable Attribute InstanceName: The name of the instance.
attrInstanceType com.aliyun.ros.cdk.core.IResolvable Attribute InstanceType: The instance type.
attrInternetChargeType com.aliyun.ros.cdk.core.IResolvable Attribute InternetChargeType: Network billing method.
attrInternetMaxBandwidthIn com.aliyun.ros.cdk.core.IResolvable Attribute InternetMaxBandwidthIn: The maximum public inbound bandwidth, in Mbit/s.
attrInternetMaxBandwidthOut com.aliyun.ros.cdk.core.IResolvable Attribute InternetMaxBandwidthOut: The maximum outbound bandwidth of the public network.
attrIoOptimized com.aliyun.ros.cdk.core.IResolvable Attribute IoOptimized: Whether to optimize the instance for I/O.
attrIpv6AddressCount com.aliyun.ros.cdk.core.IResolvable Attribute Ipv6AddressCount: Specify the number of randomly generated IPv6 addresses for the primary network card.
attrKeyPairName com.aliyun.ros.cdk.core.IResolvable Attribute KeyPairName: The name of the key pair.
attrLatestVersionNumber com.aliyun.ros.cdk.core.IResolvable Attribute LatestVersionNumber: The latest version number of the template.
attrLaunchTemplateId com.aliyun.ros.cdk.core.IResolvable Attribute LaunchTemplateId: The ID of the launch template.
attrLaunchTemplateName com.aliyun.ros.cdk.core.IResolvable Attribute LaunchTemplateName: The name of the launch template.
attrModifiedTime com.aliyun.ros.cdk.core.IResolvable Attribute ModifiedTime: The time when the launch template was modified.
attrNetworkInterface com.aliyun.ros.cdk.core.IResolvable Attribute NetworkInterface: The elastic network interfaces (ENIs).
attrNetworkType com.aliyun.ros.cdk.core.IResolvable Attribute NetworkType: The network type of the instance.
attrPasswordInherit com.aliyun.ros.cdk.core.IResolvable Attribute PasswordInherit: Whether to use the password preset by the image.
attrPeriod com.aliyun.ros.cdk.core.IResolvable Attribute Period: The duration of the purchase of resources, in months.
attrPrivateIpAddress com.aliyun.ros.cdk.core.IResolvable Attribute PrivateIpAddress: The private IP address of the instance.
attrRamRoleName com.aliyun.ros.cdk.core.IResolvable Attribute RamRoleName: The instance RAM role name.
attrResourceGroupId com.aliyun.ros.cdk.core.IResolvable Attribute ResourceGroupId: The ID of the resource group to which the instance, Elastic Block Storage (EBS) device, and ENI belong.
attrSecurityEnhancementStrategy com.aliyun.ros.cdk.core.IResolvable Attribute SecurityEnhancementStrategy: Whether to turn on security reinforcement for the operating system.
attrSecurityGroupIds com.aliyun.ros.cdk.core.IResolvable Attribute SecurityGroupIds: The IDs of one or more security groups to which you want to add the instance.
attrSpotPriceLimit com.aliyun.ros.cdk.core.IResolvable Attribute SpotPriceLimit: Set the maximum price per hour for the instance.
attrSpotStrategy com.aliyun.ros.cdk.core.IResolvable Attribute SpotStrategy: The preemption policy for a pay-as-you-go instance.
attrSystemDisk com.aliyun.ros.cdk.core.IResolvable Attribute SystemDisk: System disk configuration.
attrTags com.aliyun.ros.cdk.core.IResolvable Attribute Tags: The tags of the launch template.
attrTemplateResourceGroupId com.aliyun.ros.cdk.core.IResolvable Attribute TemplateResourceGroupId: Q.
attrTemplateTag com.aliyun.ros.cdk.core.IResolvable Attribute TemplateTag: The tags of the launch template.
attrUserData com.aliyun.ros.cdk.core.IResolvable Attribute UserData: The user-defined data of the instance must be encoded in Base64.
attrVersionDescription com.aliyun.ros.cdk.core.IResolvable Attribute VersionDescription: Instance launch template version description.
attrVpcId com.aliyun.ros.cdk.core.IResolvable Attribute VpcId: VPC Id.
attrVSwitchId com.aliyun.ros.cdk.core.IResolvable Attribute VSwitchId: The ID of the vSwitch.
attrZoneId com.aliyun.ros.cdk.core.IResolvable Attribute ZoneId: The ID of the zone to which the instance belongs.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrAutoReleaseTimeRequired

public IResolvable getAttrAutoReleaseTime();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute AutoReleaseTime: Automatic release time (UTC).

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


attrCreatedByRequired

public IResolvable getAttrCreatedBy();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute CreatedBy: The creator of the launch template.


attrCreateTimeRequired

public IResolvable getAttrCreateTime();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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


attrDataDiskRequired

public IResolvable getAttrDataDisk();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute DataDisk: Data disk information list.


attrDefaultVersionNumberRequired

public IResolvable getAttrDefaultVersionNumber();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute DefaultVersionNumber: The default version number of the template.


attrDeletionProtectionRequired

public IResolvable getAttrDeletionProtection();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute DeletionProtection: Instance deletion protection attribute.


attrDeploymentSetIdRequired

public IResolvable getAttrDeploymentSetId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute DeploymentSetId: The ID of the deployment set.


attrDescriptionRequired

public IResolvable getAttrDescription();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute Description: Instance description.

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


attrHostNameRequired

public IResolvable getAttrHostName();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute HostName: The hostname of the instance.


attrImageIdRequired

public IResolvable getAttrImageId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ImageId: The ID of the image.


attrImageOwnerAliasRequired

public IResolvable getAttrImageOwnerAlias();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ImageOwnerAlias: The source of the image.


attrInstanceChargeTypeRequired

public IResolvable getAttrInstanceChargeType();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute InstanceChargeType: The billing method of the instance.


attrInstanceNameRequired

public IResolvable getAttrInstanceName();
  • Type: com.aliyun.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 (-).


attrInstanceTypeRequired

public IResolvable getAttrInstanceType();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute InstanceType: The instance type.


attrInternetChargeTypeRequired

public IResolvable getAttrInternetChargeType();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute InternetChargeType: Network billing method.


attrInternetMaxBandwidthInRequired

public IResolvable getAttrInternetMaxBandwidthIn();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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


attrInternetMaxBandwidthOutRequired

public IResolvable getAttrInternetMaxBandwidthOut();
  • Type: com.aliyun.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.


attrIoOptimizedRequired

public IResolvable getAttrIoOptimized();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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


attrIpv6AddressCountRequired

public IResolvable getAttrIpv6AddressCount();
  • Type: com.aliyun.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.


attrKeyPairNameRequired

public IResolvable getAttrKeyPairName();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute KeyPairName: The name of the key pair.


attrLatestVersionNumberRequired

public IResolvable getAttrLatestVersionNumber();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute LatestVersionNumber: The latest version number of the template.


attrLaunchTemplateIdRequired

public IResolvable getAttrLaunchTemplateId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute LaunchTemplateId: The ID of the launch template.


attrLaunchTemplateNameRequired

public IResolvable getAttrLaunchTemplateName();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute LaunchTemplateName: The name of the launch template.


attrModifiedTimeRequired

public IResolvable getAttrModifiedTime();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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


attrNetworkInterfaceRequired

public IResolvable getAttrNetworkInterface();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute NetworkInterface: The elastic network interfaces (ENIs).


attrNetworkTypeRequired

public IResolvable getAttrNetworkType();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute NetworkType: The network type of the instance.


attrPasswordInheritRequired

public IResolvable getAttrPasswordInherit();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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


attrPeriodRequired

public IResolvable getAttrPeriod();
  • Type: com.aliyun.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.


attrPrivateIpAddressRequired

public IResolvable getAttrPrivateIpAddress();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute PrivateIpAddress: The private IP address of the instance.


attrRamRoleNameRequired

public IResolvable getAttrRamRoleName();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute RamRoleName: The instance RAM role name.


attrResourceGroupIdRequired

public IResolvable getAttrResourceGroupId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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


attrSecurityEnhancementStrategyRequired

public IResolvable getAttrSecurityEnhancementStrategy();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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


attrSecurityGroupIdsRequired

public IResolvable getAttrSecurityGroupIds();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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


attrSpotPriceLimitRequired

public IResolvable getAttrSpotPriceLimit();
  • Type: com.aliyun.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.


attrSpotStrategyRequired

public IResolvable getAttrSpotStrategy();
  • Type: com.aliyun.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.


attrSystemDiskRequired

public IResolvable getAttrSystemDisk();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute SystemDisk: System disk configuration.


attrTagsRequired

public IResolvable getAttrTags();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute Tags: The tags of the launch template.


attrTemplateResourceGroupIdRequired

public IResolvable getAttrTemplateResourceGroupId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute TemplateResourceGroupId: Q.


attrTemplateTagRequired

public IResolvable getAttrTemplateTag();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute TemplateTag: The tags of the launch template.


attrUserDataRequired

public IResolvable getAttrUserData();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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

The maximum original data is 16KB.


attrVersionDescriptionRequired

public IResolvable getAttrVersionDescription();
  • Type: com.aliyun.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.


attrVpcIdRequired

public IResolvable getAttrVpcId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute VpcId: VPC Id.


attrVSwitchIdRequired

public IResolvable getAttrVSwitchId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute VSwitchId: The ID of the vSwitch.


attrZoneIdRequired

public IResolvable getAttrZoneId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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