Instance
This class encapsulates and extends the ROS resource type ALIYUN::Memcache::Instance
ALIYUN::MEMCACHE::Instance is used to create an ApsaraDB for Memcache (OCS) 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 period of the auto renewal. |
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 number. |
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 of the instance. |
period |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property period: The subscription period. |
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 zone in which the instance is created. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
autoRenew
Optional
- 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.
autoRenewPeriod
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenewPeriod: The period of the auto renewal.
Unit: months. Valid values: 1 2 3 6 12 Note You must specify this parameter if the value of the AutoRenew parameter is true.
autoUseCoupon
Optional
- 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.
backupPolicy
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR BackupPolicyProperty
Property backupPolicy: Backup policy.
capacity
Optional
- 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.
chargeType
Optional
- 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.
config
Optional
- 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.
couponNo
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property couponNo: The coupon number.
Default value: youhuiquan_promotion_option_id_for_blank.
instanceClass
Optional
- 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.
instanceName
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceName: The name of the instance.
The name can be 2 to 128 characters in length and must start with a letter. The following characters are not supported: at signs (@), forward slashes (/), colons (:), equal signs (=), double quotation marks ("), angle brackets (<>), braces ([]), curly brackets ({}) and spaces.
networkType
Optional
- 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.
password
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property password: The password of the instance.
The password can be 8 to 32 characters in length and must contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! at signs (@), number signs (#), dollar signs ($), percent signs (%), carets (^), ampersands (&), asterisks (*), parentheses (()), underscores (_), plus signs (+), hyphens (-), and equal signs (=).
period
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property period: The subscription period.
You must specify this parameter if the value of the ChargeType parameter is PrePaid. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. Note This parameter is invalid if the value of the ChargeType parameter is PostPaid.
privateIpAddress
Optional
- 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.
resourceGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group ID.
vpcId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: The ID of the VPC.
vpcPasswordFree
Optional
- 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.
vSwitchId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vSwitchId: The ID of the VSwitch.
zoneId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property zoneId: The ID of the zone in which the instance is created.
You can call the DescribeRegions operation to query the latest region list.
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.
- 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
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. |
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 |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ConnectionDomain: The internal endpoint of the instance. |
attrInstanceId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute InstanceId: The globally unique identifier (GUID) of the instance. |
attrInstanceName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute InstanceName: The name of the instance. |
attrPort |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Port: Port of created instance. |
attrQps |
com.aliyun.ros.cdk.core.IResolvable |
Attribute QPS: QPS. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrConnectionDomain
Required
public IResolvable getAttrConnectionDomain();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ConnectionDomain: The internal endpoint of the instance.
attrInstanceId
Required
public IResolvable getAttrInstanceId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceId: The globally unique identifier (GUID) of the instance.
attrInstanceName
Required
public IResolvable getAttrInstanceName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceName: The name of the instance.
attrPort
Required
public IResolvable getAttrPort();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Port: Port of created instance.
attrQps
Required
public IResolvable getAttrQps();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute QPS: QPS.