Instance
- Implements: IInstance
This class encapsulates and extends the ROS resource type ALIYUN::ENS::Instance, which is used to create Edge Node Service (ENS) instances.
Initializers
import com.aliyun.ros.cdk.ens.Instance;
Instance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.dataDiskSize(java.lang.Number)
.dataDiskSize(IResolvable)
.ensRegionId(java.lang.String)
.ensRegionId(IResolvable)
.imageId(java.lang.String)
.imageId(IResolvable)
.instanceType(java.lang.String)
.instanceType(IResolvable)
.period(java.lang.Number)
.period(IResolvable)
.quantity(java.lang.Number)
.quantity(IResolvable)
.systemDiskSize(java.lang.Number)
.systemDiskSize(IResolvable)
// .autoRenew(java.lang.String)
// .autoRenew(IResolvable)
// .autoRenewPeriod(java.lang.Number)
// .autoRenewPeriod(IResolvable)
// .hostName(java.lang.String)
// .hostName(IResolvable)
// .instanceName(java.lang.String)
// .instanceName(IResolvable)
// .internetChargeType(java.lang.String)
// .internetChargeType(IResolvable)
// .ipType(java.lang.String)
// .ipType(IResolvable)
// .keyPairName(java.lang.String)
// .keyPairName(IResolvable)
// .password(java.lang.String)
// .password(IResolvable)
// .paymentType(java.lang.String)
// .paymentType(IResolvable)
// .privateIpAddress(java.lang.String)
// .privateIpAddress(IResolvable)
// .uniqueSuffix(java.lang.Boolean)
// .uniqueSuffix(IResolvable)
// .userData(java.lang.String)
// .userData(IResolvable)
// .vSwitchId(java.lang.String)
// .vSwitchId(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. |
dataDiskSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property dataDiskSize: Disk size of the system disk, range from 20 to 500 GB. |
ensRegionId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property ensRegionId: ENS Region Id. |
imageId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property imageId: Image ID to create ens instance. |
instanceType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceType: ENS instance supported instance type, make sure it should be correct. |
period | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property period: Prepaid time period. |
quantity | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property quantity: number of instances to create. |
systemDiskSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property systemDiskSize: Disk size of the system disk. |
autoRenew | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property autoRenew: Whether renew the fee automatically?it could be True,FalseDefault value is False. |
autoRenewPeriod | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property autoRenewPeriod: The time period of auto renew. |
hostName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property hostName: The hostname of the instance. |
instanceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceName: Instance name. |
internetChargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property internetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth. |
ipType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property ipType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4. |
keyPairName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property keyPairName: SSH key pair name. |
password | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property password: Password of created ens instance. |
paymentType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property paymentType: Payment Type.only support value Subscription. |
privateIpAddress | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property privateIpAddress: Private IP for the instance created. |
uniqueSuffix | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property uniqueSuffix: Specifies whether to automatically append sequential suffixes to the hostnames specified by the HostName parameter and instance names specified by the InstanceName parameter when you create multiple instances at a time. |
userData | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property userData: User data to pass to instance. |
vSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vSwitchId: The vSwitch Id to create ens instance. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
dataDiskSizeRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property dataDiskSize: 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.
ensRegionIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ensRegionId: ENS Region Id.
imageIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property imageId: Image ID to create ens instance.
instanceTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceType: ENS instance supported instance type, make sure it should be correct.
periodRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property period: Prepaid time period.
Unit is month, it could be from 1 to 9 or 12. Default value is 1.
quantityRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property quantity: number of instances to create.
systemDiskSizeRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property systemDiskSize: Disk size of the system disk.
autoRenewOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenew: Whether renew the fee automatically?it could be True,FalseDefault value is False.
autoRenewPeriodOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenewPeriod: The time period of auto renew.
it will take effect.It could be 1, 2, 3, 6, 12. Default value is 1.
hostNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property hostName: The hostname of the instance.
instanceNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceName: Instance name.
internetChargeTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property internetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth.
ipTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ipType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.
keyPairNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property keyPairName: SSH key pair name.
passwordOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property password: Password of created ens instance.
Must contain at least 3 types of special character, lower character, upper character, number.
paymentTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property paymentType: Payment Type.only support value Subscription.
privateIpAddressOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property privateIpAddress: Private IP for the instance created.
uniqueSuffixOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property uniqueSuffix: Specifies whether to automatically append sequential suffixes to the hostnames specified by the HostName parameter and instance names specified by the InstanceName parameter when you create multiple instances at a time.
The sequential suffix ranges from 001 to 999. Valid values: true false Default value: false.
userDataOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property userData: User data to pass to instance.
[1, 16KB] characters.User data should not be base64 encoded. If you want to pass base64 encoded string to the property, use function Fn::Base64Decode to decode the base64 string first.
vSwitchIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vSwitchId: The vSwitch Id to create ens instance.
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.ens.Instance;
Instance.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. |
attrAutoRenew | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AutoRenew: Whether renew the fee automatically?it could be True,FalseDefault value is False. |
attrAutoRenewPeriod | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AutoRenewPeriod: The time period of auto renew. |
attrDataDiskSize | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DataDiskSize: Disk size of the system disk, range from 20 to 500 GB. |
attrEnsRegionId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute EnsRegionId: ENS Region Id. |
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: Image ID to create ens instance. |
attrInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceId: InstanceId. |
attrInstanceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceName: Instance name. |
attrInstanceType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceType: ENS instance supported instance type, make sure it should be correct. |
attrInternetChargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InternetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth. |
attrIpType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute IpType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4. |
attrKeyPairName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute KeyPairName: SSH key pair name. |
attrPaymentType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PaymentType: Payment Type.only support value Subscription. |
attrPeriod | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Period: Prepaid time period. |
attrPrivateIpAddress | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PrivateIpAddress: Private IP for the instance created. |
attrPrivateIps | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PrivateIps: Private IP. |
attrPublicIps | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PublicIps: Public IP. |
attrQuantity | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Quantity: number of instances to create. |
attrSystemDiskSize | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SystemDiskSize: Disk size of the system disk. |
attrUniqueSuffix | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute UniqueSuffix: Specifies whether to automatically append sequential suffixes to the hostnames specified by the HostName parameter and instance names specified by the InstanceName parameter when you create multiple instances at a time. |
attrUserData | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute UserData: User data to pass to instance. |
attrVSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VSwitchId: The vSwitch Id to create ens instance. |
props | InstanceProps | 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
attrAutoRenewRequired
public java.lang.Object getAttrAutoRenew();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute AutoRenew: Whether renew the fee automatically?it could be True,FalseDefault value is False.
attrAutoRenewPeriodRequired
public java.lang.Object getAttrAutoRenewPeriod();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute AutoRenewPeriod: The time period of auto renew.
it will take effect.It could be 1, 2, 3, 6, 12. Default value is 1.
attrDataDiskSizeRequired
public java.lang.Object getAttrDataDiskSize();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DataDiskSize: 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.
attrEnsRegionIdRequired
public java.lang.Object getAttrEnsRegionId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute EnsRegionId: ENS Region Id.
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: Image ID to create ens instance.
attrInstanceIdRequired
public java.lang.Object getAttrInstanceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceId: InstanceId.
attrInstanceNameRequired
public java.lang.Object getAttrInstanceName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceName: Instance name.
attrInstanceTypeRequired
public java.lang.Object getAttrInstanceType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceType: ENS instance supported instance type, make sure it should be correct.
attrInternetChargeTypeRequired
public java.lang.Object getAttrInternetChargeType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InternetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth.
attrIpTypeRequired
public java.lang.Object getAttrIpType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute IpType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.
attrKeyPairNameRequired
public java.lang.Object getAttrKeyPairName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute KeyPairName: SSH key pair name.
attrPaymentTypeRequired
public java.lang.Object getAttrPaymentType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PaymentType: Payment Type.only support value Subscription.
attrPeriodRequired
public java.lang.Object getAttrPeriod();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Period: Prepaid time period.
Unit is month, it could be from 1 to 9 or 12. Default value is 1.
attrPrivateIpAddressRequired
public java.lang.Object getAttrPrivateIpAddress();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PrivateIpAddress: Private IP for the instance created.
attrPrivateIpsRequired
public java.lang.Object getAttrPrivateIps();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PrivateIps: Private IP.
attrPublicIpsRequired
public java.lang.Object getAttrPublicIps();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PublicIps: Public IP.
attrQuantityRequired
public java.lang.Object getAttrQuantity();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Quantity: number of instances to create.
attrSystemDiskSizeRequired
public java.lang.Object getAttrSystemDiskSize();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SystemDiskSize: Disk size of the system disk.
attrUniqueSuffixRequired
public java.lang.Object getAttrUniqueSuffix();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute UniqueSuffix: Specifies whether to automatically append sequential suffixes to the hostnames specified by the HostName parameter and instance names specified by the InstanceName parameter when you create multiple instances at a time.
The sequential suffix ranges from 001 to 999. Valid values: true false Default value: false.
attrUserDataRequired
public java.lang.Object getAttrUserData();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute UserData: User data to pass to instance.
[1, 16KB] characters.User data should not be base64 encoded. If you want to pass base64 encoded string to the property, use function Fn::Base64Decode to decode the base64 string first.
attrVSwitchIdRequired
public java.lang.Object getAttrVSwitchId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VSwitchId: The vSwitch Id to create ens instance.
propsRequired
public InstanceProps getProps();
- Type: InstanceProps