DATASOURCE::REDIS::InstanceClasses类型用于查询Redis实例规格。

语法

{
  "Type": "DATASOURCE::REDIS::InstanceClasses",
  "Properties": {
    "OrderType": String,
    "ZoneId": String,
    "ResourceGroupId": String,
    "InstanceId": String,
    "InstanceChargeType": String,
    "NodeId": String,
    "ProductType": String,
    "AcceptLanguage": String,
    "Engine": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
OrderType String 订单类型。 取值:
  • BUY:新购。
  • UPGRADE:升级实例规格配置。
  • DOWNGRADE:降级实例规格配置。
ZoneId String 可用区ID。 您可以调用DescribeZones接口查询支持的可用区。
ResourceGroupId String 资源组ID。
InstanceId String 实例ID。 当OrderType取值为UPGRADE或RENEW时,该参数有效且必须指定。
InstanceChargeType String 付费类型。 取值:
  • PrePaid:包年包月。
  • PostPaid(默认值):按量付费。
NodeId String 数据节点ID。 您可以调用DescribeLogicInstanceTopology接口查询数据节点ID。
说明 当您指定了InstanceId参数时,该参数有效。指定的实例需要是集群版或读写分离版。
ProductType String 产品类型。 取值:
  • Local:社区版(本地盘版)或企业版性能增强系列(本地盘版)。
  • Tair_rdb:企业版性能增强型(云盘版)。
  • Tair_scm:企业版持久内存型。
  • Tair_essd:企业版容量存储型。
  • OnECS:云盘社区标准版。
AcceptLanguage String 返回值的语言。 取值:
  • zh-CN(默认值):中文。
  • en-US:英文。
Engine String 引擎类型。 取值:
  • Redis
  • Memcache

返回数据(Fn::GetAtt)

  • InstanceClassIds:实例规格ID列表。
  • InstanceClasses:实例规格详情列表。
属性名称 类型 描述 约束
InstanceClassIds List 实例规格ID列表。
InstanceClasses List 实例规格详情列表。
ZoneId String 可用区ID。
InstanceClass String 实例规格。
SupportedNodeType List 节点类型。 取值:
  • single:单副本。
  • double:双副本。
ShardNumber String 分片数。
Architecture String 架构。 取值:
  • standard:标准架构。
  • cluster:集群架构。
  • rwsplit:读写分离架构。
Version String 引擎版本。
SeriesType String 系列。 取值:
  • enhanced_performance_type:性能增强型。
  • hybrid_storage:混合存储型。
EditionType String 实例类型。 取值:
  • Community:社区版。
  • Enterprise:企业版。
Engine String 引擎类型。 取值:
  • Redis
  • Memcache
Capacity Number 内存容量。 单位:MB。

示例

  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "OrderType": {
          "Type": "String",
          "Description": "The order type. Valid values:\nBUY: the orders that are used to purchase instances.\nUPGRADE: the orders that are used to upgrade instances.\nDOWNGRADE: the orders that are used to downgrade instances."
        },
        "ZoneId": {
          "Type": "String",
          "Description": "The ID of the zone where PolarDB resources that you want to query reside.\nNote You can call the DescribeRegions operation to query information about zones."
        },
        "ResourceGroupId": {
          "Type": "String",
          "Description": "The ID of the instance.\n Note This parameter is required only if the OrderType parameter is set to UPGRADE or RENEW."
        },
        "InstanceId": {
          "Type": "String",
          "Description": "The ID of the resource group. You can call the ListResourceGroups operation to query the IDs of resource groups.\n Note You can also query the IDs of resource groups in the Resource Management console. For more information, see View basic information about a resource group."
        },
        "InstanceChargeType": {
          "Type": "String",
          "Description": "The billing method. Valid values:\nPrePaid: subscription\nPostPaid: pay-as-you-go\nNote Default value: PrePaid.",
          "Default": "PrePaid"
        },
        "NodeId": {
          "Type": "String",
          "Description": "The ID of the data node for which you want to query available instance types. You can call the DescribeLogicInstanceTopology operation to query the ID of the data node. Remove the number sign (#) and the content that follows the number sign. For example, retain only r-bp10noxlhcoim2****-db-0.\n Note Before you set this parameter, you must set the InstanceId parameter to the ID of an instance in the cluster or read/write splitting architecture."
        },
        "ProductType": {
          "Type": "String",
          "Description": "The edition or series of instances. Valid values:\n Local: ApsaraDB for Redis Community Edition instances or performance-enhanced instances of ApsaraDB for Redis Enhanced Edition (Tair)\n Tair_scm: persistent memory-optimized instances\n Tair_essd: storage-optimized instances"
        },
        "AcceptLanguage": {
          "Type": "String",
          "Description": "The language of the return values. Valid values:\n zh-CN: Chinese. This is the default value.\n en-US: English."
        },
        "Engine": {
          "Type": "String",
          "Description": "The engine type. Valid values:\nRedis\nMemcache"
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::REDIS::InstanceClasses",
          "Properties": {
            "OrderType": {
              "Ref": "OrderType"
            },
            "ZoneId": {
              "Ref": "ZoneId"
            },
            "ResourceGroupId": {
              "Ref": "ResourceGroupId"
            },
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "InstanceChargeType": {
              "Ref": "InstanceChargeType"
            },
            "NodeId": {
              "Ref": "NodeId"
            },
            "ProductType": {
              "Ref": "ProductType"
            },
            "AcceptLanguage": {
              "Ref": "AcceptLanguage"
            },
            "Engine": {
              "Ref": "Engine"
            }
          }
        }
      },
      "Outputs": {
        "InstanceClasses": {
          "Description": "The list of instance classes.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "InstanceClasses"
            ]
          }
        },
        "InstanceClassIds": {
          "Description": "The list of db instance class ids.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "InstanceClassIds"
            ]
          }
        }
      }
    }
  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      AcceptLanguage:
        Description: "The language of the return values. Valid values:\n zh-CN: Chinese.\
          \ This is the default value.\n en-US: English."
        Type: String
      Engine:
        Description: 'The engine type. Valid values:
    
          Redis
    
          Memcache'
        Type: String
      InstanceChargeType:
        Default: PrePaid
        Description: 'The billing method. Valid values:
    
          PrePaid: subscription
    
          PostPaid: pay-as-you-go
    
          Note Default value: PrePaid.'
        Type: String
      InstanceId:
        Description: "The ID of the resource group. You can call the ListResourceGroups\
          \ operation to query the IDs of resource groups.\n Note You can also query the\
          \ IDs of resource groups in the Resource Management console. For more information,\
          \ see View basic information about a resource group."
        Type: String
      NodeId:
        Description: "The ID of the data node for which you want to query available instance\
          \ types. You can call the DescribeLogicInstanceTopology operation to query the\
          \ ID of the data node. Remove the number sign (#) and the content that follows\
          \ the number sign. For example, retain only r-bp10noxlhcoim2****-db-0.\n Note\
          \ Before you set this parameter, you must set the InstanceId parameter to the\
          \ ID of an instance in the cluster or read/write splitting architecture."
        Type: String
      OrderType:
        Description: 'The order type. Valid values:
    
          BUY: the orders that are used to purchase instances.
    
          UPGRADE: the orders that are used to upgrade instances.
    
          DOWNGRADE: the orders that are used to downgrade instances.'
        Type: String
      ProductType:
        Description: "The edition or series of instances. Valid values:\n Local: ApsaraDB\
          \ for Redis Community Edition instances or performance-enhanced instances of\
          \ ApsaraDB for Redis Enhanced Edition (Tair)\n Tair_scm: persistent memory-optimized\
          \ instances\n Tair_essd: storage-optimized instances"
        Type: String
      ResourceGroupId:
        Description: "The ID of the instance.\n Note This parameter is required only if\
          \ the OrderType parameter is set to UPGRADE or RENEW."
        Type: String
      ZoneId:
        Description: 'The ID of the zone where PolarDB resources that you want to query
          reside.
    
          Note You can call the DescribeRegions operation to query information about zones.'
        Type: String
    Resources:
      ExtensionDataSource:
        Properties:
          AcceptLanguage:
            Ref: AcceptLanguage
          Engine:
            Ref: Engine
          InstanceChargeType:
            Ref: InstanceChargeType
          InstanceId:
            Ref: InstanceId
          NodeId:
            Ref: NodeId
          OrderType:
            Ref: OrderType
          ProductType:
            Ref: ProductType
          ResourceGroupId:
            Ref: ResourceGroupId
          ZoneId:
            Ref: ZoneId
        Type: DATASOURCE::REDIS::InstanceClasses
    Outputs:
      InstanceClassIds:
        Description: The list of db instance class ids.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - InstanceClassIds
      InstanceClasses:
        Description: The list of instance classes.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - InstanceClasses