All Products
Search
Document Center

Resource Orchestration Service:GetServiceProvisions

Last Updated:Sep 12, 2024

Queries the activation status and the RAM roles of an Alibaba Cloud service.

Operation description

Description

This topic describes how to query the activation status and the RAM roles of an Alibaba Cloud service. In this example, the Elastic High Performance Computing (E-HPC) service that is deployed in the China (Hangzhou) region is queried.

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

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
ros:GetServiceProvisionslist
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
TemplateBodystringNo

The structure that contains 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 that you add parameters to the HTTP POST request body to prevent request failures caused by excessively long URLs. You must and can specify only one of the following parameters: TemplateBody, TemplateURL, TemplateId, and TemplateScratchId.

{"ROSTemplateFormatVersion": "2015-09-01","Resources": {"ApiGateway": {"Type": "ALIYUN::ApiGateway::Group","Properties": { "GroupName": "ros_example" }},"FC": {"Type": "ALIYUN::FC::Service","Properties": {"ServiceName": "ros_example"}}}}
TemplateURLstringNo

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, such as oss://ros/template/demo or oss://ros/template/demo?RegionId=cn-hangzhou. The template body must be 1 to 524,288 bytes in length. If you do not specify the region ID of the OSS bucket, the value of RegionId is used.

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

oss://ros-template/demo
TemplateIdstringNo

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

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

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

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

This parameter takes effect only when TemplateId is specified.

v1
Parametersarray<object>No

The parameters.

objectNo
ParameterKeystringYes

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 The Parameters parameter is optional. If you specify Parameters, you must specify ParameterKey.
Amount
ParameterValuestringYes

The value of the parameter.

Note The Parameters parameter is optional. If you specify Parameters, you must specify ParameterValue.
12
Servicesarray<object>No

The services.

objectNo
ServiceNamestringYes

The name of the service or feature. Valid values:

  • AHAS: Application High Availability Service
  • ARMS: Application Real-Time Monitoring Service (ARMS)
  • ApiGateway: API Gateway
  • BatchCompute: Batch Compute
  • BrainIndustrial: Industrial Brain
  • CloudStorageGateway: Cloud Storage Gateway (CSG)
  • CMS: CloudMonitor
  • CR: Container Registry
  • CS: Container Service for Kubernetes (ACK)
  • DCDN: Dynamic Content Delivery Network (DCDN)
  • DataHub: DataHub
  • DataWorks: DataWorks
  • EDAS: Enterprise Distributed Application Service (EDAS)
  • EHPC: E-HPC
  • EMAS: Enterprise Mobile Application Studio (EMAS)
  • FC: Function Compute
  • FNF: CloudFlow (SWF)
  • MaxCompute: MaxCompute
  • MNS: Message Service (MNS)
  • HBR: Cloud Backup
  • IMM: Intelligent Media Management (IMM)
  • IOT: IoT Platform
  • KMS: Key Management Service (KMS)
  • NAS: Apsara File Storage NAS (NAS)
  • NLP: Natural Language Processing (NLP)
  • OSS: Object Storage Service (OSS)
  • OTS: Tablestore
  • PrivateLink: PrivateLink
  • PrivateZone: Alibaba Cloud DNS PrivateZone
  • RocketMQ: ApsaraMQ for RocketMQ
  • SAE: Serverless App Engine (SAE)
  • SLS: Simple Log Service (SLS)
  • TrafficMirror: traffic mirroring
  • VS: Video Surveillance System
  • Xtrace: Managed Service for OpenTelemetry
EHPC

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

A9938C04-26AD-5EFA-B394-EA7866842DFF
ServiceProvisionsarray<object>

The information about the services.

object
ServiceNamestring

The service name.

EHPC
Statusstring

The activation status of the service. Valid values:

  • Enabled: The service is activated.
  • Disabled: The service is not activated.
  • Unknown: The activation status of the service is unknown.
Enabled
StatusReasonstring

The reason why the service is in the Disabled or Unknown state.

Note This parameter is returned if Status is set to Disabled or Unknown.
No permission.
AutoEnableServiceboolean

Indicates whether automatic activation for the service is defined in the template. Valid values:

  • true: Automatic activation for the service is defined in the template.
  • false: Manual activation for the service is defined in the template.
false
EnableURLstring

The URL that points to the activation page of the service.

Note This parameter is returned if Status is set to Disabled.
https://common-buy.aliyun.com/?commodityCode=nas
RoleProvisionobject

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

AuthorizationURLstring

The authorization URL of the RAM role.

Note This parameter is returned if Created is set to false.
https://ehpc.console.aliyun.com/
Rolesarray<object>

The RAM roles of the service.

object
RoleNamestring

The name of the role.

AliyunServiceRoleForEHPC
Createdboolean

Indicates whether the RAM role is created. Valid values:

  • true
  • false
true
Functionstring

The purpose for which the RAM role is used. Default value: Default. A value of Default indicates that the RAM role is the default role of the service.

Default
ApiForCreationobject

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

ApiProductIdstring

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

rds
ApiNamestring

The name of the API operation.

CreateServiceLinkedRole
ApiTypestring

The type of the API operation. Valid values:

  • Open: public
  • Inner: private
Open
Parametersobject

The parameters of the API operation. If a parameter is a variable, use the ${Variable name} format. Only the following variable is supported: ${RegionId}.

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

The names of the services on which the service that is queried depends.

string

The name of the service on which the service that is queried depends.

NAS

Examples

Sample success responses

JSONformat

{
  "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"
      ]
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-01-12The internal configuration of the API is changed, but the call is not affectedView Change Details
2022-10-28API Description Update. The response structure of the API has changedView Change Details
2021-11-12The response structure of the API has changedView Change Details