All Products
Search
Document Center

Resource Orchestration Service:GetServiceProvisions

Last Updated:Jun 10, 2026

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.

Catatan

Make sure that you have the permissions to call the GetRole operation.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

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:

  • AHAS: Application High Availability Service.

  • ARMS: Application Real-Time Monitoring Service.

  • ApiGateway: API Gateway.

  • BatchCompute: Batch Compute.

  • BrainIndustrial: Industrial Intelligence.

  • CloudStorageGateway: Cloud Storage Gateway.

  • CMS: Cloud Monitor.

  • CR: Container Registry.

  • CS: Container Service.

  • DCDN: DCDN.

  • DataHub: DataHub.

  • DataWorks: DataWorks.

  • EDAS: Enterprise Distributed Application Service.

  • EHPC: Elastic High Performance Computing.

  • EMAS: Enterprise Mobile Application Studio.

  • FC: Function Compute.

  • FNF: CloudFlow.

  • MaxCompute: MaxCompute.

  • SMQ: Simple Message Queue (formerly MNS).

  • HBR: Cloud Backup.

  • IMM: Intelligent Media Management.

  • IOT: IoT Platform.

  • KMS: Key Management Service.

  • NAS: File Storage NAS.

  • NLP: Natural Language Processing.

  • OSS: Object Storage Service.

  • OTS: Tablestore.

  • PrivateLink: PrivateLink.

  • PrivateZone: PrivateZone.

  • RocketMQ: Message Queue for Apache RocketMQ.

  • SAE: Serverless App Engine.

  • SLS: Simple Log Service.

  • TrafficMirror: Traffic Mirroring.

  • VS: Video Surveillance.

  • Xtrace: Tracing Analysis.

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: The service is activated.

  • Disabled: The service is not activated.

  • Unknown: The activation status is unknown.

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:

  • true: The service is automatically activated.

  • false: The service is not automatically activated.

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: The service-linked role is created.

  • false: The service-linked role is not created.

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: an Alibaba Cloud API operation.

  • Inner: an internal API operation.

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:

  • Enabled: The service is activated.

  • Disabled: The service is not activated.

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.