ListCloudPermissionTemplates

Updated at:

Performs a paged query to retrieve the information of one or more permission templates. This operation supports paging.

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

eiam:ListCloudPermissionTemplates

list

*CloudPermissionTemplate

acs:eiam:{#regionId}:{#accountId}:instance/{#InstanceId}/cloudaccount/{#CloudAccountId}/cloudpermissiontemplate/*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the IDaaS EIAM instance.

idaas_ue2jvisn35ea5lmthk267xxxxx

NextToken

string

No

The query token, which is the value of the NextToken parameter returned by the previous API call.

NTxxxxxexample

MaxResults

integer

No

The maximum number of entries to return per page in a paged query. This parameter is used for paging. Default value: 20. Maximum value: 100.

20

CloudAccountId

string

Yes

The ID of the cloud account.

ca_01kmegjc11qa1txxxxx

CreatorType

string

No

Filters the results by creator type. Valid values: idaas_admin and idaas_user.

idaas_user

CloudPermissionTemplateNamePrefix

string

No

Filters the results by template name prefix.

AdminAccess

CloudPermissionTemplateUsageType

string

No

Filters the results by permission template usage type. Valid values: user (privilege escalation for human users) and application (privilege escalation for M2M applications).

Valid values:

  • application :

    M2M application.

  • user :

    Human user.

user

CloudPermissionTemplateSharingMode

string

No

Filters the results by permission template sharing mode. Valid values: shared and exclusive. If you do not specify this parameter, no filtering is applied.

Valid values:

  • shared :

    Shared.

  • exclusive :

    Exclusive.

shared

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

0441BD79-92F3-53AA-8657-F8CE4A2B912A

TotalCount

integer

The total number of items.

100

NextToken

string

The pagination token returned by the current request for subsequent queries.

NTxxxexample

MaxResults

integer

The maximum number of entries per page during paging in a paged query.

20

CloudPermissionTemplates

array<object>

The list of permission templates.

array<object>

InstanceId

string

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

CloudAccountId

string

The ID of the associated cloud account.

ca_01kmegjc11qa1txxxxx

CloudPermissionTemplateId

string

The unique identifier of the permission template.

cpt_01l8dagf2iablhigj75l1n99xxxxx

CloudPermissionTemplateName

string

The name of the permission template.

AdminAccessTemplate

PermissionEntityType

string

The type of the permission entity. Valid value: cloud_account_role.

cloud_account_role

PermissionEntityId

string

The ID of the associated CloudAccountRole.

carole_01kmek49aq4r8gxxxx

PermissionEntityExternalId

string

The external unique identifier of the associated cloud role, which is the role ARN on the cloud provider side.

ReadOnlyAccess

Status

string

The status of the permission template. Valid values: initializing, init_failed, enabled, and disabled.

enabled

AllowRequest

boolean

Specifies whether users are allowed to apply.

Description

string

The description of the permission template.

Administrator permission template for managing cloud accounts

CloudPermissionTemplateUsageType

string

The usage type of the permission template. Valid values: user (privilege elevation for human users) and application (privilege elevation for M2M applications).

Valid values:

  • application :

    M2M application.

  • user :

    Human user.

user

CloudPermissionTemplateSharingMode

string

The sharing mode of the permission template. Valid values: shared and exclusive.

Valid values:

  • shared :

    Shared.

  • exclusive :

    Exclusive.

shared

CloudPermissionTemplateOwnerType

string

The owner type of the exclusive template. Valid values: application (M2M applications) and user (human users). This parameter is empty for shared templates.

Valid values:

  • application :

    M2M application.

  • user :

    Human user.

user

CloudPermissionTemplateOwnerId

string

The ID of the application to which the exclusive template belongs. This parameter is empty for shared templates.

user_01kexamplexxxx

CloudPermissionTemplateCreator

object

The creator information of the permission template.

CreatorType

string

The type of the creator. Valid values: idaas_admin and idaas_user.

idaas_user

CreatorId

string

The identity identifier of the creator.

user_01kmek49aq4r8gxxxx

CreatorName

string

The name of the creator.

Zhang San

CloudPermissionTemplateInitResult

object

The initialization result. This parameter is returned only when the status is init_failed.

Result

string

The initialization result. Valid values: success and failed.

failed

ErrorCode

string

The error code returned when initialization fails.

CloudPermissionTemplate.AsyncInitError

ErrorMessage

string

The error message returned when initialization fails.

Permission template initialization failed. Try again later

ApplicableScope

object

The application scope of the permission template.

ScopeType

string

The type of the application scope. Valid values: global and custom.

custom

UserIds

array

The list of specified user IDs. This parameter is returned only when ScopeType is set to custom.

string

The user ID.

user_d6sbsuumeta4h66ec3il7yxxxx

GroupIds

array

The list of specified group IDs. This parameter is returned only when ScopeType is set to custom.

string

The group ID.

group_d6sbsuumeta4h66ec3il7yxxxx

OrganizationalUnitIds

array

The list of specified organizational unit IDs. This parameter is returned only when ScopeType is set to custom.

string

The organizational unit ID.

ou_d6sbsuumeta4h66ec3il7yxxxx

CreateTime

integer

The creation time. The value is a UNIX timestamp in milliseconds.

1649830225000

UpdateTime

integer

The last update time. The value is a UNIX timestamp in milliseconds.

1649830227000

Examples

Success response

JSON format

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A",
  "TotalCount": 100,
  "NextToken": "NTxxxexample",
  "MaxResults": 20,
  "CloudPermissionTemplates": [
    {
      "InstanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
      "CloudAccountId": "ca_01kmegjc11qa1txxxxx",
      "CloudPermissionTemplateId": "cpt_01l8dagf2iablhigj75l1n99xxxxx",
      "CloudPermissionTemplateName": "AdminAccessTemplate",
      "PermissionEntityType": "cloud_account_role",
      "PermissionEntityId": "carole_01kmek49aq4r8gxxxx",
      "PermissionEntityExternalId": "ReadOnlyAccess",
      "Status": "enabled",
      "AllowRequest": false,
      "Description": "Administrator permission template for managing cloud accounts",
      "CloudPermissionTemplateUsageType": "user",
      "CloudPermissionTemplateSharingMode": "shared",
      "CloudPermissionTemplateOwnerType": "user",
      "CloudPermissionTemplateOwnerId": "user_01kexamplexxxx",
      "CloudPermissionTemplateCreator": {
        "CreatorType": "idaas_user",
        "CreatorId": "user_01kmek49aq4r8gxxxx",
        "CreatorName": "John Doe"
      },
      "CloudPermissionTemplateInitResult": {
        "Result": "failed",
        "ErrorCode": "CloudPermissionTemplate.AsyncInitError",
        "ErrorMessage": "Failed to initialize the permission template. Try again later"
      },
      "ApplicableScope": {
        "ScopeType": "custom",
        "UserIds": [
          "user_d6sbsuumeta4h66ec3il7yxxxx"
        ],
        "GroupIds": [
          "group_d6sbsuumeta4h66ec3il7yxxxx"
        ],
        "OrganizationalUnitIds": [
          "ou_d6sbsuumeta4h66ec3il7yxxxx"
        ]
      },
      "CreateTime": 1649830225000,
      "UpdateTime": 1649830227000
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.