Skip to content

Instance

This class encapsulates and extends the ROS resource type ALIYUN::REDIS::Instance, which is used to create an ApsaraDB for Redis instance.

Initializers

import com.aliyun.ros.cdk.redis.Instance;
Instance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
//  .autoRenewDuration(java.lang.Number)
//  .autoRenewDuration(IResolvable)
//  .backupPolicy(IResolvable)
//  .backupPolicy(BackupPolicyProperty)
//  .chargeType(java.lang.String)
//  .chargeType(IResolvable)
//  .connections(IResolvable)
//  .connections(ConnectionsProperty)
//  .deletionForce(java.lang.Boolean)
//  .deletionForce(IResolvable)
//  .engineVersion(java.lang.String)
//  .engineVersion(IResolvable)
//  .evictionPolicy(java.lang.String)
//  .evictionPolicy(IResolvable)
//  .instanceClass(java.lang.String)
//  .instanceClass(IResolvable)
//  .instanceMaintainTime(IResolvable)
//  .instanceMaintainTime(InstanceMaintainTimeProperty)
//  .instanceName(java.lang.String)
//  .instanceName(IResolvable)
//  .nodeType(java.lang.String)
//  .nodeType(IResolvable)
//  .password(java.lang.String)
//  .password(IResolvable)
//  .period(java.lang.Number)
//  .period(IResolvable)
//  .periodUnit(java.lang.String)
//  .periodUnit(IResolvable)
//  .productType(java.lang.String)
//  .productType(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .secondaryZoneId(java.lang.String)
//  .secondaryZoneId(IResolvable)
//  .securityGroupId(java.lang.String)
//  .securityGroupId(IResolvable)
//  .shardCount(java.lang.Number)
//  .shardCount(IResolvable)
//  .sslEnabled(java.lang.String)
//  .sslEnabled(IResolvable)
//  .tags(java.util.List<TagsProperty>)
//  .tairConfig(IResolvable)
//  .tairConfig(TairConfigProperty)
//  .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.
autoRenewDuration java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property autoRenewDuration: The auto-renewal period.
backupPolicy com.aliyun.ros.cdk.core.IResolvable OR BackupPolicyProperty Property backupPolicy: Backup policy.
chargeType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property chargeType: The billing method of the ApsaraDB for Redis instance.
connections com.aliyun.ros.cdk.core.IResolvable OR ConnectionsProperty Property connections: Connection address.
deletionForce java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property deletionForce: Whether destroy instance when it is in recycle.
engineVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property engineVersion: Engine version.
evictionPolicy java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property evictionPolicy: The eviction policy of cache data storage.
instanceClass java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceClass: Redis instance type.
instanceMaintainTime com.aliyun.ros.cdk.core.IResolvable OR InstanceMaintainTimeProperty Property instanceMaintainTime: Instance maintain time.
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 '.', '-'.
nodeType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property nodeType: The type of node.
password java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property password: The password of redis instance.length 8 to 30 characters, need to contain both uppercase and lowercase letters and numbers.
period java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property period: The period of order, when choose Prepaid required.optional value 1-9, 12, 24, 36, 60 Unit in month.
periodUnit java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property periodUnit: The unit of the subscription duration.
productType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property productType: Product type.
resourceGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resourceGroupId: Resource group id.
secondaryZoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property secondaryZoneId: The secondary zone ID of the instance.
securityGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityGroupId: The IDs of security groups.
shardCount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property shardCount: The number of data nodes in the instance.
sslEnabled java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property sslEnabled: Modifies the SSL status.
tags java.util.List<TagsProperty> Property tags: Tags to attach to redis.
tairConfig com.aliyun.ros.cdk.core.IResolvable OR TairConfigProperty Property tairConfig: Tair config.
vpcId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vpcId: The VPC id to create ecs instance.
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 vSwitch Id to create ecs instance.
zoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property zoneId: The zone id of input region.

scopeRequired

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

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

autoRenewDurationOptional

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

Property autoRenewDuration: The auto-renewal period.

Valid values: 1 to 12. When the instance is about to expire, the instance is automatically renewed based on the number of months specified by this parameter. Note This parameter is valid only when ChargeType is set to PrePaid.


backupPolicyOptional

Property backupPolicy: Backup policy.


chargeTypeOptional

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

Property chargeType: The billing method of the ApsaraDB for Redis instance.


connectionsOptional

Property connections: Connection address.


deletionForceOptional

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

Property deletionForce: Whether destroy instance when it is in recycle.

Default is false


engineVersionOptional

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

Property engineVersion: Engine version.

Supported values: 2.8, 4.0, 5.0, 6.0 and 7.0


evictionPolicyOptional

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

Property evictionPolicy: The eviction policy of cache data storage.


instanceClassOptional

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

Property instanceClass: Redis instance type.

Refer the Redis instance type reference, such as 'redis.master.small.default', 'redis.master.4xlarge.default', 'redis.sharding.mid.default' etc


instanceMaintainTimeOptional

Property instanceMaintainTime: Instance maintain time.


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 '.', '-'.


nodeTypeOptional

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

Property nodeType: The type of node.

Valid value:

  • STAND_ALONE
  • MASTER_SLAVE
  • double
  • single

passwordOptional

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

Property password: The password of redis instance.length 8 to 30 characters, need to contain both uppercase and lowercase letters and numbers.


periodOptional

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

Property period: The period of order, when choose Prepaid required.optional value 1-9, 12, 24, 36, 60 Unit in month.


periodUnitOptional

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

Property periodUnit: The unit of the subscription duration.

Valid values: Month Year Default value: Month.


productTypeOptional

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

Property productType: Product type.

Valid values:Local: Community Edition(Local) or Enhanced Edition(Local)Tair_rdb: Performance Enhanced(Cloud Disk)Tair_scm: Persistent Memory(Cloud Disk)Tair_essd: Capacity Storage(Cloud Disk)OnECS: Community Edition(Cloud Disk)


resourceGroupIdOptional

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

Property resourceGroupId: Resource group id.


secondaryZoneIdOptional

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

Property secondaryZoneId: The secondary zone ID of the instance.


securityGroupIdOptional

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

Property securityGroupId: The IDs of security groups.

Separate multiple security group IDs with commas (,) and up to 10 can be set.


shardCountOptional

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

Property shardCount: The number of data nodes in the instance.

Default value: 1. Valid values: 1: You can create an instance in the standard architecture that contains only a single data node. For more information about the standard architecture, see Cluster master-replica instances. 2 to 32: You can create an instance in the cluster architecturethat contains the specified number of data nodes. For more information about the cluster architecture, see Cluster master-replica instances.


sslEnabledOptional

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

Property sslEnabled: Modifies the SSL status.

Valid values: Disable: disables SSL encryption. Enable: enables SSL encryption. Update: updates the SSL certificate.


tagsOptional

Property tags: Tags to attach to redis.

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


tairConfigOptional

Property tairConfig: Tair config.

This parameter is available only if the InstanceClass parameter is start with tair.


vpcIdOptional

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

Property vpcId: The VPC id to create ecs instance.


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 vSwitch Id to create ecs instance.


zoneIdOptional

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

Property zoneId: The zone id of input region.


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.redis.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.
attrArchitectureType com.aliyun.ros.cdk.core.IResolvable Attribute ArchitectureType: The architecture.
attrBandwidth com.aliyun.ros.cdk.core.IResolvable Attribute Bandwidth: The bandwidth of the instance.
attrCapacity com.aliyun.ros.cdk.core.IResolvable Attribute Capacity: The storage capacity of the instance.
attrChargeType com.aliyun.ros.cdk.core.IResolvable Attribute ChargeType: The billing method of the instance.
attrClassicInnerConnectionPort com.aliyun.ros.cdk.core.IResolvable Attribute ClassicInnerConnectionPort: The classic inner connection port of the instance.
attrClassicInnerConnectionString com.aliyun.ros.cdk.core.IResolvable Attribute ClassicInnerConnectionString: The classic inner connection string of the instance.
attrConnectionDomain com.aliyun.ros.cdk.core.IResolvable Attribute ConnectionDomain: Connection domain of created instance.
attrConnections com.aliyun.ros.cdk.core.IResolvable Attribute Connections: The maximum number of connections supported by the instance.
attrDirectConnectionPort com.aliyun.ros.cdk.core.IResolvable Attribute DirectConnectionPort: The direct connection port of the instance.
attrDirectConnectionString com.aliyun.ros.cdk.core.IResolvable Attribute DirectConnectionString: The direct connection string of the instance.
attrEngineVersion com.aliyun.ros.cdk.core.IResolvable Attribute EngineVersion: The engine version of the instance.
attrHasRenewChangeOrder com.aliyun.ros.cdk.core.IResolvable Attribute HasRenewChangeOrder: Indicates whether the Alibaba Cloud account has pending renewal or scaling orders.
attrInstanceClass com.aliyun.ros.cdk.core.IResolvable Attribute InstanceClass: Redis instance type.
attrInstanceId com.aliyun.ros.cdk.core.IResolvable Attribute InstanceId: Instance id of created redis instance.
attrInstanceName com.aliyun.ros.cdk.core.IResolvable Attribute InstanceName: Name of created redis instance.
attrInstanceType com.aliyun.ros.cdk.core.IResolvable Attribute InstanceType: The engine type of the instance.
attrNetworkType com.aliyun.ros.cdk.core.IResolvable Attribute NetworkType: The network type.
attrNodeType com.aliyun.ros.cdk.core.IResolvable Attribute NodeType: The type of node.
attrOrderId com.aliyun.ros.cdk.core.IResolvable Attribute OrderId: Order Id of created instance.
attrPackageType com.aliyun.ros.cdk.core.IResolvable Attribute PackageType: The plan type.
attrPort com.aliyun.ros.cdk.core.IResolvable Attribute Port: Port of created instance.
attrPrivateIp com.aliyun.ros.cdk.core.IResolvable Attribute PrivateIp: The internal IP address of the instance.
attrPublicConnectionPort com.aliyun.ros.cdk.core.IResolvable Attribute PublicConnectionPort: The public connection port of the instance.
attrPublicConnectionString com.aliyun.ros.cdk.core.IResolvable Attribute PublicConnectionString: The public connection string of the instance.
attrQps com.aliyun.ros.cdk.core.IResolvable Attribute QPS: The queries per second (QPS) supported by the instance.
attrResourceGroupId com.aliyun.ros.cdk.core.IResolvable Attribute ResourceGroupId: The ID of the resource group to which the instance belongs.
attrVpcId com.aliyun.ros.cdk.core.IResolvable Attribute VpcId: The ID of the VPC.
attrVpcPrivateConnectionPort com.aliyun.ros.cdk.core.IResolvable Attribute VpcPrivateConnectionPort: The vpc private connection port of the instance.
attrVpcPrivateConnectionString com.aliyun.ros.cdk.core.IResolvable Attribute VpcPrivateConnectionString: The vpc private connection string of the instance.
attrVSwitchId com.aliyun.ros.cdk.core.IResolvable Attribute VSwitchId: The ID of the vSwitch.
attrZoneId com.aliyun.ros.cdk.core.IResolvable Attribute ZoneId: The ID of the zone.

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

attrArchitectureTypeRequired

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

Attribute ArchitectureType: The architecture.


attrBandwidthRequired

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

Attribute Bandwidth: The bandwidth of the instance.

Unit: Mbit/s.


attrCapacityRequired

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

Attribute Capacity: The storage capacity of the instance.

Unit: MB.


attrChargeTypeRequired

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

Attribute ChargeType: The billing method of the instance.


attrClassicInnerConnectionPortRequired

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

Attribute ClassicInnerConnectionPort: The classic inner connection port of the instance.


attrClassicInnerConnectionStringRequired

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

Attribute ClassicInnerConnectionString: The classic inner connection string of the instance.


attrConnectionDomainRequired

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

Attribute ConnectionDomain: Connection domain of created instance.


attrConnectionsRequired

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

Attribute Connections: The maximum number of connections supported by the instance.


attrDirectConnectionPortRequired

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

Attribute DirectConnectionPort: The direct connection port of the instance.


attrDirectConnectionStringRequired

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

Attribute DirectConnectionString: The direct connection string of the instance.


attrEngineVersionRequired

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

Attribute EngineVersion: The engine version of the instance.


attrHasRenewChangeOrderRequired

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

Attribute HasRenewChangeOrder: Indicates whether the Alibaba Cloud account has pending renewal or scaling orders.


attrInstanceClassRequired

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

Attribute InstanceClass: Redis instance type.


attrInstanceIdRequired

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

Attribute InstanceId: Instance id of created redis instance.


attrInstanceNameRequired

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

Attribute InstanceName: Name of created redis instance.


attrInstanceTypeRequired

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

Attribute InstanceType: The engine type of the instance.


attrNetworkTypeRequired

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

Attribute NetworkType: The network type.


attrNodeTypeRequired

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

Attribute NodeType: The type of node.


attrOrderIdRequired

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

Attribute OrderId: Order Id of created instance.


attrPackageTypeRequired

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

Attribute PackageType: The plan type.


attrPortRequired

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

Attribute Port: Port of created instance.


attrPrivateIpRequired

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

Attribute PrivateIp: The internal IP address of the instance.


attrPublicConnectionPortRequired

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

Attribute PublicConnectionPort: The public connection port of the instance.


attrPublicConnectionStringRequired

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

Attribute PublicConnectionString: The public connection string of the instance.


attrQpsRequired

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

Attribute QPS: The queries per second (QPS) supported by the instance.


attrResourceGroupIdRequired

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

Attribute ResourceGroupId: The ID of the resource group to which the instance belongs.


attrVpcIdRequired

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

Attribute VpcId: The ID of the VPC.


attrVpcPrivateConnectionPortRequired

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

Attribute VpcPrivateConnectionPort: The vpc private connection port of the instance.


attrVpcPrivateConnectionStringRequired

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

Attribute VpcPrivateConnectionString: The vpc private connection string of the instance.


attrVSwitchIdRequired

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

Attribute VSwitchId: The ID of the vSwitch.


attrZoneIdRequired

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

Attribute ZoneId: The ID of the zone.