ListUserGroupsForRegistrationPolicy

Updated at:

Lists the user groups associated with device registration policies in your Alibaba Cloud account.

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

csas:ListUserGroupsForRegistrationPolicy

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PolicyIds

array

Yes

A collection of device registration policy IDs. You can specify up to 100 IDs.

string

No

A device registration policy ID. Get this value from one of the following operations:

reg-policy-63b2f1844b86****

Response elements

Element

Type

Description

Example

object

Response schema

RequestId

string

The ID of this request.

D89009C7-54C6-51B6-BAE7-3F373920C6BF

Policies

array<object>

A list of device registration policies.

array<object>

A device registration policy.

PolicyId

string

The ID of the device registration policy.

reg-policy-f25c9e5872e5****

UserGroups

array<object>

A collection of user groups associated with the device registration policy.

array<object>

A user group associated with the device registration policy.

UserGroupId

string

The ID of the user group.

usergroup-6f1ef2fc56b6****

Name

string

The name of the user group.

user_group_name

Description

string

A description of the user group.

这是一条被设备注册策略引用的用户组。

CreateTime

string

The time when the user group was created.

2022-09-27 18:10:25

Attributes

array<object>

A collection of user group attributes.

object

A user group attribute.

UserGroupType

string

The type of the user group. Valid values:

  • username: A username.

  • department: A department.

  • email: An email address.

  • telephone: A phone number.

Valid values:

  • telephone :

    Phone number

  • department :

    Department

  • email :

    Email address

  • username :

    Username

department

Relation

string

The relation for the user group. Valid values:

  • Equal: Equal to.

  • Unequal: Not equal to.

Valid values:

  • Unequal :

    Not equal to

  • Equal :

    Equal to

Equal

Value

string

The value of the user group attribute.

  • If UserGroupType is username, this is the username. It must be 1–128 characters long and can contain uppercase and lowercase letters, Chinese characters, digits, periods (.), underscores (_), and hyphens (-).

  • If UserGroupType is department, this is the department name. Example: OU=Department 1,OU=SASE DingTalk.

  • If UserGroupType is email, this is the email address. Example: username@example.com.

  • If UserGroupType is telephone, this is the phone number. Example: 13900001234.

OU=部门1,OU=SASE钉钉

IdpId

integer

The identity provider ID for the user group. This field appears only when UserGroupType is department.

12

Examples

Success response

JSON format

{
  "RequestId": "D89009C7-54C6-51B6-BAE7-3F373920C6BF",
  "Policies": [
    {
      "PolicyId": "reg-policy-f25c9e5872e5****",
      "UserGroups": [
        {
          "UserGroupId": "usergroup-6f1ef2fc56b6****",
          "Name": "user_group_name",
          "Description": "这是一条被设备注册策略引用的用户组。",
          "CreateTime": "2022-09-27 18:10:25",
          "Attributes": [
            {
              "UserGroupType": "department",
              "Relation": "Equal",
              "Value": "OU=部门1,OU=SASE钉钉",
              "IdpId": 12
            }
          ]
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.