Skip to content

InstanceGroup

This class encapsulates and extends the ROS resource type ALIYUN::CloudPhone::InstanceGroup, which is used to create and start Elastic Cloud Phone (ECP) instances.

Initializers

import com.aliyun.ros.cdk.cloudphone.InstanceGroup;
InstanceGroup.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .imageId(java.lang.String)
    .imageId(IResolvable)
    .instanceType(java.lang.String)
    .instanceType(IResolvable)
    .securityGroupId(java.lang.String)
    .securityGroupId(IResolvable)
    .vSwitchId(java.lang.String)
    .vSwitchId(IResolvable)
//  .amount(java.lang.Number)
//  .amount(IResolvable)
//  .autoPay(java.lang.Boolean)
//  .autoPay(IResolvable)
//  .autoRenew(java.lang.Boolean)
//  .autoRenew(IResolvable)
//  .chargeType(java.lang.String)
//  .chargeType(IResolvable)
//  .description(java.lang.String)
//  .description(IResolvable)
//  .eipBandwidth(java.lang.Number)
//  .eipBandwidth(IResolvable)
//  .instanceName(java.lang.String)
//  .instanceName(IResolvable)
//  .keyPairName(java.lang.String)
//  .keyPairName(IResolvable)
//  .period(java.lang.Number)
//  .period(IResolvable)
//  .periodUnit(java.lang.String)
//  .periodUnit(IResolvable)
//  .resolution(java.lang.String)
//  .resolution(IResolvable)
//  .tag(IResolvable)
//  .tag(java.util.List<IResolvable)
//  .tag(RosTag>)
//  .vncPassword(java.lang.String)
//  .vncPassword(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.
imageId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property imageId: The image id.
instanceType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceType: instance type.
securityGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityGroupId: Security group to create ecs instance.
vSwitchId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vSwitchId: vswitch id.
amount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property amount: Specifies the number of ECS instances to create.Value range: 1~100 Default:1.
autoPay java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property autoPay: Whether to pay automatically, the default is true.
autoRenew java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property autoRenew: Whether renew the fee automatically.
chargeType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property chargeType: Instance internet access charge type.
description java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property description: Description of instance.
eipBandwidth java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property eipBandwidth: EIP bandwidth value, the value range is 1-200.
instanceName java.lang.String OR com.aliyun.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 ".", "-".
keyPairName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property keyPairName: Cloud phone instance key pair name.
period java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property period: Prepaid time period.
periodUnit java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property periodUnit: Unit of prepaid time period, it could be Month\/Year.
resolution java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resolution: You can use the DescribeInstanceTypes interface to query the list of resolutions supported by the current specification and select an appropriate resolution.
tag com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property tag: Tags to attach to instance.
vncPassword java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vncPassword: Cloud phone VNC password.

scopeRequired

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

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

imageIdRequired

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

Property imageId: The image id.


instanceTypeRequired

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

Property instanceType: instance type.


securityGroupIdRequired

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


vSwitchIdRequired

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

Property vSwitchId: vswitch id.


amountOptional

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

Property amount: Specifies the number of ECS instances to create.Value range: 1~100 Default:1.


autoPayOptional

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

Property autoPay: Whether to pay automatically, the default is true.


autoRenewOptional

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

Property autoRenew: Whether renew the fee automatically.

When the parameter InstanceChargeType is PrePaid, it will take effect. Range of value:True: automatic renewal. False: no automatic renewal. Default value is False.


chargeTypeOptional

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

Property chargeType: Instance internet access charge type.


descriptionOptional

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

Property description: Description of instance.

The length is 2~256 English or Chinese characters and cannot start with http:// and https://.


eipBandwidthOptional

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

Property eipBandwidth: EIP bandwidth value, the value range is 1-200.

Setting this parameter will automatically create an EIP instance corresponding to the bandwidth and bind the EIP instance to the cloud phone instance. When the instance is released, this EIP instance will be released and recycled together.


instanceNameOptional

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


keyPairNameOptional

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

Property keyPairName: Cloud phone instance key pair name.

The cloud phone key can be imported through the ImportKeyPair interface.


periodOptional

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

Property period: Prepaid time period.

While PeriodUnit is month, it could be 1, 2, 3, 6. While PeriodUnit is year, it could be from 1 to 5Default value is 1.


periodUnitOptional

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

Property periodUnit: Unit of prepaid time period, it could be Month\/Year.

Default value is Month.


resolutionOptional

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

Property resolution: You can use the DescribeInstanceTypes interface to query the list of resolutions supported by the current specification and select an appropriate resolution.


tagOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

Property tag: Tags to attach to instance.

Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.


vncPasswordOptional

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

Property vncPassword: Cloud phone VNC password.

The password must be six characters long, and must contain only uppercase, lowercase English letters and Arabic numerals.


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.cloudphone.InstanceGroup;
InstanceGroup.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.
attrInstanceIds com.aliyun.ros.cdk.core.IResolvable Attribute InstanceIds: instance ids.
attrOrderId com.aliyun.ros.cdk.core.IResolvable Attribute OrderId: oder id.
attrPrivateIps com.aliyun.ros.cdk.core.IResolvable Attribute PrivateIps: Private IP address list of created cloud phone instances.
attrTradePrice com.aliyun.ros.cdk.core.IResolvable Attribute TradePrice: price.

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

attrInstanceIdsRequired

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

Attribute InstanceIds: instance ids.


attrOrderIdRequired

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

Attribute OrderId: oder id.


attrPrivateIpsRequired

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

Attribute PrivateIps: Private IP address list of created cloud phone instances.

Only for VPC instance.


attrTradePriceRequired

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

Attribute TradePrice: price.