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.
Make sure that you have the permissions to call the GetRole operation.
Try it now
Test
RAM authorization
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:
| 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 |
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:
| 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 |
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 |
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:
| 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.