全部產品
Search
文件中心

:DATASOURCE::REDIS::InstanceClasses

更新時間:Nov 26, 2024

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,
    "RefreshOptions": 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

RefreshOptions

String

當資源棧更新時,資料來源資源的重新整理策略。

有效值:

  • Never(預設值):更新堆棧時,從不重新整理資料來源資源。

  • Always:更新堆棧時,始終重新整理資料來源資源。

返回資料(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。

樣本

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