Mengkueri status aktivasi layanan Alibaba Cloud dan informasi tentang peran tertaut layanannya.
Deskripsi operasi
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.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:GetServiceProvisions |
list |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| TemplateBody |
string |
No |
Struktur badan templat. Badan templat harus memiliki panjang 1 hingga 524.288 byte. Jika panjang badan templat melebihi batas atas, gunakan metode HTTP POST + Body Param untuk meneruskan parameter di badan permintaan guna menghindari kegagalan permintaan yang disebabkan oleh URL yang terlalu panjang. Catatan
Anda hanya dapat menentukan salah satu dari parameter TemplateBody, TemplateURL, TemplateId, dan Services. |
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 |
URL file yang berisi badan templat. URL harus mengarah ke templat yang berada di server web HTTP atau HTTPS atau di bucket Object Storage Service (OSS). Badan templat harus memiliki panjang 1 hingga 524.288 byte. Contoh URL OSS: oss://ros/template/demo dan oss://ros/template/demo?RegionId=cn-hangzhou. Jika Anda tidak menentukan ID wilayah bucket OSS, nilai parameter RegionId digunakan. Anda hanya dapat menentukan salah satu dari parameter TemplateBody, TemplateURL, TemplateId, dan Services. |
oss://ros-template/demo |
| TemplateId |
string |
No |
ID templat. Parameter ini berlaku untuk templat bersama dan privat. Anda hanya dapat menentukan salah satu dari parameter TemplateBody, TemplateURL, TemplateId, dan Services. |
5ecd1e10-b0e9-4389-a565-e4c15efc**** |
| TemplateVersion |
string |
No |
Versi templat. Jika Anda tidak menentukan parameter ini, versi terbaru digunakan. Parameter ini hanya berlaku jika Anda menentukan TemplateId. |
v1 |
| Parameters |
array<object> |
No |
Parameter. |
|
|
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. Catatan
Parameters is optional. If you specify Parameters, you must specify ParameterKey. |
Amount |
| ParameterValue |
string |
Yes |
The value of the parameter. Catatan
Parameters is optional. If you specify Parameters, you must specify ParameterValue. |
12 |
| Services |
array<object> |
No |
Daftar layanan Alibaba Cloud. |
|
|
object |
No |
|||
| ServiceName |
string |
Yes |
The name of the Alibaba Cloud service. Valid values:
|
EHPC |
Untuk informasi tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
A9938C04-26AD-5EFA-B394-EA7866842DFF |
| ServiceProvisions |
array<object> |
The details of the Alibaba Cloud services. |
|
|
array<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. Catatan
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. Catatan
This parameter is returned only when the value of Status is Disabled. |
https://common-buy-intl.alibabacloud.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. Catatan
This parameter is returned only when the value of Created is false. |
https://ehpc.console.alibabacloud.com/ |
| Roles |
array<object> |
The service-linked roles. |
|
|
array<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-intl.alibabacloud.com/?commodityCode=acs_postpaid_public_cn |
Contoh
Respons sukses
JSONformat
{
"RequestId": "A9938C04-26AD-5EFA-B394-EA7866842DFF",
"ServiceProvisions": [
{
"ServiceName": "EHPC",
"Status": "Enabled",
"StatusReason": "No permission.",
"AutoEnableService": false,
"EnableURL": "https://common-buy-intl.alibabacloud.com/?commodityCode=nas",
"RoleProvision": {
"AuthorizationURL": "https://ehpc.console.alibabacloud.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-intl.alibabacloud.com/?commodityCode=acs_postpaid_public_cn"
}
]
}
]
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.