Instance
- Implements: IInstance
This class encapsulates and extends the ROS resource type ALIYUN::Memcache::Instance.
Initializers
import com.aliyun.ros.cdk.memcache.Instance;
Instance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
// .autoRenew(java.lang.String)
// .autoRenew(IResolvable)
// .autoRenewPeriod(java.lang.String)
// .autoRenewPeriod(IResolvable)
// .autoUseCoupon(java.lang.String)
// .autoUseCoupon(IResolvable)
// .backupPolicy(IResolvable)
// .backupPolicy(BackupPolicyProperty)
// .capacity(java.lang.Number)
// .capacity(IResolvable)
// .chargeType(java.lang.String)
// .chargeType(IResolvable)
// .config(java.lang.String)
// .config(IResolvable)
// .couponNo(java.lang.String)
// .couponNo(IResolvable)
// .instanceClass(java.lang.String)
// .instanceClass(IResolvable)
// .instanceName(java.lang.String)
// .instanceName(IResolvable)
// .networkType(java.lang.String)
// .networkType(IResolvable)
// .password(java.lang.String)
// .password(IResolvable)
// .period(java.lang.String)
// .period(IResolvable)
// .privateIpAddress(java.lang.String)
// .privateIpAddress(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .vpcId(java.lang.String)
// .vpcId(IResolvable)
// .vpcPasswordFree(java.lang.Boolean)
// .vpcPasswordFree(IResolvable)
// .vSwitchId(java.lang.String)
// .vSwitchId(IResolvable)
// .zoneId(java.lang.String)
// .zoneId(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. |
autoRenew | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property autoRenew: Specifies whether to enable auto renewal. |
autoRenewPeriod | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property autoRenewPeriod: The auto-renewal duration, in months. |
autoUseCoupon | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property autoUseCoupon: Specifies whether to use a coupon. |
backupPolicy | com.aliyun.ros.cdk.core.IResolvable OR BackupPolicyProperty | Property backupPolicy: Backup policy. |
capacity | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property capacity: The storage capacity of the instance. |
chargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property chargeType: The billing method of the instance. |
config | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property config: The parameter configuration of the instance, in a JSON string. |
couponNo | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property couponNo: The coupon code. |
instanceClass | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceClass: The instance type. |
instanceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceName: The name of the instance. |
networkType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property networkType: The network type of the instance. |
password | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property password: The password for the instance. |
period | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property period: The subscription duration, in months. |
privateIpAddress | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property privateIpAddress: The internal IP address of the instance. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: Resource group ID. |
vpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpcId: The ID of the VPC. |
vpcPasswordFree | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property vpcPasswordFree: Specifies whether to enable password free for access within the VPC. |
vSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vSwitchId: The ID of the VSwitch. |
zoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property zoneId: The ID of the primary zone for the instance. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
autoRenewOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenew: Specifies whether to enable auto renewal.
Valid values: true false Note Default value: false.
autoRenewPeriodOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenewPeriod: The auto-renewal duration, in months.
Valid values: 1, 2, 3, 6, and 12.
This parameter is required when AutoRenew is set to true.
autoUseCouponOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoUseCoupon: Specifies whether to use a coupon.
Valid values: true false Note Default value: false.
backupPolicyOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR BackupPolicyProperty
Property backupPolicy: Backup policy.
capacityOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property capacity: The storage capacity of the instance.
Unit: MB. Note You need to pass at least one of the Capacity and InstanceClass parameters when calling the CreateInstance operation.
chargeTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property chargeType: The billing method of the instance.
Valid values: PrePaid: subscription. PostPaid: pay-as-you-go. Note Default value: PostPaid.
configOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property config: The parameter configuration of the instance, in a JSON string.
For more information, see Set parameters.
couponNoOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property couponNo: The coupon code.
Default value: default.
instanceClassOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceClass: The instance type.
For more information, see Instance types. Note You need to pass at least one of the Capacity and InstanceClass parameters when calling the CreateInstance operation.
instanceNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceName: The name of the instance.
The name must be 2 to 80 characters long, start with a letter (uppercase or lowercase) or a Chinese character, and not contain spaces or the characters @\/:=”<>{[]}.
networkTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property networkType: The network type of the instance.
Valid values: CLASSIC VPC Note Default value: CLASSIC.
passwordOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property password: The password for the instance.
The password must be 8 to 32 characters long and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The allowed special characters are !@#$%^&*()_+-=.
periodOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property period: The subscription duration, in months.
Valid values: 1 to 9, 12, 24, 36, and 60.
This parameter is available and required only when ChargeType is set to PrePaid.
privateIpAddressOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property privateIpAddress: The internal IP address of the instance.
Note The internal IP address must be located in the Classless Inter-Domain Routing (CIDR) block of the VSwitch to which the instance belongs.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group ID.
vpcIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: The ID of the VPC.
vpcPasswordFreeOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property vpcPasswordFree: Specifies whether to enable password free for access within the VPC.
If set to:
- true: enables password free.
- false: disables password free.
vSwitchIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vSwitchId: The ID of the VSwitch.
zoneIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property zoneId: The ID of the primary zone for the instance.
You can call the DescribeZones operation to query available zones.
You can also specify a secondary zone by using the
SecondaryZoneIdparameter. The primary and replica nodes are then deployed in the specified primary and secondary zones to create a dual-zone architecture for in-city disaster recovery.
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.memcache.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. |
attrConnectionDomain | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ConnectionDomain: The internal endpoint of the instance. |
attrInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceId: The globally unique identifier (GUID) of the instance. |
attrInstanceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceName: The name of the instance. |
attrPort | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Port: Port of created instance. |
attrQps | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute QPS: QPS. |
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
attrConnectionDomainRequired
public java.lang.Object getAttrConnectionDomain();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ConnectionDomain: The internal endpoint of the instance.
attrInstanceIdRequired
public java.lang.Object getAttrInstanceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceId: The globally unique identifier (GUID) 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.
attrPortRequired
public java.lang.Object getAttrPort();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Port: Port of created instance.
attrQpsRequired
public java.lang.Object getAttrQps();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute QPS: QPS.
propsRequired
public InstanceProps getProps();
- Type: InstanceProps