ALIYUN::DRDS::DrdsInstance is used to create a Distributed Relational Database Service (DRDS) instance of specific specifications.
Syntax
{
"Type": "ALIYUN::DRDS::DrdsInstance",
"Properties": {
"VpcId": String,
"Description": String,
"InstanceSeries": String,
"Specification": String,
"PayType": String,
"ZoneId": String,
"PricingCycle": String,
"Duration": Integer,
"VswitchId": String,
"IsAutoRenew": Boolean,
"Type": String,
"Tags": List,
"MySQLVersion": String,
"ResourceGroupId": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
VpcId | String | No | No | The ID of the virtual private cloud (VPC). | This property is required if you want to create the DRDS instance in a VPC. |
Description | String | Yes | No | The description of the instance. | The description must be 2 to 128 characters in length. |
InstanceSeries | String | Yes | No |
The edition of the instance. |
Valid values:
|
Specification | String | Yes | No | The specifications of the instance. The specifications consist of the edition and specific CPU cores and memory capacity of the instance. For example, drds.sn1.4c8g.8C16G consists of drds.sn1.4c8g and 8C16G. | For more information about the valid values of this property, see Specifications and pricing of DRDS instances. |
ResourceGroupId | String | No | Yes | The ID of the resource group. | None |
PayType | String | Yes | No | The billing method of the instance. | Valid values:
|
ZoneId | String | Yes | No | The zone ID of the instance. | A zone belongs to a region. For example, Hangzhou Zone A belongs to the China (Hangzhou) region. |
PricingCycle | String | No | No | The unit of the subscription duration. | Valid values:
|
Duration | Integer | No | No | The subscription duration. | Valid values:
|
VswitchId | String | No | No | The ID of the vSwitch. | This property is required if you want to create the DRDS instance in a VPC. |
IsAutoRenew | Boolean | No | No | Specifies whether to enable auto-renewal. | Valid values:
|
Type | String | Yes | No | The type of the instance. | Valid values:
|
MySQLVersion | String | No | No | The version of the MySQL protocol. | Valid values:
Note This property takes effect only if you create a primary instance. By default, the
MySQL version of a read-only instance is the same as that of the primary instance.
|
Tags | List | No | Yes | The tags of the instance. | You can add up to 20 tags at a time.
For more information, see Tags properties. |
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Key | String | Yes | No | The key of the tag. | The tag key must be 1 to 128 characters in length, and cannot contain http:// or https:// . The tag key cannot start with aliyun or acs: .
|
Value | String | No | No | The value of the tag. | The tag value can be up to 128 characters in length, and cannot contain http:// or https:// . The tag value cannot start with aliyun or acs: .
|
Response parameters
Fn::GetAtt
- OrderId: the ID of the order.
- DrdsInstanceId: the ID of the instance.
- IntranetEndpoint: the internal endpoint of the instance.
- InternetEndpoint: the public endpoint of the instance.
Examples
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Description": {
"Type": "String",
"Description": "Description of the DRDS instance, 2-128 characters"
},
"ZoneId": {
"Type": "String",
"Description": "Availability zone, an available zone belongs to a certain zone, such as Hangzhou Availability Zone A (cn-hangzhou-a) belongs to the region Hangzhou (cn-hangzhou)"
},
"PricingCycle": {
"Type": "String",
"Description": "The unit of the order period, year: year, month: month. The parameter takes effect when the payment type is drdsPre.",
"AllowedValues": [
"year",
"month"
]
},
"InstanceSeries": {
"Type": "String",
"Description": "drds.sn1.4c8g Starter Edition; drds.sn1.8c16g Standard Edition; drds.sn1.16c32g Business Edition; drds.sn1.32c64g Ultimate Edition"
},
"Specification": {
"Type": "String",
"Description": "The example specification, for example, drds.sn1.4c8g.8C16G, consists of the DRDS instance series (drds.sn1.4c8g) plus a specific example specification (8C16G). For the DRDS instance specification value range, see: Distributed Relational Database Service Specifications and Pricing"
},
"Duration": {
"Type": "Number",
"Description": "The number of cycles ordered. When PricingCycle=year, the value is 1-3; when PricingCycle=month, the value is 1-9. The parameter takes effect when the payment type is drdsPre.",
"MinValue": 1,
"MaxValue": 9
},
"PayType": {
"Type": "String",
"Description": "For the type of payment, see \"Payment Type Parameter Table\"",
"AllowedValues": [
"drdsPost",
"drdsPre"
]
},
"VswitchId": {
"Type": "String",
"Description": "Virtual switch ID, must be specified when creating a DRDS for VPC network type"
},
"Type": {
"Type": "String",
"Description": "Instance type, instance type 0 - shared instance 1 - exclusive instance, in addition, this parameter can also pass PRIVATE and PUBLIC to represent exclusive instance and shared instance respectively",
"AllowedValues": [
"0",
"1",
"PRIVATE",
"PUBLIC"
]
},
"MySQLVersion": {
"Type": "String",
"Description": "The MySQL protocol version supported by DRDS. Valid values: 5 and 8. Default value: 5. This parameter is valid only when the primary instance is created. The read-only instance is the same as the primary instance by default.",
"Default": "5"
},
"VpcId": {
"Type": "String",
"Description": "Virtual private network ID, must be specified when creating a DRDS for VPC network type"
},
"IsAutoRenew": {
"Type": "Boolean",
"Description": "Whether to renew the fee automatically, if it is purchased on a monthly basis, it will automatically renew for one month, and if it is purchased on an annual basis, it will automatically renew for one year. The parameter takes effect when the payment type is drdsPre.",
"AllowedValues": [
"True",
"true",
"False",
"false"
]
},
"Tags": {
"Type": "Json",
"Description": "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.",
"MaxLength": 20
}
},
"Resources": {
"DrdsInstance": {
"Type": "ALIYUN::DRDS::DrdsInstance",
"Properties": {
"Description": {
"Ref": "Description"
},
"ZoneId": {
"Ref": "ZoneId"
},
"PricingCycle": {
"Ref": "PricingCycle"
},
"InstanceSeries": {
"Ref": "InstanceSeries"
},
"Specification": {
"Ref": "Specification"
},
"Duration": {
"Ref": "Duration"
},
"PayType": {
"Ref": "PayType"
},
"VswitchId": {
"Ref": "VswitchId"
},
"Type": {
"Ref": "Type"
},
"MySQLVersion": {
"Ref": "MySQLVersion"
},
"VpcId": {
"Ref": "VpcId"
},
"IsAutoRenew": {
"Ref": "IsAutoRenew"
},
"Tags": {
"Ref": "Tags"
}
}
}
},
"Outputs": {
"DrdsInstanceId": {
"Description": "instance id",
"Value": {
"Fn::GetAtt": [
"DrdsInstance",
"DrdsInstanceId"
]
}
},
"InternetEndpoint": {
"Description": "Public endpoint",
"Value": {
"Fn::GetAtt": [
"DrdsInstance",
"InternetEndpoint"
]
}
},
"OrderId": {
"Description": "order number",
"Value": {
"Fn::GetAtt": [
"DrdsInstance",
"OrderId"
]
}
},
"IntranetEndpoint": {
"Description": "VPC endpoint",
"Value": {
"Fn::GetAtt": [
"DrdsInstance",
"IntranetEndpoint"
]
}
}
}
}
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Description:
Description: Description of the DRDS instance, 2-128 characters
Type: String
Duration:
Description: The number of cycles ordered. When PricingCycle=year, the value is
1-3; when PricingCycle=month, the value is 1-9. The parameter takes effect when
the payment type is drdsPre.
MaxValue: 9
MinValue: 1
Type: Number
InstanceSeries:
Description: drds.sn1.4c8g Starter Edition; drds.sn1.8c16g Standard Edition; drds.sn1.16c32g
Business Edition; drds.sn1.32c64g Ultimate Edition
Type: String
IsAutoRenew:
AllowedValues:
- 'True'
- 'true'
- 'False'
- 'false'
Description: Whether to renew the fee automatically, if it is purchased on a monthly
basis, it will automatically renew for one month, and if it is purchased on
an annual basis, it will automatically renew for one year. The parameter takes
effect when the payment type is drdsPre.
Type: Boolean
MySQLVersion:
Default: '5'
Description: 'The MySQL protocol version supported by DRDS. Valid values: 5 and
8. Default value: 5. This parameter is valid only when the primary instance
is created. The read-only instance is the same as the primary instance by default.'
Type: String
PayType:
AllowedValues:
- drdsPost
- drdsPre
Description: For the type of payment, see "Payment Type Parameter Table"
Type: String
PricingCycle:
AllowedValues:
- year
- month
Description: 'The unit of the order period, year: year, month: month. The parameter
takes effect when the payment type is drdsPre.'
Type: String
Specification:
Description: 'The example specification, for example, drds.sn1.4c8g.8C16G, consists
of the DRDS instance series (drds.sn1.4c8g) plus a specific example specification
(8C16G). For the DRDS instance specification value range, see: Distributed Relational
Database Service Specifications and Pricing'
Type: String
Tags:
Description: 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.
MaxLength: 20
Type: Json
Type:
AllowedValues:
- '0'
- '1'
- PRIVATE
- PUBLIC
Description: Instance type, instance type 0 - shared instance 1 - exclusive instance,
in addition, this parameter can also pass PRIVATE and PUBLIC to represent exclusive
instance and shared instance respectively
Type: String
VpcId:
Description: Virtual private network ID, must be specified when creating a DRDS
for VPC network type
Type: String
VswitchId:
Description: Virtual switch ID, must be specified when creating a DRDS for VPC
network type
Type: String
ZoneId:
Description: Availability zone, an available zone belongs to a certain zone, such
as Hangzhou Availability Zone A (cn-hangzhou-a) belongs to the region Hangzhou
(cn-hangzhou)
Type: String
Resources:
DrdsInstance:
Properties:
Description:
Ref: Description
Duration:
Ref: Duration
InstanceSeries:
Ref: InstanceSeries
IsAutoRenew:
Ref: IsAutoRenew
MySQLVersion:
Ref: MySQLVersion
PayType:
Ref: PayType
PricingCycle:
Ref: PricingCycle
Specification:
Ref: Specification
Tags:
Ref: Tags
Type:
Ref: Type
VpcId:
Ref: VpcId
VswitchId:
Ref: VswitchId
ZoneId:
Ref: ZoneId
Type: ALIYUN::DRDS::DrdsInstance
Outputs:
DrdsInstanceId:
Description: instance id
Value:
Fn::GetAtt:
- DrdsInstance
- DrdsInstanceId
InternetEndpoint:
Description: Public endpoint
Value:
Fn::GetAtt:
- DrdsInstance
- InternetEndpoint
IntranetEndpoint:
Description: VPC endpoint
Value:
Fn::GetAtt:
- DrdsInstance
- IntranetEndpoint
OrderId:
Description: order number
Value:
Fn::GetAtt:
- DrdsInstance
- OrderId
For more information, see DrdsInstance.json and DrdsInstance.yml.