All Products
Search
Document Center

Container Service for Kubernetes:CheckServiceRole

Last Updated:Aug 28, 2026

Checks whether the specified service roles are granted to Container Service for Kubernetes (ACK) within the current Alibaba Cloud account. ACK can access other cloud services, such as Elastic Compute Service (ECS), Object Storage Service (OSS), File Storage NAS (NAS), and Server Load Balancer (SLB), only after ACK is assigned the required service roles.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cs:CheckServiceRole

none

*All Resource

*

None None

Request syntax

POST /ram/check-service-role HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

roles

array<object>

Yes

The list of service roles you want to check.

object

No

The information about a service role.

name

string

Yes

The server role name. For more information about the service roles and their permissions in ACK, see ACK roles.

AliyunCSManagedAutoScalerRole

Response elements

Element

Type

Description

Example

object

Schema of Response

roles

array<object>

The check results.

object

The service roles.

name

string

The name of the service role.

AliyunCSManagedAutoScalerRole

granted

boolean

Indicates whether the service role is assigned to ACK.

Valid values:

  • true: The role is assigned to ACK.

  • false: The role is not assigned to ACK.

Valid values:

  • true :
  • false :

true

message

string

The message that is displayed for a role that is not assigned to ACK.

The role does not exist: AliyunCSManagedAutoScalerRole

Examples

Success response

JSON format

{
  "roles": [
    {
      "name": "AliyunCSManagedAutoScalerRole",
      "granted": true,
      "message": "The role does not exist: AliyunCSManagedAutoScalerRole"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.