ALIYUN::REDIS::PrepayInstance is used to create a subscription ApsaraDB for Redis instance.

Syntax

{
  "Type": "ALIYUN::REDIS::PrepayInstance",
  "Properties": {
    "VpcId": String,
    "Capacity": Integer,
    "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
  }
}

Properties

Property Type Required Editable Description Constraint
EngineVersion String No No The version of the database engine. Valid values:
  • 2.8
    Note This version is unavailable. Use another version.
  • 4.0
  • 5.0
VpcId String No No The ID of the virtual private cloud (VPC). None.
Capacity Integer No No The storage capacity of the instance. You must specify the Capacity or InstanceClass property.
EvictionPolicy String No No The policy based on which the system evicts data. Valid values:
  • noeviction: does not evict keys, but returns an error for write operations.
  • allkeys-lru: evicts least recently used (LRU) keys.
  • volatile-lru: evicts LRU keys from keys that have Time To Live (TTL) configured.
  • allkeys-random: evicts keys at random.
  • volatile-random: evicts keys at random from keys that have TTL configured.
  • volatile-ttl: evicts keys with the shortest TTL from keys that have TTL configured.
Period Integer No No The renewal period of the subscription instance. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.

Unit: months.

ZoneId String No No The ID of the zone.

When you create the instance in a VPC, you must specify this property.

If you create an instance across zones, you can call the DescribeZones operation to query the IDs of available zones.

InstanceClass String No Yes The specifications of the instance. For more information, see Overview.
VSwitchId String No No The ID of the vSwitch. None.
SecurityGroupId String No Yes The ID of the security group. You can specify up to 10 security group IDs. Separate multiple security group IDs with commas (,).
VpcPasswordFree Boolean No No Specifies whether to enable password-free access to an instance that is created in a VPC. Default value: false. Valid values:
  • true: enables password-free access.
  • false: disables password-free access.
Password String No No The password that is used to access the instance. The password must be 8 to 32 characters in length. The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! @ # $ % ^ & ∗ () _ + - =.
SSLEnabled String No Yes The status of SSL encryption. Valid values:
  • Disable: disables SSL encryption.
  • Enable: enables SSL encryption.
  • Update: updates SSL certificates.
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.
BackupPolicy Map No Yes The backup policy. For more information, see BackupPolicy properties.
Tags List No No The tags. You can add up to 20 tags to an instance.

For more information, see Tags properties.

AutoPay Boolean No No Specifies whether to enable auto-renewal for the instance. Default value: false. Valid values:
  • true: The system automatically renews the instance.
  • false: You perform operations to renew the instance.
InstanceMaintainTime Map No Yes The maintenance window of the instance. For more information, see InstanceMaintainTime properties.
DeletionForce Boolean No Yes Specifies whether to delete the instance when the instance is moved to the recycle bin. Default value: false. Valid values:
  • true: deletes the instance when the instance is moved to the recycle bin.
  • false: retains the instance when the instance is moved to the recycle bin.
Connections Map No Yes The maximum number of connections that are supported by the instance. For more information, see Connections properties.
AutoRenewDuration Integer No Yes The auto-renewal period. Valid values: 1 to 12.

Unit: months.

When an instance is about to expire, the system automatically renews the instance based on the duration that is specified by this property.

BackupPolicy syntax

"BackupPolicy": {
  "PreferredBackupPeriod": "String",
  "PreferredBackupTime": "String",
  "EnableBackupLog": "Integer"
}

BackupPolicy properties

Property Type Required Editable Description Constraint
PreferredBackupPeriod String Yes Yes The day on which the system backs up data. Valid values:
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
PreferredBackupTime String Yes Yes The time at which the system backs up data. Specify the time in the HH:mmZ-HH:mmZ format.
EnableBackupLog Integer No Yes Specifies whether to enable incremental backup. Default value: 0. Valid values:
  • 1: enables incremental backup.
  • 0: disables incremental backup.

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 22:00 (UTC+8), set this property to 14: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 23:00 (UTC+8), set this property to 15:00Z.
Note The end time must be one hour later than the start time. For example, if you set the MaintainStartTime property to 17:00Z, you must set the MaintainEndTime property 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 for the direct connection mode. You can apply for the 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 of the ApsaraDB for Redis instance. 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 of the ApsaraDB for Redis instance. 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 of the ApsaraDB for Redis instance. Valid values: 1024 to 65535.
ConnectionString String Yes Yes The prefix of the private endpoint for the direct connection mode. 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 of the ApsaraDB for Redis instance. 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 ID of the order.
  • ConnectionDomain: the endpoint that is used to connect to the instance.
  • Port: the port number of the instance.
  • 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 type of the database engine that the instance uses.
  • ChargeType: the billing method of the instance.
  • PackageType: the type of the plan.
  • Connections: the maximum number of connections that are supported by the instance.
  • ArchitectureType: the type of the architecture.
  • NodeType: the type of the node.
  • HasRenewChangeOrder: indicates whether the instance has pending renewal or resource scaling orders within the current Alibaba Cloud account.
  • ResourceGroupId: the ID of the resource group.
  • QPS: the queries per second (QPS). The value is set to the expected maximum QPS.
  • ZoneId: the ID of the zone in which the instance is deployed.
  • Bandwidth: the bandwidth of the instance. Unit: Mbit/s.
  • EngineVersion: the version of the database engine that the instance uses.
  • 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 through the direct connection mode.
  • DirectConnectionPort: the port number that allows you to access the instance by using the private endpoint through the 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": "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"
        ]
      }
    }
  }
}

To view more examples, visit Instance.json and Instance.yml.