All Products
Search
Document Center

Compute Nest:GetServiceInstanceSubscriptionEstimateCost

Last Updated:Oct 23, 2025

Queries the estimated renewal cost of subscription resources in a privately deployed service instance. You can query the cost for all resources associated with a service instance ID, or for a specific set of resources.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

computenest:GetServiceInstanceSubscriptionEstimateCost

none

*ServiceInstance

acs:computenest:{#regionId}:{#accountId}:serviceinstance/{#ServiceInstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-hangzhou

ServiceInstanceId

string

Yes

The service instance ID.

si-d6ab3a63ccbb4b17****

OrderType

string

Yes

The order type. Valid value: Renewal.

Renewal

PeriodUnit

string

No

The unit of the renewal duration for all subscription resources of the service instance. This is the unit for the Period parameter. Valid values: Month and Year. Default value: Month.

Month

ClientToken

string

No

A client-generated token that ensures the idempotence of the request. The token must be unique for each request. It can contain only ASCII characters and cannot be longer than 64 characters.

123e4567-e89b-12d3-a456-426655440000

Period

integer

No

The renewal duration for all subscription resources of the service instance. The unit is specified by PeriodUnit.

1

ResourcePeriod

array<object>

No

The renewal configuration for the resources.

object

No

The renewal configuration for the resources.

ResourceArn

string

No

The Alibaba Cloud Resource Name (ARN) of the resource.

acs:ecs:cn-guangzhou:1361753504587228:instance/i-7xv9pgeqvhxg10jji3vd

PeriodUnit

string

No

The unit of the renewal duration for the resource. This is the unit for the Period parameter. Valid values: Month and Year. Default value: Month.

Month

Period

integer

No

The renewal duration. The unit is specified by PeriodUnit.

1

Response elements

Element

Type

Description

Example

object

Response data

RequestId

string

The request ID.

464C8CB6-A548-5206-B83C-D32A8E43EC21

ResourcePrices

array<object>

The list of resource price information.

array<object>

The resource price information.

ResourceArn

string

The ARN of the resource.

acs:ecs:cn-hongkong:1488317743351199:instance/i-j6c6f3lbky38o8rpeqw2

PeriodUnit

string

The unit of the renewal duration. This is the unit for the Period parameter. Valid values: Month and Year. Default value: Month.

Month

Period

integer

The renewal duration. The unit is specified by PeriodUnit.

1

OriginalAmount

number

The original price.

900

TradeAmount

number

The discounted price.

500

DiscountAmount

number

The discount.

100

Currency

string

The currency. Valid values:

  • CNY: Chinese Yuan.

  • USD: US Dollar.

  • JPY: Japanese Yen.

CNY

DetailInfos

array<object>

The price details of the pricing module.

object

OriginalAmount

number

The original price.

900

TradeAmount

number

The discounted price.

500

DiscountAmount

number

The discount.

100

Resource

string

The identifier of the pricing module.

instance

Rules

array<object>

The discount details.

object

The discount details.

Name

string

The name of the discount.

test

RuleDescId

integer

The discount ID.

1021199213

Description

string

The description of the discount.

test

Examples

Success response

JSON format

{
  "RequestId": "464C8CB6-A548-5206-B83C-D32A8E43EC21",
  "ResourcePrices": [
    {
      "ResourceArn": "acs:ecs:cn-hongkong:1488317743351199:instance/i-j6c6f3lbky38o8rpeqw2",
      "PeriodUnit": "Month",
      "Period": 1,
      "OriginalAmount": 900,
      "TradeAmount": 500,
      "DiscountAmount": 100,
      "Currency": "CNY",
      "DetailInfos": [
        {
          "OriginalAmount": 900,
          "TradeAmount": 500,
          "DiscountAmount": 100,
          "Resource": "instance"
        }
      ],
      "Rules": [
        {
          "Name": "test",
          "RuleDescId": 1021199213,
          "Description": "test"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.