ALIYUN::REDIS::PrepayInstance creates a subscription Tair (Redis) instance.
Syntax
{
"Type": "ALIYUN::REDIS::PrepayInstance",
"Properties": {
"VpcId": String,
"EvictionPolicy": String,
"Period": Integer,
"ZoneId": String,
"InstanceClass": String,
"VpcPasswordFree": Boolean,
"VSwitchId": String,
"SecurityGroupId": String,
"EngineVersion": String,
"Password": String,
"SSLEnabled": String,
"InstanceName": String,
"BackupPolicy": Map,
"Tags": List,
"InstanceMaintainTime": Map,
"DeletionForce": Boolean,
"AutoPay": Boolean,
"Connections": Map,
"AutoRenewDuration": Integer,
"ProductType": String,
"SecondaryZoneId": String,
"ResourceGroupId": String,
"PeriodUnit": String,
"TairConfig": Map,
"ShardCount": Integer,
"ReadOnlyCount": Integer,
"SubscriptionDeletionForce": Boolean,
"NodeType": String,
"DeletionProtection": Boolean
}
}
Parameters
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
AutoPay |
Boolean |
No |
No |
Whether to enable automatic payment. |
Valid values:
|
|
AutoRenewDuration |
Integer |
No |
Yes |
The auto-renewal period. |
Valid values: 1 to 12. Unit: month. The instance is automatically renewed for this duration before expiration. |
|
BackupPolicy |
Map |
No |
Yes |
The backup policy. |
|
|
Connections |
Map |
No |
Yes |
The endpoints of the instance. |
|
|
DeletionForce |
Boolean |
No |
Yes |
Whether to delete the instance immediately instead of moving it to the recycle bin. |
Valid values:
|
|
DeletionProtection |
Boolean |
No |
Yes |
Whether to enable deletion protection. |
Valid values:
|
|
EngineVersion |
String |
No |
Yes |
The database engine version. |
Valid values:
|
|
EvictionPolicy |
String |
No |
No |
The eviction policy. |
Valid values:
|
|
InstanceClass |
String |
No |
Yes |
The instance specification. |
|
|
InstanceMaintainTime |
Map |
No |
Yes |
The maintenance window of the instance. |
|
|
InstanceName |
String |
No |
Yes |
The instance name. |
Must be 2 to 128 characters. Must start with a letter or Chinese character. Can contain letters, digits, Chinese characters, underscores (_), hyphens (-), and periods (.). |
|
NodeType |
String |
No |
No |
The node type. |
Valid values:
Note
For cloud-native edition instances, select |
|
Password |
String |
No |
Yes |
The instance password. |
Must be 8 to 32 characters and include characters from at least three categories: uppercase letters, lowercase letters, digits, and special characters. Supported special characters: |
|
Period |
Integer |
No |
No |
The subscription duration. |
Valid values: 1 to 9, 12, 24, and 36. Unit: month. |
|
PeriodUnit |
String |
No |
No |
The unit of the subscription duration. |
Valid values:
|
|
ProductType |
String |
No |
No |
The product type. |
Valid values:
|
|
ReadOnlyCount |
Integer |
No |
No |
The number of read replicas in the primary availability zone. |
Note
The ReadOnlyCount parameter applies only to cloud-native edition instances for which the read/write splitting feature is enabled. If the instance uses the cluster architecture, this parameter specifies the number of read replicas per shard. |
|
ResourceGroupId |
String |
No |
Yes |
The ID of the resource group. |
No constraints. |
|
SecondaryZoneId |
String |
No |
Yes |
The ID of the secondary availability zone. |
Call the DescribeZones operation to query supported availability zone IDs. Note
Deploy primary and secondary nodes in different zones for cross-zone disaster recovery. |
|
SecurityGroupId |
String |
No |
Yes |
The ID of the security group. |
Up to 10 IDs, separated by commas (,). |
|
ShardCount |
Integer |
No |
No |
The number of shards. |
Valid values:
|
|
SSLEnabled |
String |
No |
Yes |
The SSL encryption state. |
Valid values:
|
|
SubscriptionDeletionForce |
Boolean |
No |
No |
Subscription instances only. Set to |
No constraints. |
|
Tags |
List |
No |
Yes |
The tags of the instance. |
Maximum 20 tags per instance. |
|
TairConfig |
Map |
No |
No |
The Tair configuration. |
|
|
VpcId |
String |
No |
No |
The ID of the VPC. |
No constraints. |
|
VpcPasswordFree |
Boolean |
No |
No |
Whether to enable password-free access within the VPC. |
Valid values:
|
|
VSwitchId |
String |
No |
No |
The ID of the vSwitch. |
No constraints. |
|
ZoneId |
String |
No |
No |
The ID of the availability zone. |
This parameter is required for instances in a VPC. To deploy an instance across multiple availability zones, use the DescribeZones operation to find supported zone IDs. |
BackupPolicy syntax
"BackupPolicy": {
"PreferredBackupPeriod": "String",
"PreferredBackupTime": "String",
"EnableBackupLog": "Integer"
}
BackupPolicy properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
PreferredBackupPeriod |
String |
Yes |
Yes |
The backup day of the week. |
Valid values:
|
|
PreferredBackupTime |
String |
Yes |
Yes |
The backup time window in UTC. |
Format: |
|
EnableBackupLog |
Integer |
No |
Yes |
Whether to enable incremental backup. |
Valid values:
|
InstanceMaintainTime syntax
"InstanceMaintainTime": {
"MaintainStartTime": "String",
"MaintainEndTime": "String"
}
InstanceMaintainTime properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
MaintainEndTime |
String |
No |
No |
The end time of the maintenance window. |
Format: Note
The end time must be exactly one hour after the start time. For example, if MaintainStartTime is |
|
MaintainStartTime |
String |
No |
No |
The start time of the maintenance window. |
Format: |
Tag syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tag properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraints |
|
Tag key |
String |
Yes |
No |
The tag key. |
The tag key must be unique within an account and region. |
|
Tag value |
String |
No |
No |
The tag value. |
None |
Connections syntax
"Connections": {
"VpcPrivateConnection": "Map",
"ClassicInnerConnection": "Map",
"DirectConnection": "Map",
"PublicConnection": "Map"
}
Connections
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
ClassicInnerConnection |
Map |
No |
Yes |
The classic network endpoint. |
|
|
DirectConnection |
Map |
No |
Yes |
The direct connection endpoint. |
|
|
PublicConnection |
Map |
No |
Yes |
The public endpoint. |
|
|
VpcPrivateConnection |
Map |
No |
Yes |
The VPC endpoint. |
VpcPrivateConnection
"VpcPrivateConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
VpcPrivateConnection properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
ConnectionPort |
Integer |
Yes |
Yes |
The port number for the ApsaraDB service on the instance. |
Valid values: 1024 to 65535. |
|
ConnectionString |
String |
No |
No |
The VPC endpoint prefix. |
The prefix must be 8 to 64 characters long, start with a lowercase letter, and contain only lowercase letters and digits. |
PublicConnection syntax
"PublicConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
Public connection properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
ConnectionPort |
Integer |
Yes |
Yes |
Service port of the ApsaraDB instance. |
Valid values: 1024 to 65535. |
|
ConnectionString |
String |
No |
Yes |
Public endpoint prefix. |
Must be 8 to 64 characters long, start with a lowercase letter, and contain only lowercase letters and digits. |
DirectConnection syntax
"DirectConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
DirectConnection properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
ConnectionPort |
Integer |
Yes |
Yes |
The service port of the ApsaraDB instance. |
Valid values: 1024 to 65535. |
|
ConnectionString |
String |
No |
Yes |
The prefix of the private endpoint. |
The prefix must be 8 to 64 characters long, start with a lowercase letter, and contain only lowercase letters and digits. |
ClassicInnerConnection syntax
"ClassicInnerConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
ClassicInnerConnection properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
ConnectionPort |
Integer |
Yes |
Yes |
The service port of the ApsaraDB instance. |
Valid values: 1024 to 65535. |
|
ConnectionString |
String |
No |
Yes |
The prefix of the classic network endpoint. |
The prefix must be 8 to 64 characters long, start with a lowercase letter, and contain only lowercase letters and digits. |
TairConfig syntax
"BackupPolicy": {
"Storage": "Integer",
"StorageType": "String",
"ShardCount": "Integer"
}
TairConfig properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
ShardCount |
Integer |
No |
No |
The number of data shards. |
Valid values:
|
|
Storage |
Integer |
No |
No |
The storage capacity of the cloud disk. |
Varies by instance specification. ESSD/SSD-based instances. |
|
StorageType |
String |
No |
No |
The storage type. |
Valid values:
|
Return values
Fn::GetAtt
-
InstanceId: The ID of the instance.
-
OrderId: The ID of the order.
-
ConnectionDomain: The endpoint used to access the instance.
-
Port: The port used to connect to the instance.
-
InstanceName: The name of the instance.
-
InstanceClass: The instance specifications.
-
VpcId: The ID of the VPC.
-
Capacity: The storage capacity of the instance.
-
InstanceType: The engine type of the instance.
-
ChargeType: The billing method of the instance.
-
PackageType: The plan type.
-
Connections: The maximum number of connections the instance supports.
-
ArchitectureType: The architecture type of the instance.
-
NodeType: The node type of the instance.
-
HasRenewChangeOrder: Whether the account has a pending renewal or scaling order.
-
ResourceGroupId: The ID of the resource group.
-
QPS: The theoretical queries per second (QPS) of the instance.
-
ZoneId: The ID of the instance's zone.
-
Bandwidth: The bandwidth of the instance. Unit: Mbps.
-
EngineVersion: The engine version of the instance.
-
NetworkType: The network type of the instance.
-
VSwitchId: The ID of the vSwitch.
-
PrivateIp: The private IP address of the instance.
-
PublicConnectionString: The public connection string of the instance.
-
VpcPrivateConnectionPort: The port used for a private connection to the instance within a VPC.
-
ClassicInnerConnectionString: The internal connection string for the instance over the classic network.
-
VpcPrivateConnectionString: The VPC private connection string of the instance.
-
PublicConnectionPort: The port used for a public connection to the instance.
-
DirectConnectionString: The direct connection string of the instance.
-
DirectConnectionPort: The port used for a direct connection to the instance.
-
ClassicInnerConnectionPort: The port used for an internal connection to the instance over the classic network.
Example
ROSTemplateFormatVersion: '2015-09-01'
Description: Test Create Redis PrepayInstance
Parameters:
InstanceClass:
Type: String
Description: Instance Class
VpcName:
Type: String
Default: mytest
VSwitchName:
Type: String
Default: mytest
ZoneId:
Type: String
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
EngineVersion:
Type: String
Description: 'AllowedValues: 2.8, 4.0, 5.0'
Default: '5.0'
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
VpcName:
Ref: VpcName
CidrBlock: 192.168.0.0/16
VSwitch:
DependsOn: Vpc
Type: ALIYUN::ECS::VSwitch
Properties:
VpcId:
Ref: Vpc
VSwitchName:
Ref: VSwitchName
ZoneId:
Ref: ZoneId
CidrBlock: 192.168.10.0/24
RedisPrepayInstance:
Type: ALIYUN::REDIS::PrepayInstance
Properties:
InstanceClass:
Ref: InstanceClass
EngineVersion:
Ref: EngineVersion
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
Outputs:
OrderId:
Value:
Fn::GetAtt:
- RedisPrepayInstance
- OrderId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Test Create Redis PrepayInstance",
"Parameters": {
"InstanceClass": {
"Type": "String",
"Description": "Instance Class"
},
"VpcName": {
"Type": "String",
"Default": "mytest"
},
"VSwitchName": {
"Type": "String",
"Default": "mytest"
},
"ZoneId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
},
"EngineVersion": {
"Type": "String",
"Description": "AllowedValues: 2.8, 4.0, 5.0",
"Default": "5.0"
}
},
"Resources": {
"Vpc": {
"Type": "ALIYUN::ECS::VPC",
"Properties": {
"VpcName": {
"Ref": "VpcName"
},
"CidrBlock": "192.168.0.0/16"
}
},
"VSwitch": {
"DependsOn": "Vpc",
"Type": "ALIYUN::ECS::VSwitch",
"Properties": {
"VpcId": {
"Ref": "Vpc"
},
"VSwitchName": {
"Ref": "VSwitchName"
},
"ZoneId": {
"Ref": "ZoneId"
},
"CidrBlock": "192.168.10.0/24"
}
},
"RedisPrepayInstance": {
"Type": "ALIYUN::REDIS::PrepayInstance",
"Properties": {
"InstanceClass": {
"Ref": "InstanceClass"
},
"EngineVersion": {
"Ref": "EngineVersion"
},
"VpcId": {
"Ref": "Vpc"
},
"VSwitchId": {
"Ref": "VSwitch"
}
}
}
},
"Outputs": {
"OrderId": {
"Value": {
"Fn::GetAtt": [
"RedisPrepayInstance",
"OrderId"
]
}
}
}
}