All Products
Search
Document Center

Compute Nest:GetServiceProvisions

Last Updated:Oct 22, 2025

Retrieves the provisions of a service, such as its activation status and 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

computenest:GetServiceProvisions

get

*Service

acs:computenest:{#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-0efc0db451794bxxxxxx

ServiceVersion

string

No

The service version.

1

TemplateName

string

No

The template name.

ECS

TrialType

string

No

The usage type. Valid values:

  • Trial: The service supports trial use.

  • NotTrial: The service does not support trial use.

Trial

Parameters

object

No

The parameters for deploying the user instance.

{\"RegionId\":\"cn-hangzhou\",\"ZoneId\":\"cn-hangzhou-g\",\"EcsInstanceType\":\"ecs.g5.large\",\"InstancePassword\":\"xxxxxxxx\",\"PayType\":\"PostPaid\",\"PayPeriodUnit\":\"Month\",\"PayPeriod\":1}

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

8C27145F-C9F4-545D-A355-DCDDAD63D548

ServiceProvisions

array<object>

The service details.

array<object>

The service details.

ServiceName

string

The service name.

CS

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 as defined in the template. Valid values:

  • true: The service is automatically activated.

  • false: The service is manually activated.

true

RoleProvision

object

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

Roles

array<object>

The list of service roles.

array<object>

The list of service roles.

RoleName

string

The role name.

AliyunCSManagedVKRole

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 used to create the role.

ApiName

string

The API operation name.

CreateServiceLinkedRole

ApiProductId

string

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

rds

ApiType

string

The API type. Valid values:

  • Open: public API.

  • Inner: internal API.

Open

parameters

object

The API parameters. ${variable} indicates a dynamic parameter.

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

AuthorizationURL

string

The authorization URL for accessing the cloud resources of the service. This URL is returned if the role is not created.

https://ram.console.alibabacloud.com/role/authorization?request={"Services":[{"Service":"CS","Roles":[{"RoleName":"AliyunCSManagedVKRole","TemplateId":"AliyunCSManagedVKRole"},{"RoleName":"AliyunCSDefaultRole","TemplateId":"Default"}]}],"ReturnUrl":"https://cs.console.alibabacloud.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 Disabled or Unknown.

No permission

EnableURL

string

The URL for activating the Alibaba Cloud service.

Note

This parameter is returned when Status is set to Disabled.

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

CommodityProvisions

array<object>

The commodity details. Some services, such as ACS, require the activation of multiple commodities.

object

The commodity details. Some services, such as ACS, require the activation of multiple commodities.

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-intl.alibabacloud.com/?commodityCode=acs_postpaid_public_cn

Examples

Success response

JSON format

{
  "RequestId": "8C27145F-C9F4-545D-A355-DCDDAD63D548",
  "ServiceProvisions": [
    {
      "ServiceName": "CS",
      "Status": "Enabled",
      "AutoEnableService": true,
      "RoleProvision": {
        "Roles": [
          {
            "RoleName": "AliyunCSManagedVKRole",
            "Created": true,
            "Function": "Default",
            "ApiForCreation": {
              "ApiName": "CreateServiceLinkedRole",
              "ApiProductId": "rds",
              "ApiType": "Open",
              "parameters": {
                "ServiceLinkedRole": "AliyunServiceRoleForRdsPgsqlOnEcs",
                "RegionId": "${RegionId}"
              }
            }
          }
        ],
        "AuthorizationURL": "https://ram.console.alibabacloud.com/role/authorization?request={\"Services\":[{\"Service\":\"CS\",\"Roles\":[{\"RoleName\":\"AliyunCSManagedVKRole\",\"TemplateId\":\"AliyunCSManagedVKRole\"},{\"RoleName\":\"AliyunCSDefaultRole\",\"TemplateId\":\"Default\"}]}],\"ReturnUrl\":\"https://cs.console.alibabacloud.com/\"}"
      },
      "StatusReason": "No permission",
      "EnableURL": "https://common-buy-intl.alibabacloud.com/?commodityCode=sls",
      "CommodityProvisions": [
        {
          "CommodityCode": "acs_postpaid_public_cn",
          "Status": "Disabled",
          "EnableURL": "https://common-buy-intl.alibabacloud.com/?commodityCode=acs_postpaid_public_cn"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.