ReadOnlyDBInstance
- Implements: IReadOnlyDBInstance
This class encapsulates and extends the ROS resource type ALIYUN::RDS::ReadOnlyDBInstance.
Initializers
import com.aliyun.ros.cdk.rds.ReadOnlyDBInstance;
ReadOnlyDBInstance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.dbInstanceClass(java.lang.String)
.dbInstanceClass(IResolvable)
.dbInstanceId(java.lang.String)
.dbInstanceId(IResolvable)
.dbInstanceStorage(java.lang.Number)
.dbInstanceStorage(IResolvable)
.engineVersion(java.lang.String)
.engineVersion(IResolvable)
.zoneId(java.lang.String)
.zoneId(IResolvable)
// .autoRenew(java.lang.Boolean)
// .autoRenew(IResolvable)
// .category(java.lang.String)
// .category(IResolvable)
// .dbInstanceDescription(java.lang.String)
// .dbInstanceDescription(IResolvable)
// .dbInstanceStorageType(java.lang.String)
// .dbInstanceStorageType(IResolvable)
// .dedicatedHostGroupId(java.lang.String)
// .dedicatedHostGroupId(IResolvable)
// .deletionProtection(java.lang.Boolean)
// .deletionProtection(IResolvable)
// .payType(java.lang.String)
// .payType(IResolvable)
// .period(java.lang.Number)
// .period(IResolvable)
// .periodType(java.lang.String)
// .periodType(IResolvable)
// .privateIpAddress(java.lang.String)
// .privateIpAddress(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .tags(java.util.Map<java.lang.String, java.lang.Object>)
// .targetDedicatedHostIdForMaster(java.lang.String)
// .targetDedicatedHostIdForMaster(IResolvable)
// .vpcId(java.lang.String)
// .vpcId(IResolvable)
// .vSwitchId(java.lang.String)
// .vSwitchId(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. |
dbInstanceClass | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dbInstanceClass: The type of the instance. |
dbInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dbInstanceId: The ID of the master instance. |
dbInstanceStorage | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property dbInstanceStorage: The storage space of the instance. |
engineVersion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property engineVersion: The version of the database. |
zoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property zoneId: The ID of the zone. |
autoRenew | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property autoRenew: Specifies whether to enable auto-renewal. |
category | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property category: The RDS edition of the read-only instance. |
dbInstanceDescription | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dbInstanceDescription: Description of created database instance. |
dbInstanceStorageType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dbInstanceStorageType: The type of storage media that is used by the instance. |
dedicatedHostGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dedicatedHostGroupId: The ID of the dedicated cluster to which the read-only instance belongs. |
deletionProtection | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property deletionProtection: Specifies whether to enable the release protection feature for the read-only instance. |
payType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property payType: The billing method. |
period | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property period: The subscription duration. |
periodType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property periodType: Charge period for created instances. |
privateIpAddress | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property privateIpAddress: The private IP address of the read-only instance. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: Resource group id. |
tags | java.util.Map | Property tags: The tags of an instance. |
targetDedicatedHostIdForMaster | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property targetDedicatedHostIdForMaster: The ID of the host on which the primary instance resides. |
vpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpcId: The ID of the VPC. |
vSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vSwitchId: The ID of the VSwitch. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
dbInstanceClassRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dbInstanceClass: The type of the instance.
For more information, see Instance type list. The type of the read-only instance must be no less than that of the master instance. Otherwise, the read-only instance incurs high latency and high load.
dbInstanceIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dbInstanceId: The ID of the master instance.
dbInstanceStorageRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property dbInstanceStorage: The storage space of the instance.
Value range: 5 to 3000. The value must be a multiple of 5. Unit: GB.
engineVersionRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property engineVersion: The version of the database.
The database and the master instance must have the same database version. Valid values: 5.6, 5.7, 8.0, 2017_ent, 2019_ent
zoneIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property zoneId: The ID of the zone.
You can call the DescribeRegions API operation to view the latest zones.
autoRenewOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenew: Specifies whether to enable auto-renewal.
Valid values: true and false. Note :Monthly subscription: The auto-renewal cycle is one month. Annual subscription: The auto-renewal cycle is one year.
categoryOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property category: The RDS edition of the read-only instance.
Valid values: Basic: Basic Edition. HighAvailability: High-availability Edition. This is the default value. AlwaysOn: Cluster Edition. Finance: Enterprise Edition. This edition is available only on the China site (aliyun.com).
dbInstanceDescriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dbInstanceDescription: Description of created database instance.
dbInstanceStorageTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dbInstanceStorageType: The type of storage media that is used by the instance.
Valid values: local_ssd: local SSDs cloud_ssd: standard SSDs cloud_essd: ESSDs of performance level 1 (PL1) cloud_essd2: ESSDs of PL2 cloud_essd3: ESSDs of PL3
dedicatedHostGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dedicatedHostGroupId: The ID of the dedicated cluster to which the read-only instance belongs.
This parameter is valid when you create the read-only instance in a dedicated cluster.
deletionProtectionOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property deletionProtection: Specifies whether to enable the release protection feature for the read-only instance.
Valid values:- true: enables the feature.- false (default): disables the feature.
payTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property payType: The billing method.
periodOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property period: The subscription duration.
Valid values: When PeriodType is Month, it could be from 1 to 12, 24, 36, 48, 60. When PeriodType is Year, it could be from 1 to 5.
periodTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property periodType: Charge period for created instances.
privateIpAddressOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property privateIpAddress: The private IP address of the read-only instance.
It must be within the IP address range provided by the switch. The system automatically assigns an IP address based on the VPCId and VSwitchId by default.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
tagsOptional
- Type: java.util.Map
Property tags: The tags of an instance.
You should input the information of the tag with the format of the Key-Value, such as {"key1":"value1","key2":"value2", ... "key5":"value5"}. At most 5 tags can be specified. Key It can be up to 64 characters in length. Cannot begin with aliyun. Cannot begin with http:// or https://. Cannot be a null string. Value It can be up to 128 characters in length. Cannot begin with aliyun. Cannot begin with http:// or https://. Can be a null string.
targetDedicatedHostIdForMasterOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property targetDedicatedHostIdForMaster: The ID of the host on which the primary instance resides.
This parameter is valid when you create the read-only instance in a dedicated cluster.
vpcIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: The ID of the VPC.
vSwitchIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vSwitchId: The ID of the VSwitch.
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.rds.ReadOnlyDBInstance;
ReadOnlyDBInstance.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. |
attrConnectionString | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ConnectionString: DB instance connection url by Intranet. |
attrDbInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DBInstanceId: The instance id of created database instance. |
attrPort | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Port: Intranet port of created DB instance. |
props | ReadOnlyDBInstanceProps | 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
attrConnectionStringRequired
public java.lang.Object getAttrConnectionString();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ConnectionString: DB instance connection url by Intranet.
attrDbInstanceIdRequired
public java.lang.Object getAttrDbInstanceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DBInstanceId: The instance id of created database instance.
attrPortRequired
public java.lang.Object getAttrPort();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Port: Intranet port of created DB instance.
propsRequired
public ReadOnlyDBInstanceProps getProps();
- Type: ReadOnlyDBInstanceProps