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

Usage notes

In this example, a template is used to query the activation status and the RAM roles of API Gateway and Function Compute. The China (Hangzhou) region is specified in the template. The template body is {"ROSTemplateFormatVersion": "2015-09-01","Resources": {"ApiGateway": {"Type": "ALIYUN::ApiGateway::Group","Properties": { "GroupName": "ros_example" }},"FC": {"Type": "ALIYUN::FC::Service","Properties": {"ServiceName": "ros_example"}}}}.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetServiceProvisions

The operation that you want to perform. Set the value to GetServiceProvisions.

RegionId String Yes cn-hangzhou

The region ID.

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

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

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 that you add parameters to the HTTP POST request body to prevent request failures caused by excessively long URLs.

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

TemplateURL String No oss://ros-template/demo

The URL of the file that contains the template body. The URL must point to a template that is stored 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: oss://ros/template/demo and oss://ros/template/demo?RegionId=cn-hangzhou. If you do not specify RegionId in the URL, the region ID of the stack group is used.

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

TemplateId String No 5ecd1e10-b0e9-4389-a565-e4c15efc****

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

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

TemplateVersion String No v1

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

This parameter only takes effect when the TemplateId parameter is specified.

Parameters.N.ParameterKey String Yes Amount

The name of parameter N. If you do not specify the Parameters.N.ParameterKey and Parameters.N.ParameterValue parameters, Resource Orchestration Service (ROS) uses the default key and value in the template.

Note Parameters in the Parameters.N.ParameterKey parameter is optional. If you specify Parameters, you must specify the Parameters.N.ParameterKey parameter.
Parameters.N.ParameterValue String Yes 12

The value of parameter N.

Note Parameters in the Parameters.N.ParameterValue parameter is optional. If you specify Parameters, you must specify the Parameters.N.ParameterValue parameter.
Services.N.ServiceName String Yes FC

The name of cloud service N or feature N. 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 Route for CDN (DCDN)
  • DataHub: DataHub
  • DataWorks: DataWorks
  • EDAS: Enterprise Distributed Application Service (EDAS)
  • EMAS: Enterprise Mobile Application Studio (EMAS)
  • FC: Function Compute
  • FNF: Serverless Workflow (SWF)
  • MaxCompute: MaxCompute
  • MNS: Message Service (MNS)
  • HBR: Hybrid Backup Recovery (HBR)
  • IMM: Intelligent Media Management
  • IOT: IoT Platform
  • KMS: Key Management Service (KMS)
  • NAS: Apsara File Storage NAS (NAS)
  • NLP: Natural Language Processing (NLP)
  • OSS: OSS
  • OTS: Tablestore
  • PrivateLink: PrivateLink
  • PrivateZone: Alibaba Cloud DNS (DNS)
  • RocketMQ: Message Queue for Apache RocketMQ
  • SAE: Serverless App Engine (SAE)
  • SLS: Log Service
  • TrafficMirror: the traffic mirroring feature
  • VS: Video Surveillance System
  • Xtrace: Tracing Analysis

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

Response parameters

Parameter Type Example Description
RequestId String D7A7F4B1-219A-1965-9D54-765254420E22

The ID of the request.

ServiceProvisions Array of ServiceProvision

Details about the cloud service.

ServiceName String FC

The name of the cloud service.

Status String Enabled

The activation status of the cloud service. Valid values:

  • Enabled: The cloud service is activated.
  • Disabled: The cloud service is not activated.
  • Unknown: The activation status of the cloud service is unknown.
StatusReason String No permission.

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

Note When the Status parameter is set to Disabled or Unknown, the StatusReason parameter is returned.
AutoEnableService Boolean false

Indicates whether the automatic activation feature for the cloud service is specified in the template. Valid values:

  • true: The cloud service is automatically activated.
  • false: The cloud service is manually activated.
EnableURL String https://common-buy.aliyun.com/?commodityCode=fc

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

Note When the Status parameter is set to Disabled, the EnableURL parameter is returned.
RoleProvision Object

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

Roles Array of Role

The RAM roles of the cloud service.

RoleName String AliyunFcDefaultRole

The name of the RAM role.

Created Boolean false

Indicates whether the RAM role is created. Valid values:

  • true: The RAM role is created.
  • false: The RAM role is not created.
Function String Default

The purpose for which the RAM role is used.

Default value: Default. This value indicates that the RAM role is the default role of the cloud service.

AuthorizationURL String https://ram.console.aliyun.com/role/commonAuthorize?request={\"RoleName\": \"AliyunFcDefaultRole\", \"ReturnUrl\": \"https://fc.console.aliyun.com/\", \"Service\": \"FC\", \"SystemPolicyArray\": [\"AliyunFCDefaultRolePolicy\"], \"RoleDescription\": \"Default Service Role for FC to operate other resource\"}

The authorization URL of the RAM role.

Note When the Created parameter is set to false, the AuthorizationURL parameter is returned.

Examples

Sample requests

http(s)://ros.aliyuncs.com/?Action=GetServiceProvisions
&RegionId=cn-hangzhou
&TemplateBody={"ROSTemplateFormatVersion": "2015-09-01","Resources": {"ApiGateway": {"Type": "ALIYUN::ApiGateway::Group","Properties": { "GroupName": "ros_example" }},"FC": {"Type": "ALIYUN::FC::Service","Properties": {"ServiceName": "ros_example"}}}}
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetServiceProvisionsResponse>
    <RequestId>D7A7F4B1-219A-1965-9D54-765254420E22</RequestId>
    <ServiceProvisions>
        <Status>Enabled</Status>
        <ServiceName>ApiGateway</ServiceName>
        <RoleProvision>
        </RoleProvision>
        <AutoEnableService>false</AutoEnableService>
    </ServiceProvisions>
    <ServiceProvisions>
        <Status>Enabled</Status>
        <ServiceName>FC</ServiceName>
        <RoleProvision>
            <AuthorizationURL>https://ram.console.aliyun.com/role/commonAuthorize?request={"RoleName": "AliyunFcDefaultRole", "ReturnUrl": "https://fc.console.aliyun.com/", "Service": "FC", "SystemPolicyArray": ["AliyunFCDefaultRolePolicy"], "RoleDescription": "Default Service Role for FC to operate other resource"}</AuthorizationURL>
            <Roles>
                <Function>Default</Function>
                <RoleName>AliyunFcDefaultRole</RoleName>
                <Created>false</Created>
            </Roles>
        </RoleProvision>
        <AutoEnableService>false</AutoEnableService>
    </ServiceProvisions>
</GetServiceProvisionsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "D7A7F4B1-219A-1965-9D54-765254420E22",
  "ServiceProvisions" : [ {
    "Status" : "Enabled",
    "ServiceName" : "ApiGateway",
    "RoleProvision" : {
      "Roles" : [ ]
    },
    "AutoEnableService" : false
  }, {
    "Status" : "Enabled",
    "ServiceName" : "FC",
    "RoleProvision" : {
      "AuthorizationURL" : "https://ram.console.aliyun.com/role/commonAuthorize?request={\"RoleName\": \"AliyunFcDefaultRole\", \"ReturnUrl\": \"https://fc.console.aliyun.com/\", \"Service\": \"FC\", \"SystemPolicyArray\": [\"AliyunFCDefaultRolePolicy\"], \"RoleDescription\": \"Default Service Role for FC to operate other resource\"}",
      "Roles" : [ {
        "Function" : "Default",
        "RoleName" : "AliyunFcDefaultRole",
        "Created" : false
      } ]
    },
    "AutoEnableService" : false
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.