Skip to content

Instance

This class encapsulates and extends the ROS resource type ALIYUN::ApiGateway::Instance, which is used to create a dedicated instance.

Initializers

import com.aliyun.ros.cdk.apigateway.Instance;
Instance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .httpsPolicy(java.lang.String)
    .httpsPolicy(IResolvable)
    .instanceName(java.lang.String)
    .instanceName(IResolvable)
    .instanceSpec(java.lang.String)
    .instanceSpec(IResolvable)
    .zoneId(java.lang.String)
    .zoneId(IResolvable)
//  .autoPay(java.lang.Boolean)
//  .autoPay(IResolvable)
//  .chargeType(java.lang.String)
//  .chargeType(IResolvable)
//  .deletionForce(java.lang.Boolean)
//  .deletionForce(IResolvable)
//  .duration(java.lang.Number)
//  .duration(IResolvable)
//  .pricingCycle(java.lang.String)
//  .pricingCycle(IResolvable)
//  .tags(java.util.List<TagsProperty>)
    .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.
httpsPolicy java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property httpsPolicy: HTTPS security policy.
instanceName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceName: Instance name.
instanceSpec java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceSpec: Instance specification.
zoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property zoneId: Zone to which the instance belongs.
autoPay java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property autoPay: Indicates whether automatic payment is enabled.
chargeType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property chargeType: The billing method of the router interface.
deletionForce java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property deletionForce: Whether force delete the instance even if its status is START_FAILED.
duration java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property duration: Prepaid time period.
pricingCycle java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property pricingCycle: Unit of the payment cycle.
tags java.util.List<TagsProperty> Property tags: Tags to attach to instance.

scopeRequired

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

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

httpsPolicyRequired

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

Property httpsPolicy: HTTPS security policy.

Valid values: HTTPS2_TLS1_0, HTTPS2_TLS1_2, HTTPS1_1_TLS1_0


instanceNameRequired

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

Property instanceName: Instance name.


instanceSpecRequired

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

Property instanceSpec: Instance specification.

For example: api.s1.small


zoneIdRequired

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

Property zoneId: Zone to which the instance belongs.

For example: cn-beijing-MAZ2(f,g). Pleas call DescribeZones to get supported zone list.


autoPayOptional

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

Property autoPay: Indicates whether automatic payment is enabled.

Valid values: false: Automatic payment is disabled. You need to go to Orders to make the payment once an order is generated. true: Automatic payment is enabled. The payment is automatically made. Default true.


chargeTypeOptional

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

Property chargeType: The billing method of the router interface.

Valid values: PrePaid (Subscription), PostPaid (default, Pay-As-You-Go). Default value: PostPaid.


deletionForceOptional

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

Property deletionForce: Whether force delete the instance even if its status is START_FAILED.

Default value is false.


durationOptional

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

Property duration: Prepaid time period.

It could be from 1 to 9 when PricingCycle is Month, or 1 to 3 when PricingCycle is Year. Default value is 3.


pricingCycleOptional

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

Property pricingCycle: Unit of the payment cycle.

It could be Month (default) or Year.


tagsOptional

Property tags: 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.


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.apigateway.Instance;
Instance.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.
attrEgressIpv6Enable com.aliyun.ros.cdk.core.IResolvable Attribute EgressIpv6Enable: Whether enable egress IPV6.
attrInstanceId com.aliyun.ros.cdk.core.IResolvable Attribute InstanceId: Instance ID.
attrInstanceType com.aliyun.ros.cdk.core.IResolvable Attribute InstanceType: Instance type.
attrInternetEgressAddress com.aliyun.ros.cdk.core.IResolvable Attribute InternetEgressAddress: Internet egress dddress.
attrSupportIpv6 com.aliyun.ros.cdk.core.IResolvable Attribute SupportIpv6: Whether support IPV6.
attrVpcEgressAddress com.aliyun.ros.cdk.core.IResolvable Attribute VpcEgressAddress: VPC network egress address.
attrVpcIntranetEnable com.aliyun.ros.cdk.core.IResolvable Attribute VpcIntranetEnable: Whether enable VPC intranet.
attrVpcSlbIntranetEnable com.aliyun.ros.cdk.core.IResolvable Attribute VpcSlbIntranetEnable: Whether enable VPC SLB intranet.

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

attrEgressIpv6EnableRequired

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

Attribute EgressIpv6Enable: Whether enable egress IPV6.


attrInstanceIdRequired

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

Attribute InstanceId: Instance ID.


attrInstanceTypeRequired

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

Attribute InstanceType: Instance type.


attrInternetEgressAddressRequired

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

Attribute InternetEgressAddress: Internet egress dddress.


attrSupportIpv6Required

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

Attribute SupportIpv6: Whether support IPV6.


attrVpcEgressAddressRequired

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

Attribute VpcEgressAddress: VPC network egress address.


attrVpcIntranetEnableRequired

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

Attribute VpcIntranetEnable: Whether enable VPC intranet.


attrVpcSlbIntranetEnableRequired

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

Attribute VpcSlbIntranetEnable: Whether enable VPC SLB intranet.