Queries the activation status of a service and the information about its service roles.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
computenestsupplier:GetServiceProvisions |
get |
*Service
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-hangzhou |
| ServiceId |
string |
Yes |
The service ID. |
service-20b8a396048346xxxxxx |
| ServiceVersion |
string |
No |
The service version. |
1 |
| TemplateName |
string |
No |
The template name. |
模板1 |
| Parameters |
object |
No |
The parameters. |
{\"RegionId\":\"cn-hangzhou\"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
DB1FA13E-1087-5654-84D5-58A0ACAD1B18 |
| ServiceProvisions |
array<object> |
The details of the service. |
|
|
object |
The details of the service. |
||
| ServiceName |
string |
The service name. |
db |
| Status |
string |
The activation status of the service. Valid values:
|
Enabled |
| AutoEnableService |
boolean |
Indicates whether the service is automatically activated. The service is automatically activated if it is defined in the template. Valid values:
|
true |
| RoleProvision |
object |
The information about the service roles. If this parameter is empty, no service roles are associated with the service. |
|
| Roles |
array<object> |
The list of service roles. |
|
|
object |
The list of service roles. |
||
| RoleName |
string |
The name of the role. |
AliyunServiceRole |
| Created |
boolean |
Indicates whether the 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 for the service. |
Default |
| ApiForCreation |
object |
The information about the API operation that is used to create the role. |
|
| ApiName |
string |
The name of the API operation. |
GetServiceProvisions |
| ApiProductId |
string |
The ID of the product to which the API operation belongs. |
ComputeNest |
| ApiType |
string |
The type of the API operation. Valid values:
|
Open |
| Parameters |
object |
The parameters of the API operation. Dynamic parameters are in the `${Variable}` format. The `${RegionId}` dynamic parameter is supported, which specifies the region. |
{ "ServiceLinkedRole": "AliyunServiceRoleForRdsPgsqlOnEcs", "RegionId": "${RegionId}" } |
| AuthorizationURL |
string |
The URL for authorizing the service to access cloud resources. This parameter is returned if the role is not created. |
https://ram.console.aliyun.com/role/authorization?request={"Services":[{"Service":"CS","Roles":[{"RoleName":"AliyunCSManagedVKRole","TemplateId":"AliyunCSManagedVKRole"},{"RoleName":"AliyunCSDefaultRole","TemplateId":"Default"}]}],"ReturnUrl":"https://cs.console.aliyun.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 Unknown. |
resource(Eip) import info missing |
| EnableURL |
string |
The URL for activating the Alibaba Cloud service. Note
This parameter is returned when Status is set to Disabled. |
https://common-buy.aliyun.com/?commodityCode=sls |
| CommodityProvisions |
array<object> |
The details of the commodity. Some services, such as 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": "DB1FA13E-1087-5654-84D5-58A0ACAD1B18",
"ServiceProvisions": [
{
"ServiceName": "db",
"Status": "Enabled",
"AutoEnableService": true,
"RoleProvision": {
"Roles": [
{
"RoleName": "AliyunServiceRole",
"Created": true,
"Function": "Default",
"ApiForCreation": {
"ApiName": "GetServiceProvisions",
"ApiProductId": "ComputeNest",
"ApiType": "Open",
"Parameters": {
"ServiceLinkedRole": "AliyunServiceRoleForRdsPgsqlOnEcs",
"RegionId": "${RegionId}"
}
}
}
],
"AuthorizationURL": "https://ram.console.aliyun.com/role/authorization?request={\"Services\":[{\"Service\":\"CS\",\"Roles\":[{\"RoleName\":\"AliyunCSManagedVKRole\",\"TemplateId\":\"AliyunCSManagedVKRole\"},{\"RoleName\":\"AliyunCSDefaultRole\",\"TemplateId\":\"Default\"}]}],\"ReturnUrl\":\"https://cs.console.aliyun.com/\"}"
},
"StatusReason": "resource(Eip) import info missing",
"EnableURL": "https://common-buy.aliyun.com/?commodityCode=sls",
"CommodityProvisions": [
{
"CommodityCode": "acs_postpaid_public_cn",
"Status": "Disabled",
"EnableURL": "https://common-buy.aliyun.com/?commodityCode=acs_postpaid_public_cn\n"
}
]
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.