LaunchTemplate
- Implements: com.aliyun.ros.cdk.ecs.datasource.ILaunchTemplate
This class encapsulates and extends the ROS resource type DATASOURCE::ECS::LaunchTemplate.
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. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | 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.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- 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.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
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 | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AutoReleaseTime: Automatic release time (UTC). |
attrCreatedBy | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CreatedBy: The creator of the launch template. |
attrCreateTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CreateTime: The time when the instance launch template was created. |
attrDataDisk | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DataDisk: Data disk information list. |
attrDefaultVersionNumber | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DefaultVersionNumber: The default version number of the template. |
attrDeletionProtection | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DeletionProtection: Instance deletion protection attribute. |
attrDeploymentSetId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DeploymentSetId: The ID of the deployment set. |
attrDescription | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Description: Instance description. |
attrHostName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute HostName: The hostname of the instance. |
attrImageId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ImageId: The ID of the image. |
attrImageOwnerAlias | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ImageOwnerAlias: The source of the image. |
attrInstanceChargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceChargeType: The billing method of the instance. |
attrInstanceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceName: The name of the instance. |
attrInstanceType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceType: The instance type. |
attrInternetChargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InternetChargeType: Network billing method. |
attrInternetMaxBandwidthIn | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InternetMaxBandwidthIn: The maximum public inbound bandwidth, in Mbit/s. |
attrInternetMaxBandwidthOut | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InternetMaxBandwidthOut: The maximum outbound bandwidth of the public network. |
attrIoOptimized | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute IoOptimized: Whether to optimize the instance for I/O. |
attrIpv6AddressCount | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Ipv6AddressCount: Specify the number of randomly generated IPv6 addresses for the primary network card. |
attrKeyPairName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute KeyPairName: The name of the key pair. |
attrLatestVersionNumber | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute LatestVersionNumber: The latest version number of the template. |
attrLaunchTemplateId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute LaunchTemplateId: The ID of the launch template. |
attrLaunchTemplateName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute LaunchTemplateName: The name of the launch template. |
attrModifiedTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ModifiedTime: The time when the launch template was modified. |
attrNetworkInterface | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute NetworkInterface: The elastic network interfaces (ENIs). |
attrNetworkType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute NetworkType: The network type of the instance. |
attrPasswordInherit | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PasswordInherit: Whether to use the password preset by the image. |
attrPeriod | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Period: The duration of the purchase of resources, in months. |
attrPrivateIpAddress | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PrivateIpAddress: The private IP address of the instance. |
attrRamRoleName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute RamRoleName: The instance RAM role name. |
attrResourceGroupId | java.lang.String OR 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 | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SecurityEnhancementStrategy: Whether to turn on security reinforcement for the operating system. |
attrSecurityGroupIds | java.lang.String OR 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 | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SpotPriceLimit: Set the maximum price per hour for the instance. |
attrSpotStrategy | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SpotStrategy: The preemption policy for a pay-as-you-go instance. |
attrSystemDisk | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SystemDisk: System disk configuration. |
attrTags | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Tags: The tags of the launch template. |
attrTemplateResourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute TemplateResourceGroupId: Q. |
attrTemplateTag | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute TemplateTag: The tags of the launch template. |
attrUserData | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute UserData: The user-defined data of the instance must be encoded in Base64. |
attrVersionDescription | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VersionDescription: Instance launch template version description. |
attrVpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VpcId: VPC Id. |
attrVSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VSwitchId: The ID of the vSwitch. |
attrZoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ZoneId: The ID of the zone to which the instance belongs. |
props | LaunchTemplateProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.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
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 java.lang.Object getAttrAutoReleaseTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute AutoReleaseTime: Automatic release time (UTC).
The format is: yyyy-MM-ddTHH:mm:ssZ.
attrCreatedByRequired
public java.lang.Object getAttrCreatedBy();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CreatedBy: The creator of the launch template.
attrCreateTimeRequired
public java.lang.Object getAttrCreateTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CreateTime: The time when the instance launch template was created.
attrDataDiskRequired
public java.lang.Object getAttrDataDisk();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DataDisk: Data disk information list.
attrDefaultVersionNumberRequired
public java.lang.Object getAttrDefaultVersionNumber();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DefaultVersionNumber: The default version number of the template.
attrDeletionProtectionRequired
public java.lang.Object getAttrDeletionProtection();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DeletionProtection: Instance deletion protection attribute.
attrDeploymentSetIdRequired
public java.lang.Object getAttrDeploymentSetId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DeploymentSetId: The ID of the deployment set.
attrDescriptionRequired
public java.lang.Object getAttrDescription();
- Type: java.lang.String OR 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 java.lang.Object getAttrHostName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute HostName: The hostname of the instance.
attrImageIdRequired
public java.lang.Object getAttrImageId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ImageId: The ID of the image.
attrImageOwnerAliasRequired
public java.lang.Object getAttrImageOwnerAlias();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ImageOwnerAlias: The source of the image.
attrInstanceChargeTypeRequired
public java.lang.Object getAttrInstanceChargeType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceChargeType: The billing method of the instance.
attrInstanceNameRequired
public java.lang.Object getAttrInstanceName();
- Type: java.lang.String OR 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 java.lang.Object getAttrInstanceType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceType: The instance type.
attrInternetChargeTypeRequired
public java.lang.Object getAttrInternetChargeType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InternetChargeType: Network billing method.
attrInternetMaxBandwidthInRequired
public java.lang.Object getAttrInternetMaxBandwidthIn();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InternetMaxBandwidthIn: The maximum public inbound bandwidth, in Mbit/s.
attrInternetMaxBandwidthOutRequired
public java.lang.Object getAttrInternetMaxBandwidthOut();
- Type: java.lang.String OR 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 java.lang.Object getAttrIoOptimized();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute IoOptimized: Whether to optimize the instance for I/O.
attrIpv6AddressCountRequired
public java.lang.Object getAttrIpv6AddressCount();
- Type: java.lang.String OR 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 java.lang.Object getAttrKeyPairName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute KeyPairName: The name of the key pair.
attrLatestVersionNumberRequired
public java.lang.Object getAttrLatestVersionNumber();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute LatestVersionNumber: The latest version number of the template.
attrLaunchTemplateIdRequired
public java.lang.Object getAttrLaunchTemplateId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute LaunchTemplateId: The ID of the launch template.
attrLaunchTemplateNameRequired
public java.lang.Object getAttrLaunchTemplateName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute LaunchTemplateName: The name of the launch template.
attrModifiedTimeRequired
public java.lang.Object getAttrModifiedTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ModifiedTime: The time when the launch template was modified.
attrNetworkInterfaceRequired
public java.lang.Object getAttrNetworkInterface();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute NetworkInterface: The elastic network interfaces (ENIs).
attrNetworkTypeRequired
public java.lang.Object getAttrNetworkType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute NetworkType: The network type of the instance.
attrPasswordInheritRequired
public java.lang.Object getAttrPasswordInherit();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PasswordInherit: Whether to use the password preset by the image.
attrPeriodRequired
public java.lang.Object getAttrPeriod();
- Type: java.lang.String OR 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 java.lang.Object getAttrPrivateIpAddress();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PrivateIpAddress: The private IP address of the instance.
attrRamRoleNameRequired
public java.lang.Object getAttrRamRoleName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute RamRoleName: The instance RAM role name.
attrResourceGroupIdRequired
public java.lang.Object getAttrResourceGroupId();
- Type: java.lang.String OR 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 java.lang.Object getAttrSecurityEnhancementStrategy();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SecurityEnhancementStrategy: Whether to turn on security reinforcement for the operating system.
attrSecurityGroupIdsRequired
public java.lang.Object getAttrSecurityGroupIds();
- Type: java.lang.String OR 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 java.lang.Object getAttrSpotPriceLimit();
- Type: java.lang.String OR 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 java.lang.Object getAttrSpotStrategy();
- Type: java.lang.String OR 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 java.lang.Object getAttrSystemDisk();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SystemDisk: System disk configuration.
attrTagsRequired
public java.lang.Object getAttrTags();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Tags: The tags of the launch template.
attrTemplateResourceGroupIdRequired
public java.lang.Object getAttrTemplateResourceGroupId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute TemplateResourceGroupId: Q.
attrTemplateTagRequired
public java.lang.Object getAttrTemplateTag();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute TemplateTag: The tags of the launch template.
attrUserDataRequired
public java.lang.Object getAttrUserData();
- Type: java.lang.String OR 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 java.lang.Object getAttrVersionDescription();
- Type: java.lang.String OR 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 java.lang.Object getAttrVpcId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VpcId: VPC Id.
attrVSwitchIdRequired
public java.lang.Object getAttrVSwitchId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VSwitchId: The ID of the vSwitch.
attrZoneIdRequired
public java.lang.Object getAttrZoneId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ZoneId: The ID of the zone to which the instance belongs.
propsRequired
public LaunchTemplateProps getProps();
- Type: LaunchTemplateProps