All Products
Search
Document Center

Compute Nest:GetServiceProvisions

Last Updated:Oct 22, 2025

Queries the activation status of a service and the information about its service roles.

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

computenestsupplier:GetServiceProvisions

get

*Service

acs:computenestsupplier:{#regionId}:{#accountId}:service/{#serviceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-hangzhou

ServiceId

string

Yes

The service ID.

service-20b8a396048346xxxxxx

ServiceVersion

string

No

The service version.

1

TemplateName

string

No

The template name.

模板1

Parameters

object

No

The parameters.

{\"RegionId\":\"cn-hangzhou\"}

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

DB1FA13E-1087-5654-84D5-58A0ACAD1B18

ServiceProvisions

array<object>

The details of the service.

object

The details of the service.

ServiceName

string

The service name.

db

Status

string

The activation status of the service. Valid values:

  • Enabled: The service is activated.

  • EnabledByDefault: The service is activated by default.

  • Disabled: The service is not activated.

  • Unknown: The activation status is unknown.

Enabled

AutoEnableService

boolean

Indicates whether the service is automatically activated. The service is automatically activated if it is defined in the template. Valid values:

  • true: The service is automatically activated.

  • false: The service must be manually activated.

true

RoleProvision

object

The information about the service roles. If this parameter is empty, no service roles are associated with the service.

Roles

array<object>

The list of service roles.

object

The list of service roles.

RoleName

string

The name of the role.

AliyunServiceRole

Created

boolean

Indicates whether the role is created. Valid values:

  • true: The role is created.

  • false: The role is not created.

true

Function

string

The purpose of the role. Default value: Default. This value indicates that the role is the default role for the service.

Default

ApiForCreation

object

The information about the API operation that is used to create the role.

ApiName

string

The name of the API operation.

GetServiceProvisions

ApiProductId

string

The ID of the product to which the API operation belongs.

ComputeNest

ApiType

string

The type of the API operation. Valid values:

  • Open: a public API operation.

  • Inner: an internal API operation.

Open

Parameters

object

The parameters of the API operation. Dynamic parameters are in the `${Variable}` format. The `${RegionId}` dynamic parameter is supported, which specifies the region.

{ "ServiceLinkedRole": "AliyunServiceRoleForRdsPgsqlOnEcs", "RegionId": "${RegionId}" }

AuthorizationURL

string

The URL for authorizing the service to access cloud resources. This parameter is returned if the role is not created.

https://ram.console.aliyun.com/role/authorization?request={"Services":[{"Service":"CS","Roles":[{"RoleName":"AliyunCSManagedVKRole","TemplateId":"AliyunCSManagedVKRole"},{"RoleName":"AliyunCSDefaultRole","TemplateId":"Default"}]}],"ReturnUrl":"https://cs.console.aliyun.com/"}

StatusReason

string

The reason why the Alibaba Cloud service is not activated or the activation status is unknown.

Note

This parameter is returned when Status is set to Unknown.

resource(Eip) import info missing

EnableURL

string

The URL for activating the Alibaba Cloud service.

Note

This parameter is returned when Status is set to Disabled.

https://common-buy.aliyun.com/?commodityCode=sls

CommodityProvisions

array<object>

The details of the commodity. Some services, such as ACS, require you to activate multiple commodities.

object

CommodityCode

string

The commodity code.

acs_postpaid_public_cn

Status

string

The activation status of the Alibaba Cloud service. Valid values:

  • Enabled: The service is activated.

  • Disabled: The service is not activated.

Disabled

EnableURL

string

The URL for activating the commodity.

https://common-buy.aliyun.com/?commodityCode=acs_postpaid_public_cn

Examples

Success response

JSON format

{
  "RequestId": "DB1FA13E-1087-5654-84D5-58A0ACAD1B18",
  "ServiceProvisions": [
    {
      "ServiceName": "db",
      "Status": "Enabled",
      "AutoEnableService": true,
      "RoleProvision": {
        "Roles": [
          {
            "RoleName": "AliyunServiceRole",
            "Created": true,
            "Function": "Default",
            "ApiForCreation": {
              "ApiName": "GetServiceProvisions",
              "ApiProductId": "ComputeNest",
              "ApiType": "Open",
              "Parameters": {
                "ServiceLinkedRole": "AliyunServiceRoleForRdsPgsqlOnEcs",
                "RegionId": "${RegionId}"
              }
            }
          }
        ],
        "AuthorizationURL": "https://ram.console.aliyun.com/role/authorization?request={\"Services\":[{\"Service\":\"CS\",\"Roles\":[{\"RoleName\":\"AliyunCSManagedVKRole\",\"TemplateId\":\"AliyunCSManagedVKRole\"},{\"RoleName\":\"AliyunCSDefaultRole\",\"TemplateId\":\"Default\"}]}],\"ReturnUrl\":\"https://cs.console.aliyun.com/\"}"
      },
      "StatusReason": "resource(Eip) import info missing",
      "EnableURL": "https://common-buy.aliyun.com/?commodityCode=sls",
      "CommodityProvisions": [
        {
          "CommodityCode": "acs_postpaid_public_cn",
          "Status": "Disabled",
          "EnableURL": "https://common-buy.aliyun.com/?commodityCode=acs_postpaid_public_cn\n"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.