ALIYUN::REDIS::PrepayInstance

更新时间:
复制 MD 格式

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:

  • true: Enables automatic payment.

  • false (default): Disables automatic payment.

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.

BackupPolicy properties.

Connections

Map

No

Yes

The endpoints of the instance.

Connections properties.

DeletionForce

Boolean

No

Yes

Whether to delete the instance immediately instead of moving it to the recycle bin.

Valid values:

  • true: The instance is deleted immediately.

  • false (default): The instance is moved to the recycle bin.

DeletionProtection

Boolean

No

Yes

Whether to enable deletion protection.

Valid values:

  • true: Enabled

  • false: Disabled

EngineVersion

String

No

Yes

The database engine version.

Valid values:

  • 2.8

    Note

    This version is discontinued. Select another version.

  • 4.0

  • 5.0

EvictionPolicy

String

No

No

The eviction policy.

Valid values:

  • noeviction: Does not evict any keys, but returns an error for write operations.

  • allkeys-lru: Evicts the least recently used (LRU) keys first.

  • volatile-lru: Evicts the LRU keys only from keys that have an expiration time set.

  • allkeys-random: Evicts keys at random.

  • volatile-random: Removes random keys from among those with an expiration set.

  • volatile-ttl: Evicts keys with the shortest time to live (TTL) only from keys that have an expiration time set.

InstanceClass

String

No

Yes

The instance specification.

Instance specifications and FAQ.

InstanceMaintainTime

Map

No

Yes

The maintenance window of the instance.

InstanceMaintainTime properties.

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:

  • MASTER_SLAVE: high availability (master-replica).

  • STAND_ALONE: standalone.

  • double: master-replica.

  • single: standalone.

Note

For cloud-native edition instances, select MASTER_SLAVE or STAND_ALONE. For classic edition instances, select double or single.

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:

  • Year: year.

  • Month: month.

ProductType

String

No

No

The product type.

Valid values:

  • Local: Community Edition (local disk) or Performance-enhanced Edition (local disk) instances.

  • Tair_rdb: Performance-enhanced Edition (cloud disk) instances.

  • Tair_scm: Persistent Memory-optimized instances.

  • Tair_essd: Storage-optimized instances.

  • OnECS: Community Edition (cloud disk) instances.

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:

  • 1 (default): Standard architecture with a single shard.

  • 2 to 32: Cluster architecture with the specified number of shards.

SSLEnabled

String

No

Yes

The SSL encryption state.

Valid values:

  • Disable: SSL encryption is disabled.

  • Enable: SSL encryption is enabled.

  • Update: The SSL certificate is being updated.

SubscriptionDeletionForce

Boolean

No

No

Subscription instances only. Set to true to convert the instance to pay-as-you-go and delete it. Set to false to block deletion. This may incur fees.

No constraints.

Tags

List

No

Yes

The tags of the instance.

Maximum 20 tags per instance.

Tags properties.

TairConfig

Map

No

No

The Tair configuration.

TairConfig properties.

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:

  • true: Enabled

  • false (default): Disabled

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:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

PreferredBackupTime

String

Yes

Yes

The backup time window in UTC.

Format: HH:mmZ-HH:mmZ.

EnableBackupLog

Integer

No

Yes

Whether to enable incremental backup.

Valid values:

  • 1: Enables incremental backup.

  • 0 (default): Disables incremental backup.

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: HH:mmZ (UTC). For example, 23:00 (UTC+8) is specified as 15:00Z.

Note

The end time must be exactly one hour after the start time. For example, if MaintainStartTime is 17:00Z, MaintainEndTime must be 18:00Z.

MaintainStartTime

String

No

No

The start time of the maintenance window.

Format: HH:mmZ (UTC). For example, 22:00 (UTC+8) is specified as 14:00Z.

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.

ClassicInnerConnection properties.

DirectConnection

Map

No

Yes

The direct connection endpoint.

DirectConnection properties.

PublicConnection

Map

No

Yes

The public endpoint.

PublicConnection properties.

VpcPrivateConnection

Map

No

Yes

The VPC endpoint.

VpcPrivateConnection properties.

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:

  • 1 (default): Creates a standard architecture instance.

  • 2 to 32: Creates a cluster architecture instance.

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:

  • essd_pl0

  • essd_pl1

  • essd_pl2

  • essd_pl3

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"
        ]
      }
    }
  }
}