GetCloudPermissionTemplate

Updated at:

Queries a permission template.

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:GetCloudPermissionTemplate

get

*CloudPermissionTemplate

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

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the IDaaS EIAM instance.

idaas_ue2jvisn35ea5lmthk267xxxxx

CloudAccountId

string

Yes

The cloud account ID.

ac_mkv7rgt4d7i4u7zqtzev2mxxxx

CloudPermissionTemplateId

string

Yes

The permission template ID.

cpt_mkv7rgt4d7i4u7zqtzev2mxxxx

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

CloudPermissionTemplate

object

The permission template.

InstanceId

string

The instance ID.

idaas_ki6hd7ihir4ybawogqk6kqsfjm

CloudAccountId

string

The cloud account ID.

ca_01kq1us6frlbo3rr8m216vj3bkak2

CloudPermissionTemplateId

string

The unique identifier of the permission template.

cpt_01l8dagf2iablhigj75l1n99xxxxx

CloudPermissionTemplateName

string

The name of the permission template.

testName

PermissionEntityType

string

The permission entity type. Fixed value: cloud_account_role.

cloud_account_role

PermissionEntityId

string

The ID of the associated CloudAccountRole.

carole_01kmek49aqxxxx

PermissionEntityExternalId

string

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

acs:ram::123456:role/idaas-test

Status

string

The status of the permission template. Valid values:

  • initializing

  • init_failed

  • enabled

  • disabled

enabled

AllowRequest

boolean

Specifies whether users are allowed to apply for the permission template.

true

Description

string

The description of the permission template.

this is a test.

CloudPermissionTemplateUsageType

string

The usage type of the permission template. Valid values:

  • user: Privilege escalation for human users.

  • application: Privilege escalation for M2M applications.

Valid values:

  • application :

    M2M application.

  • user :

    Human user.

user

CloudPermissionTemplateSharingMode

string

The sharing mode of the permission template. Valid values:

  • shared: Shared.

  • exclusive: Exclusive.

Valid values:

  • shared :

    Shared.

  • exclusive :

    Exclusive.

shared

CloudPermissionTemplateOwnerType

string

The owner type of the exclusive template. Valid values:

  • application: M2M application.

  • user: Human user. 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 creator type. Valid values:

  • idaas_admin: Created by an administrator.

  • idaas_user: Created by a user.

Valid values:

  • idaas_admin :

    Created by an administrator.

  • idaas_user :

    Created by a user.

idaas_user

CreatorId

string

The identity identifier of the creator.

8645321

CreatorName

string

The name of the creator.

root

CloudPermissionTemplateInitResult

object

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

Result

string

The initialization result. Valid values:

  • success

  • failed

success

ErrorCode

string

The error code returned when initialization fails.

CloudPermissionTemplate.AsyncInitError

ErrorMessage

string

The error message returned when initialization fails.

server error

ApplicableScope

object

The applicable scope of the permission template.

ScopeType

string

The scope type. Valid values:

  • global

  • custom

global

UserIds

array

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

string

The account ID.

user_d6sbsuumeta4h66ec3il7yxxxx

GroupIds

array

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

string

The group ID.

group_lpm6kup6lcbuggywj64i2zioxi

OrganizationalUnitIds

array

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

string

The organizational unit ID.

ou_xva2ldblzmpqdqcbvau6jca2oe

CreateTime

integer

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

1776239357000

UpdateTime

integer

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

1776239357000

Examples

Success response

JSON format

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A",
  "CloudPermissionTemplate": {
    "InstanceId": "idaas_ki6hd7ihir4ybawogqk6kqsfjm",
    "CloudAccountId": "ca_01kq1us6frlbo3rr8m216vj3bkak2",
    "CloudPermissionTemplateId": "cpt_01l8dagf2iablhigj75l1n99xxxxx",
    "CloudPermissionTemplateName": "testName",
    "PermissionEntityType": "cloud_account_role",
    "PermissionEntityId": "carole_01kmek49aqxxxx",
    "PermissionEntityExternalId": "acs:ram::123456:role/idaas-test",
    "Status": "enabled",
    "AllowRequest": true,
    "Description": "this is a test.",
    "CloudPermissionTemplateUsageType": "user",
    "CloudPermissionTemplateSharingMode": "shared",
    "CloudPermissionTemplateOwnerType": "user",
    "CloudPermissionTemplateOwnerId": "user_01kexamplexxxx",
    "CloudPermissionTemplateCreator": {
      "CreatorType": "idaas_user",
      "CreatorId": "8645321",
      "CreatorName": "root"
    },
    "CloudPermissionTemplateInitResult": {
      "Result": "success",
      "ErrorCode": "CloudPermissionTemplate.AsyncInitError",
      "ErrorMessage": "server error"
    },
    "ApplicableScope": {
      "ScopeType": "global",
      "UserIds": [
        "user_d6sbsuumeta4h66ec3il7yxxxx"
      ],
      "GroupIds": [
        "group_lpm6kup6lcbuggywj64i2zioxi"
      ],
      "OrganizationalUnitIds": [
        "ou_xva2ldblzmpqdqcbvau6jca2oe"
      ]
    },
    "CreateTime": 1776239357000,
    "UpdateTime": 1776239357000
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.