ALIYUN::REDIS::Instance is used to create an ApsaraDB for Redis instance.
Syntax
{
"Type": "ALIYUN::REDIS::Instance",
"Properties": {
"VpcId": String,
"EvictionPolicy": String,
"BackupPolicy": Map,
"ZoneId": String,
"InstanceClass": String,
"InstanceMaintainTime": Map,
"Tags": List,
"VpcPasswordFree": Boolean,
"VSwitchId": String,
"SecurityGroupId": String,
"EngineVersion": String,
"SSLEnabled": String,
"Password": String,
"InstanceName": String,
"DeletionForce": Boolean,
"Connections": Map,
"ChargeType": String,
"Period": Integer,
"AutoRenewDuration": Integer,
"ProductType": String
"SecondaryZoneId": String,
"ResourceGroupId": String,
"PeriodUnit": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
EngineVersion | String | No | No | The version of the database engine. | Valid values:
|
InstanceClass | String | No | Yes | The specifications of the instance. | For more information, see Overview. |
InstanceMaintainTime | Map | No | Yes | The maintenance window of the instance. | None. |
Tags | List | No | No | The tags of the instance. | You can add up to 20 tags to each instance. For more information, see Tags properties. |
VpcPasswordFree | Boolean | No | No | Specifies whether to enable the password-free authentication feature when you access the instance in the virtual private cloud (VPC). | Default value: false. Valid values:
|
VpcId | String | No | No | The ID of the VPC in which the instance resides. | None. |
EvictionPolicy | String | No | No | The data eviction policy. | Valid values:
|
ZoneId | String | No | No | The ID of the zone in which the instance resides. | This property is required if the instance is created in a VPC. When you create a multi-zone instance, you can call the DescribeZones operation to query the IDs of zones in which you can create the instance. |
VSwitchId | String | No | No | The ID of the vSwitch in the VPC. | None. |
SecurityGroupId | String | No | Yes | The ID of the security group to which the instance belongs. | You can specify up to 10 security group IDs. Separate multiple security group IDs with commas (,). |
Password | String | No | No | The password that is used to access the instance. | The password must be 8 to 30 characters in length, and must contain uppercase letters, lowercase letters, and digits. |
SSLEnabled | String | No | Yes | The status of Secure Sockets Layer (SSL) encryption. | Valid values:
|
InstanceName | String | No | Yes | The name of the instance. | The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), hyphens (-), and periods (.). The name must start with a letter. |
DeletionForce | Boolean | No | Yes | Specifies whether to delete the instance when the instance is reclaimed. | Default value: false. Valid values:
|
Connections | Map | No | Yes | The endpoints of the instance. | For more information, see Connections properties. |
BackupPolicy | Map | No | Yes | The backup policy. | For more information, see BackupPolicy properties. |
ChargeType | String | No | No | The billing method of the instance. | Default value: PostPaid. Valid values:
|
Period | Integer | No | No | The billing cycle of the instance. | Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, and 60. Unit: months. |
AutoRenewDuration | Integer | No | Yes | The auto-renewal period. | Valid values: 1 to 12. Unit: months. When the instance is about to expire, the system enables auto-renewal based on the period that is specified by this property. Note This property takes effect if you set the ChargeType property to PrePaid. |
ProductType | String | No | No | The edition or series of the instance. | Valid values:
|
SecondaryZoneId | String | No | No | The ID of the secondary zone. | You can call the DescribeZones operation to query the zone ID. Note If you specify this property, the master node and replica node of the instance can be deployed in different zones, and disaster recovery is implemented across zones. The instance can withstand failures in data centers. |
ResourceGroupId | String | No | Yes | The ID of the resource group. | None. |
PeriodUnit | String | No | No | The unit of the billing cycle. | Valid values:
|
BackupPolicy syntax
"BackupPolicy": {
"PreferredBackupPeriod": "String",
"PreferredBackupTime": "String",
"EnableBackupLog": "Integer"
}
BackupPolicy properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
PreferredBackupPeriod | String | Yes | Yes | The days on which backups are performed. | Valid values:
|
PreferredBackupTime | String | Yes | Yes | The backup window. | Specify the window in the HH:mmZ-HH:mmZ format. |
EnableBackupLog | Integer | No | Yes | Specifies whether to enable incremental backup. | Default value: 0. Valid values:
|
InstanceMaintainTime syntax
"InstanceMaintainTime": {
"MaintainStartTime": "String",
"MaintainEndTime": "String"
}
InstanceMaintainTime properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
MaintainStartTime | String | No | No | The start time of the maintenance window. | Specify the time in the HH:mmZ format. The time must be in UTC. For example, if you want the maintenance window to start at 01:00 (UTC+8), set this property to 17:00Z . |
MaintainEndTime | String | No | No | The end time of the maintenance window. | Specify the time in the HH:mmZ format. The time must be in UTC. For example, if you want the maintenance window to end at 02:00 (UTC+8), set this property to 18:00Z . Note The end time must be one hour later than the start time. For example, if the MaintainStartTime property is set to 17:00Z , the MaintainEndTime property must be set to 18:00Z . |
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Key | String | Yes | No | The key of the tag. | Each tag key must be unique within an Alibaba Cloud account in a region. |
Value | String | No | No | The value of the tag. | None. |
Connections syntax
"Connections": {
"VpcPrivateConnection": "Map",
"ClassicInnerConnection": "Map",
"DirectConnection": "Map",
"PublicConnection": "Map"
}
Connections properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
VpcPrivateConnection | Map | No | Yes | The VPC endpoint. | For more information, see VpcPrivateConnection properties. |
ClassicInnerConnection | Map | No | Yes | The classic network endpoint. | For more information, see ClassicInnerConnection properties. |
DirectConnection | Map | No | Yes | The private endpoint. If your instance is a cluster instance, you can request a private endpoint based on your business requirements. | For more information, see DirectConnection properties. |
PublicConnection | Map | No | Yes | The public endpoint. | For more information, see PublicConnection properties. |
VpcPrivateConnection syntax
"VpcPrivateConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
VpcPrivateConnection properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ConnectionPort | Integer | Yes | Yes | The port number used by the ApsaraDB for Redis instance to provide services. | Valid values: 1024 to 65535. |
ConnectionString | String | Yes | Yes | The prefix of the VPC endpoint. | The prefix must be 8 to 64 characters in length, and can contain lowercase letters and digits. The prefix must start with a lowercase letter. |
PublicConnection syntax
"PublicConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
PublicConnection properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ConnectionPort | Integer | Yes | Yes | The port number used by the ApsaraDB for Redis instance to provide services. | Valid values: 1024 to 65535. |
ConnectionString | String | Yes | Yes | The prefix of the public endpoint. | The prefix must be 8 to 64 characters in length, and can contain lowercase letters and digits. The prefix must start with a lowercase letter. |
DirectConnection syntax
"DirectConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
DirectConnection properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ConnectionPort | Integer | Yes | Yes | The port number used by the ApsaraDB for Redis instance to provide services. | Valid values: 1024 to 65535. |
ConnectionString | String | Yes | Yes | The prefix of the private endpoint. | The prefix must be 8 to 64 characters in length, and can contain lowercase letters and digits. The prefix must start with a lowercase letter. |
ClassicInnerConnection syntax
"ClassicInnerConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
ClassicInnerConnection properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ConnectionPort | Integer | Yes | Yes | The port number used by the ApsaraDB for Redis instance to provide services. | Valid values: 1024 to 65535. |
ConnectionString | String | Yes | Yes | The prefix of the classic network endpoint. | The prefix must be 8 to 64 characters in length, and can contain lowercase letters and digits. The prefix must start with a lowercase letter. |
Return values
Fn::GetAtt
- InstanceId: the ID of the instance.
- OrderId: the order ID of the instance.
- ConnectionDomain: the private endpoint that is used to connect to the instance.
- Port: the port number used by the ApsaraDB for Redis instance to provide services.
- InstanceName: the name of the instance.
- InstanceClass: the specifications of the instance.
- VpcId: the ID of the VPC.
- Capacity: the storage capacity of the instance.
- InstanceType: the database engine of the instance.
- ChargeType: the billing method of the instance.
- PackageType: the type of the resource plan.
- Connections: the maximum number of connections that are supported by the instance.
- ArchitectureType: the architecture type of the instance.
- NodeType: the node type of the instance.
- HasRenewChangeOrder: indicates whether the instance has pending renewal or resource scaling orders within the Alibaba Cloud account.
- ResourceGroupId: the ID of the resource group.
- QPS: the queries per second (QPS). The value indicates the expected QPS.
- ZoneId: the ID of the zone in which the instance resides.
- Bandwidth: the bandwidth of the instance. Unit: Mbit/s.
- EngineVersion: the database 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 prefix of the public endpoint that is used to access the instance.
- VpcPrivateConnectionPort: the port number that allows you to access the instance by using the VPC endpoint.
- ClassicInnerConnectionString: the prefix of the classic network endpoint that is used to access the instance.
- VpcPrivateConnectionString: the prefix of the VPC endpoint that is used to access the instance.
- PublicConnectionPort: the port number that allows you to access the instance by using the public endpoint.
- DirectConnectionString: the prefix of the private endpoint that is used to access the instance in direct connection mode.
- DirectConnectionPort: the port number that allows you to access the instance by using the private endpoint in direct connection mode.
- ClassicInnerConnectionPort: the port number that allows you to access the instance by using the classic network endpoint.
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Description": { }, "Parameters": { "VpcId": { "Type": "String", "AssociationProperty": "ALIYUN::ECS::VPC::VPCId" }, "ZoneId": { "Type": "String", "Description": { "en": "Before you create an instance, confirm that the Availability Zone supports the specifications of Redis resources." }, "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId", "Label": { "en": "Zone ID", } }, "VSwitchId": { "Type": "String", "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId", "AssociationPropertyMetadata": { "VpcId": "${VpcId}", "ZoneId": "${ZoneId}" } } }, "Resources": { "RedisInstance": { "Type": "ALIYUN::REDIS::Instance", "Properties": { "VpcId": { "Ref": "VpcId" }, "VSwitchId": { "Ref": "VSwitchId" }, "InstanceClass": "redis.master.small.default", "EvictionPolicy": "noeviction", "ZoneId": { "Ref": "ZoneId" }, "InstanceName": "DefaultRedis", "Password": "Admin@123!" } } }, "Outputs": { "InstanceId": { "Value": { "Fn::GetAtt": [ "RedisInstance", "InstanceId" ] } } } }
For more examples, visit Instance.json and Instance.yml. In the examples, the ALIYUN::REDIS::Instance, ALIYUN::REDIS::Whitelist, and ALIYUN::REDIS::Account resource types are used.