Retrieves the provisions of a service, such as its activation status and service roles.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
computenest: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-0efc0db451794bxxxxxx |
| ServiceVersion |
string |
No |
The service version. |
1 |
| TemplateName |
string |
No |
The template name. |
ECS |
| TrialType |
string |
No |
The usage type. Valid values:
|
Trial |
| Parameters |
object |
No |
The parameters for deploying the user instance. |
{\"RegionId\":\"cn-hangzhou\",\"ZoneId\":\"cn-hangzhou-g\",\"EcsInstanceType\":\"ecs.g5.large\",\"InstancePassword\":\"xxxxxxxx\",\"PayType\":\"PostPaid\",\"PayPeriodUnit\":\"Month\",\"PayPeriod\":1} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
8C27145F-C9F4-545D-A355-DCDDAD63D548 |
| ServiceProvisions |
array<object> |
The service details. |
|
|
array<object> |
The service details. |
||
| ServiceName |
string |
The service name. |
CS |
| Status |
string |
The activation status of the service. Valid values:
|
Enabled |
| AutoEnableService |
boolean |
Indicates whether the service is automatically activated as defined in the template. Valid values:
|
true |
| RoleProvision |
object |
The information about the service role. If this parameter is empty, no service role is associated with the service. |
|
| Roles |
array<object> |
The list of service roles. |
|
|
array<object> |
The list of service roles. |
||
| RoleName |
string |
The role name. |
AliyunCSManagedVKRole |
| 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 used to create the role. |
|
| ApiName |
string |
The API operation name. |
CreateServiceLinkedRole |
| ApiProductId |
string |
The ID of the product to which the API operation belongs. |
rds |
| ApiType |
string |
The API type. Valid values:
|
Open |
| parameters |
object |
The API parameters. ${variable} indicates a dynamic parameter. |
{ "ServiceLinkedRole": "AliyunServiceRoleForRdsPgsqlOnEcs", "RegionId": "${RegionId}" } |
| AuthorizationURL |
string |
The authorization URL for accessing the cloud resources of the service. This URL is returned if the role is not created. |
https://ram.console.alibabacloud.com/role/authorization?request={"Services":[{"Service":"CS","Roles":[{"RoleName":"AliyunCSManagedVKRole","TemplateId":"AliyunCSManagedVKRole"},{"RoleName":"AliyunCSDefaultRole","TemplateId":"Default"}]}],"ReturnUrl":"https://cs.console.alibabacloud.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 Disabled or Unknown. |
No permission |
| EnableURL |
string |
The URL for activating the Alibaba Cloud service. Note
This parameter is returned when Status is set to Disabled. |
https://common-buy-intl.alibabacloud.com/?commodityCode=sls |
| CommodityProvisions |
array<object> |
The commodity details. Some services, such as ACS, require the activation of multiple commodities. |
|
|
object |
The commodity details. Some services, such as ACS, require the activation of multiple commodities. |
||
| 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-intl.alibabacloud.com/?commodityCode=acs_postpaid_public_cn |
Examples
Success response
JSON format
{
"RequestId": "8C27145F-C9F4-545D-A355-DCDDAD63D548",
"ServiceProvisions": [
{
"ServiceName": "CS",
"Status": "Enabled",
"AutoEnableService": true,
"RoleProvision": {
"Roles": [
{
"RoleName": "AliyunCSManagedVKRole",
"Created": true,
"Function": "Default",
"ApiForCreation": {
"ApiName": "CreateServiceLinkedRole",
"ApiProductId": "rds",
"ApiType": "Open",
"parameters": {
"ServiceLinkedRole": "AliyunServiceRoleForRdsPgsqlOnEcs",
"RegionId": "${RegionId}"
}
}
}
],
"AuthorizationURL": "https://ram.console.alibabacloud.com/role/authorization?request={\"Services\":[{\"Service\":\"CS\",\"Roles\":[{\"RoleName\":\"AliyunCSManagedVKRole\",\"TemplateId\":\"AliyunCSManagedVKRole\"},{\"RoleName\":\"AliyunCSDefaultRole\",\"TemplateId\":\"Default\"}]}],\"ReturnUrl\":\"https://cs.console.alibabacloud.com/\"}"
},
"StatusReason": "No permission",
"EnableURL": "https://common-buy-intl.alibabacloud.com/?commodityCode=sls",
"CommodityProvisions": [
{
"CommodityCode": "acs_postpaid_public_cn",
"Status": "Disabled",
"EnableURL": "https://common-buy-intl.alibabacloud.com/?commodityCode=acs_postpaid_public_cn"
}
]
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.