All Products
Search
Document Center

Tair:DescribePrice

Last Updated:Feb 21, 2024

Queries the fees that you must pay when you create, upgrade, or renew an ApsaraDB for Redis instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
kvstore:DescribePrice
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
CapacitylongNo

The storage capacity of the instance. Unit: MB. This parameter is used only to query ApsaraDB for Redis Community Edition instances that are deployed in classic mode. We recommend that you use the InstanceClass parameter to specify an exact instance type.

Note If you specify the InstanceClass parameter, you do not need to specify the Capacity parameter.
1024
InstanceClassstringNo

The instance type.****

To view the instance type, perform the following steps:

  1. In the Overview topic, click the link in the Reference column corresponding to the instance type that you want to view.
  2. In the instance type table of the page that appears, find the instance type in the InstanceClass column.

When you query cloud-native cluster instances, you must set this parameter to one of the following values and use the Instances parameter to specify the instance type that you want to query.

  • ApsaraDB for Redis cluster instances: redis.cluster.sharding.common.ce
  • Tair DRAM-based cluster instances: tair.rdb.cluster.sharding.common
  • Tair persistent memory-based cluster instances: tair.scm.cluster.sharding.common.ce
redis.master.small.default
OrderTypestringYes

The order type. Valid values:

  • BUY: The order is used to purchase instances.
  • UPGRADE: The order is used to change the configurations of instances.
  • RENEW: The order is used to renew instances.
  • CONVERT: The order is used to change the billing methods of instances.
BUY
ZoneIdstringNo

The zone ID of the instance. You can call the DescribeZones operation to query the most recent zone list.

cn-hangzhou-e
ChargeTypestringNo

The billing method of the instance. Valid values:

  • PostPaid (default): pay-as-you-go
  • PrePaid: subscription
PostPaid
NodeTypestringNo

The node type. Valid values:

  • STAND_ALONE: standalone
  • MASTER_SLAVE (default): high availability (master-replica)
MASTER_SLAVE
PeriodlongNo

The subscription duration. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.

3
QuantitylongNo

The number of instances that you want to purchase. Valid values: 1 to 30. Default value: 1.

1
InstanceIdstringNo

The instance ID.

Note This parameter is required when the OrderType parameter is set to UPGRADE or RENEW.
r-bp1zxszhcgatnx****
InstancesstringNo

A JSON string that contains information about one or more cloud-native cluster instances. For more information, see the "Additional description of the Instances parameter" section of this topic.

Instances=[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.master.small.default","Period": "1","Quantity": "1","Capacity": "4096"}]
BusinessInfostringNo

The extended information such as the promotional event ID and business information.

000000000000
CouponNostringNo

The coupon code. Default value: youhuiquan_promotion_option_id_for_blank. This value indicates that no coupon code is available.

youhuiquan_promotion_option_id_for_blank
ForceUpgradebooleanNo

Specifies whether to forcefully change the configurations of the instance. Valid values:

  • false: forcefully changes the configurations.
  • true (default): does not forcefully change the configurations.
true
OrderParamOutstringNo

Specifies whether to return parameters related to the order. Valid values:

  • false (default)
  • true
true

Additional description of the Instances parameter

The following description applies only to the Instances parameter of the DescribePrice operation.

ParameterTypeRequiredExampleDescription
InstanceIdStringNor-7xv4s7q131smyx****The ID of the instance. This parameter is required if the OrderType parameter is set to UPGRADE or RENEW.
CapacityLongYes16384The storage capacity of the instance. Unit: MB.Description: You must specify either this parameter or InstanceClass.
InstanceClassStringYesredis.master.small.defaultThe instance type. For more information, see Overview .
IzNoStringYescn-hangzhou-bThe zone ID.
NodeTypeStringNoMASTER_SLAVEThe node type. Valid values:
  • STAND_ALONE: standalone
  • MASTER_SLAVE (default): high availability (master-replica)
PeriodLongNo1The subscription duration. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.
QuantityStringNo1The number of instances that you want to purchase. Valid values: 1 to 30. Default value: 1.
VPCIdStringNovpc-bp1nme44gek34slfc****The VPC ID.
VSwitchIdStringNovsw-bp1e7clcw529l773d****The vSwitch ID.
AutoPayStringNotrueSpecifies whether to enable automatic payment. Valid values:
  • true (default)
  • false
InstanceNameStringNotest_123The instance name.
ShardClassStringNotair.rdb.2gThe shard type. This parameter is applicable only to cloud-native cluster instances.
ShardCountStringNo2The number of shards. This parameter is applicable only to cloud-native cluster instances. You can use this parameter to customize the number of shards.
ReadOnlyCountIntegerNo2The total number of read replicas. This parameter is applicable only to read/write splitting instances that use cloud disks.

Sample requests with Instances configured

Sample request for querying a Tair cloud-native cluster instance:

{
  "RegionId": "cn-hangzhou",
  "OrderType": "BUY",
  "ChargeType": "PostPaid",
  "Instances": "[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-h", "ShardClass": "tair.rdb.with.proxy.2g", "ShardCount": "3", "Period": "1","Quantity": "1"}]",
  "ZoneId": "cn-hangzhou-h",
  "SourceIp": "192.168.0.1"
}

Sample request for querying multiple instances:

{
  "RegionId": "cn-hangzhou",
  "OrderType": "BUY",
  "ChargeType": "PrePaid",
  "Period": 1,
  "Instances": "[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.master.small.default","Period": "1","Quantity": "1"}{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.amber.logic.sharding.1g.2db.0rodb.6proxy.multithread","Period": "1","Quantity": "1"}]",
  "SourceIp": "192.168.0.1"
}

Response parameters

ParameterTypeDescriptionExample
object
OrderParamsstring

The parameters of the order. This parameter is returned when OrderParamOut is set to true.

String
RequestIdstring

The ID of the request.

3A40BE4E-1890-4972-889C-FEFA37663635
Orderobject

The information about the order.

OriginalAmountstring

The original price of the order.

0.21
HandlingFeeAmountstring

The service fees of the order.

0.1
Currencystring

The currency used for payment. A value of CNY is used when the order was generated on the China site (aliyun.com), and a value of USD is used when the order was generated on the international site (alibabacloud.com).

CNY
DiscountAmountstring

The discount amount of the order.

0.21
TradeAmountstring

The transaction price of the order.

10
Couponsobject []

Details about coupons.

IsSelectedstring

Indicates whether the coupon was selected.

true
CouponNostring

The coupon ID.

youhuiquan_promotion_option_id_for_blank
Namestring

The coupon name.

test
Descriptionstring

The description of the coupon.

coupondemo
RuleIdsarray

Details about promotion rule IDs.

string

The ID of the promotion rule.

1001199213
ShowDiscountInfoboolean

Indicates whether the discount information is displayed.

Rulesobject []

Details about promotion rules.

RuleDescIdlong

The ID of the rule.

1111111111
Titlestring

The title of the rule.

test
Namestring

The name of the promotion rule.

test
SubOrdersobject []

Details about rules that match the coupon.

OriginalAmountstring

The original price of the order.

0.21
InstanceIdstring

The instance ID.

r-bp1xxxxxxxxxxxxx
DiscountAmountstring

The discount amount of the order.

0.21
TradeAmountstring

The final price of the order.

10
RuleIdsarray

The rule IDs.

string

The ID of the hit rule.

RuleId: 1111111111

Examples

Sample success responses

JSONformat

{
  "OrderParams": "String",
  "RequestId": "3A40BE4E-1890-4972-889C-FEFA37663635",
  "Order": {
    "OriginalAmount": "0.21",
    "HandlingFeeAmount": "0.1",
    "Currency": "CNY",
    "DiscountAmount": "0.21",
    "TradeAmount": "10",
    "Coupons": {
      "Coupon": [
        {
          "IsSelected": "true",
          "CouponNo": "youhuiquan_promotion_option_id_for_blank",
          "Name": "test",
          "Description": "coupondemo"
        }
      ]
    },
    "RuleIds": {
      "RuleId": [
        "1001199213"
      ]
    },
    "ShowDiscountInfo": true
  },
  "Rules": {
    "Rule": [
      {
        "RuleDescId": 1111111111,
        "Title": "test",
        "Name": "test"
      }
    ]
  },
  "SubOrders": {
    "SubOrder": [
      {
        "OriginalAmount": "0.21",
        "InstanceId": "r-bp1xxxxxxxxxxxxx",
        "DiscountAmount": "0.21",
        "TradeAmount": "10",
        "RuleIds": {
          "RuleId": [
            "RuleId: 1111111111"
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError message
400MissingParameterPeriod is mandatory for this action.
400MissingParameterInstanceId is mandatory for this action.
400InvalidInstances.FormatThe Specified parameter Instances is not valid.
400AlreadyHadTemporaryBandwidthThis instance have already had temporary bandwidth, please modify instance spec first.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-18The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Output ParametersThe response structure of the API has changed.