All Products
Search
Document Center

Resource Orchestration Service:GetServiceProvisions

Last Updated:Aug 13, 2025

Queries the activation status of an Alibaba Cloud service and information about its service-linked roles.

Operation description

Usage notes

This topic provides an example of how to query the activation status of Elastic High Performance Computing (EHPC) and information about the service-linked roles for EHPC in the China (Hangzhou) region.

Note

Make sure that you have the permissions to call the GetRole operation.

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

ros:GetServiceProvisions

list

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-hangzhou

TemplateBody

string

No

The structure of the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body exceeds the upper limit, we recommend to use the HTTP POST + Body Param method to pass the parameter in the request body to avoid request failures caused by an excessively long URL.

Note

You can specify only one of the TemplateBody, TemplateURL, TemplateId, and Services parameters.

ROSTemplateFormatVersion: '2015-09-01'\r\nResources:\r\n Vpc:\r\n Type: ALIYUN::ECS::VPC\r\n Properties:\r\n CidrBlock: 192.168.0.0/24\r\n VpcName: TestVpc

TemplateURL

string

No

The URL of the file that contains the template body. The URL must point to a template that is located on an HTTP or HTTPS web server or in an Object Storage Service (OSS) bucket. The template body must be 1 to 524,288 bytes in length. Examples of OSS URLs: oss://ros/template/demo and oss://ros/template/demo?RegionId=cn-hangzhou. If you do not specify the region ID of the OSS bucket, the value of the RegionId parameter is used.

You can specify only one of the TemplateBody, TemplateURL, TemplateId, and Services parameters.

oss://ros-template/demo

TemplateId

string

No

The template ID. This parameter applies to shared and private templates.

You can specify only one of the TemplateBody, TemplateURL, TemplateId, and Services parameters.

5ecd1e10-b0e9-4389-a565-e4c15efc****

TemplateVersion

string

No

The version of the template. If you do not specify this parameter, the latest version is used.

This parameter takes effect only when you specify TemplateId.

v1

Parameters

array<object>

No

The parameters.

object

No

ParameterKey

string

Yes

The name of the parameter. If you do not specify the name and value of a parameter, Resource Orchestration Service (ROS) uses the default name and value that are specified in the template.

Note

Parameters is optional. If you specify Parameters, you must specify ParameterKey.

Amount

ParameterValue

string

Yes

The value of the parameter.

Note

Parameters is optional. If you specify Parameters, you must specify ParameterValue.

12

Services

array<object>

No

The list of Alibaba Cloud services.

object

No

ServiceName

string

Yes

The name of the Alibaba Cloud service. Valid values:

  • AHAS: Application High Availability Service.

  • ARMS: Application Real-Time Monitoring Service.

  • ApiGateway: API Gateway.

  • BatchCompute: Batch Compute.

  • BrainIndustrial: Industrial Intelligence.

  • CloudStorageGateway: Cloud Storage Gateway.

  • CMS: Cloud Monitor.

  • CR: Container Registry.

  • CS: Container Service.

  • DCDN: DCDN.

  • DataHub: DataHub.

  • DataWorks: DataWorks.

  • EDAS: Enterprise Distributed Application Service.

  • EHPC: Elastic High Performance Computing.

  • EMAS: Enterprise Mobile Application Studio.

  • FC: Function Compute.

  • FNF: CloudFlow.

  • MaxCompute: MaxCompute.

  • SMQ: Simple Message Queue (formerly MNS).

  • HBR: Cloud Backup.

  • IMM: Intelligent Media Management.

  • IOT: IoT Platform.

  • KMS: Key Management Service.

  • NAS: File Storage NAS.

  • NLP: Natural Language Processing.

  • OSS: Object Storage Service.

  • OTS: Tablestore.

  • PrivateLink: PrivateLink.

  • PrivateZone: PrivateZone.

  • RocketMQ: Message Queue for Apache RocketMQ.

  • SAE: Serverless App Engine.

  • SLS: Simple Log Service.

  • TrafficMirror: Traffic Mirroring.

  • VS: Video Surveillance.

  • Xtrace: Tracing Analysis.

EHPC

For information about common request parameters, refer to Common parameters.

Response parameters

Parameter

Type

Description

Example

object

RequestId

string

The request ID.

A9938C04-26AD-5EFA-B394-EA7866842DFF

ServiceProvisions

array<object>

The details of the Alibaba Cloud services.

object

ServiceName

string

The name of the Alibaba Cloud service.

EHPC

Status

string

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

  • Enabled: The service is activated.

  • Disabled: The service is not activated.

  • Unknown: The activation status is unknown.

Enabled

StatusReason

string

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

Note

This parameter is returned only when the value of Status is Disabled or Unknown.

No permission.

AutoEnableService

boolean

Indicates whether the service is automatically activated when the template is used to create a stack. Valid values:

  • true: The service is automatically activated.

  • false: The service is not automatically activated.

false

EnableURL

string

The URL that you can use to activate the Alibaba Cloud service.

Note

This parameter is returned only when the value of Status is Disabled.

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

RoleProvision

object

The information about the service-linked roles of the Alibaba Cloud service. If this parameter is empty, no service-linked role is associated with the service.

AuthorizationURL

string

The URL that you can use to grant permissions to the service-linked role.

Note

This parameter is returned only when the value of Created is false.

https://ehpc.console.aliyun.com/

Roles

array<object>

The service-linked roles.

object

RoleName

string

The name of the service-linked role.

AliyunServiceRoleForEHPC

Created

boolean

Indicates whether the service-linked role is created. Valid values:

  • true: The service-linked role is created.

  • false: The service-linked 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 of the service.

Default

ApiForCreation

object

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

ApiProductId

string

The ID of the Alibaba Cloud service to which the API operation belongs.

rds

ApiName

string

The name of the API operation.

CreateServiceLinkedRole

ApiType

string

The type of the API operation. Valid values:

  • Open: an Alibaba Cloud API operation.

  • Inner: an internal API operation.

Open

Parameters

object

The parameters of the API operation. The value of a parameter is a dynamic value. The following dynamic value is supported: ${RegionId}, which indicates the region ID.

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

DependentServiceNames

array

The services on which the service that you want to query depends.

string

The name of the service on which the service that you want to query depends.

NAS

CommodityProvisions

array<object>

The details of the commodity. Some services, such as Container Compute Service (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": "A9938C04-26AD-5EFA-B394-EA7866842DFF",
  "ServiceProvisions": [
    {
      "ServiceName": "EHPC",
      "Status": "Enabled",
      "StatusReason": "No permission.",
      "AutoEnableService": false,
      "EnableURL": "https://common-buy.aliyun.com/?commodityCode=nas",
      "RoleProvision": {
        "AuthorizationURL": "https://ehpc.console.aliyun.com/",
        "Roles": [
          {
            "RoleName": "AliyunServiceRoleForEHPC",
            "Created": true,
            "Function": "Default",
            "ApiForCreation": {
              "ApiProductId": "rds",
              "ApiName": "CreateServiceLinkedRole",
              "ApiType": "Open",
              "Parameters": {
                "ServiceLinkedRole": "AliyunServiceRoleForRdsPgsqlOnEcs",
                "RegionId": "${RegionId}"
              }
            }
          }
        ]
      },
      "DependentServiceNames": [
        "NAS"
      ],
      "CommodityProvisions": [
        {
          "CommodityCode": "acs_postpaid_public_cn",
          "Status": "Disabled",
          "EnableURL": "https://common-buy.aliyun.com/?commodityCode=acs_postpaid_public_cn"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.