### Install Alibaba Cloud eds-user SDK for PHP Source: https://github.com/alibabacloud-sdk-php/eds-user-20210308/blob/master/README.md Use Composer to install the Alibaba Cloud eds-user SDK for PHP. Ensure you have Composer installed and configured. ```bash composer require alibabacloud/eds-user-20210308 ``` -------------------------------- ### Initialize Edsuser Client Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Configure the client with Alibaba Cloud credentials and region settings to enable API communication. ```php getenv('ALIBABA_CLOUD_ACCESS_KEY_ID'), 'accessKeySecret' => getenv('ALIBABA_CLOUD_ACCESS_KEY_SECRET'), 'regionId' => 'cn-hangzhou', 'endpoint' => 'eds-user.cn-hangzhou.aliyuncs.com' ]); $client = new Edsuser($config); ``` -------------------------------- ### Create Resource Group Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Initializes a new resource group for organizing cloud desktop resources. ```php 'Dev-Resources', 'platform' => 'Windows', // Windows or Linux 'isResourceGroupWithOfficeSite' => false, 'enableAliyunResourceGroup' => true ]); try { $response = $client->createResourceGroup($request); echo "Resource Group Created!\n"; echo "Resource Group ID: " . $response->body->resourceGroupId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Configure Runtime Options in PHP Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Uses the WithOptions variant to apply custom timeouts, retries, and proxy settings to API requests. ```php 100 ]); // Configure custom runtime options $runtime = new RuntimeOptions([ 'connectTimeout' => 10000, // Connection timeout in ms 'readTimeout' => 30000, // Read timeout in ms 'maxAttempts' => 3, // Retry attempts 'backoffPeriod' => 1000, // Backoff period between retries 'autoretry' => true // Enable auto-retry ]); try { $response = $client->describeUsersWithOptions($request, $runtime); echo "Query completed with custom timeout settings\n"; echo "Users found: " . count($response->body->users) . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Manage Organizations with PHP Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Create new organizations or query existing ones within the hierarchy. ```php 'Engineering Department', 'parentOrgId' => 'org-aliyun-wy-org-id' // Parent organization ID ]); try { $response = $client->createOrg($request); $body = $response->body; echo "Organization Created!\n"; echo "Org ID: " . $body->orgId . "\n"; echo "Request ID: " . $body->requestId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` ```php 'Engineering', // Filter by name 'parentOrgId' => 'org-aliyun-wy-org-id', 'maxResults' => 100, 'showExtras' => ['OrgNamePath' => true] // Include full path ]); try { $response = $client->describeOrgs($request); $body = $response->body; foreach ($body->orgs as $org) { echo "Organization: " . $org->orgName . "\n"; echo " ID: " . $org->orgId . "\n"; echo " Parent ID: " . $org->parentOrgId . "\n"; echo " Full Path: " . $org->orgNamePath . "\n"; echo "\n"; } if ($body->nextToken) { echo "More results available with NextToken: " . $body->nextToken . "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Create User Group with PHP Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Creates a new user group for managing convenience users. Requires a group name and optionally a parent group ID. ```php 'Development Team', 'description' => 'Group for development team members with access to dev resources', 'parentGroupId' => '' // Empty for root-level group, or specify parent group ID ]); try { $response = $client->createGroup($request); $body = $response->body; echo "Group Created Successfully!\n"; echo "Group ID: " . $body->groupId . "\n"; echo "Request ID: " . $body->requestId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Create Convenience Users Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Define user objects and submit a request to create multiple convenience accounts in EDS. ```php 'user001', 'email' => 'user001@example.com', 'phone' => '1381234****', 'realNickName' => 'John Doe', 'orgId' => 'org-aliyun-wy-org-id', 'remark' => 'Development team member' ]); $user2 = new users([ 'endUserId' => 'user002', 'email' => 'user002@example.com', 'realNickName' => 'Jane Smith', 'groupIdList' => ['ug-12345678901234567'] ]); // Create the request with users and settings $request = new CreateUsersRequest([ 'users' => [$user1, $user2], 'password' => 'SecureP@ssw0rd!', 'isLocalAdmin' => false, 'passwordExpireDays' => '90', 'autoLockTime' => '' ]); try { $response = $client->createUsers($request); // Check results $body = $response->body; echo "All Succeeded: " . ($body->allSucceed ? 'Yes' : 'No') . "\n"; // List created users foreach ($body->createResult->createdUsers as $createdUser) { echo "Created: " . $createdUser->endUserId . "\n"; } // Check for failures foreach ($body->createResult->failedUsers as $failedUser) { echo "Failed: " . $failedUser->endUserId . " - " . $failedUser->errorMessage . "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Batch Set Desktop Manager Permissions Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Grants or revokes local administrator permissions for convenience accounts. ```php ['user001', 'user002'], 'isDesktopManager' => true // true: grant, false: revoke ]); try { $response = $client->batchSetDesktopManager($request); echo "Desktop manager permissions updated!\n"; echo "Request ID: " . $response->body->requestId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Batch Set Desktop Manager API Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Grants or revokes local administrator permissions on cloud computers for convenience accounts. ```APIDOC ## POST /api/edsuser/batchSetDesktopManager ### Description Grants or revokes local administrator permissions on cloud computers for convenience accounts. Users with this permission can install software and modify system settings. ### Method POST ### Endpoint /api/edsuser/batchSetDesktopManager ### Parameters #### Request Body - **users** (array[string]) - Required - A list of user IDs to modify. - **isDesktopManager** (boolean) - Required - true to grant administrator permissions, false to revoke. ### Request Example ```json { "users": ["user001", "user002"], "isDesktopManager": true } ``` ### Response #### Success Response (200) - **requestId** (string) - The ID of the request. #### Response Example ```json { "requestId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### Move Users to Organization with PHP Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Updates the organizational assignment for one or more users. ```php 'org-engineering-001', 'endUserIds' => ['user001', 'user002'] ]); try { $response = $client->moveUserOrg($request); echo "Users moved to organization successfully!\n"; echo "Request ID: " . $response->body->requestId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Filter Users with PHP Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Filters convenience accounts using custom properties, organization, and status. Includes options for result ordering and retrieving desktop counts. ```php 12345, 'propertyValueIds' => '67890,67891' ]); // Configure result ordering $order = new orderParam([ 'orderField' => 'EndUserId', 'orderType' => 'ASC' ]); $request = new FilterUsersRequest([ 'filter' => 'john', // Search term 'orgId' => 'org-aliyun-wy-org-id', 'isQueryAllSubOrgs' => true, 'status' => 0, // 0: Normal 'maxResults' => 50, 'propertyFilterParam' => [$propertyFilter], 'orderParam' => $order, 'includeDesktopCount' => true, 'includeDesktopGroupCount' => true, 'includeOrgInfo' => true ]); try { $response = $client->filterUsers($request); $body = $response->body; foreach ($body->users as $user) { echo "User: " . $user->endUserId . "\n"; echo " Email: " . $user->email . "\n"; echo " Desktop Count: " . $user->desktopCount . "\n"; echo " Desktop Group Count: " . $user->desktopGroupCount . "\n"; // Display user properties if (!empty($user->userSetPropertiesModels)) { foreach ($user->userSetPropertiesModels as $prop) { echo " Property: " . $prop->propertyKey . " = " . $prop->propertyValue . "\n"; } } // Display organization list if (!empty($user->orgList)) { foreach ($user->orgList as $org) { echo " Org Path: " . $org->orgNamePath . "\n"; } } echo "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Create Resource Group API Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Creates a resource group for organizing cloud desktop resources. ```APIDOC ## POST /api/edsuser/createResourceGroup ### Description Creates a resource group for organizing cloud desktop resources. Resource groups help manage and control access to desktops. ### Method POST ### Endpoint /api/edsuser/createResourceGroup ### Parameters #### Request Body - **resourceGroupName** (string) - Required - The name of the resource group. - **platform** (string) - Optional - The platform for the resource group (e.g., 'Windows' or 'Linux'). - **isResourceGroupWithOfficeSite** (boolean) - Optional - Indicates if the resource group is associated with an office site. - **enableAliyunResourceGroup** (boolean) - Optional - Indicates if Aliyun resource group is enabled. ### Request Example ```json { "resourceGroupName": "Dev-Resources", "platform": "Windows", "isResourceGroupWithOfficeSite": false, "enableAliyunResourceGroup": true } ``` ### Response #### Success Response (200) - **resourceGroupId** (string) - The ID of the created resource group. #### Response Example ```json { "resourceGroupId": "rg-a1b2c3d4e5f67890" } ``` ``` -------------------------------- ### Describe MFA Devices Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Retrieves status and binding information for virtual MFA devices associated with specific users. ```php ['user001', 'user002'], 'maxResults' => 100 ]); try { $response = $client->describeMfaDevices($request); $body = $response->body; foreach ($body->mfaDevices as $device) { echo "MFA Device:\n"; echo " Serial Number: " . $device->serialNumber . "\n"; echo " End User ID: " . $device->endUserId . "\n"; echo " Status: " . $device->deviceStatus . "\n"; // NORMAL, LOCKED echo " Type: " . $device->gmtType . "\n"; if ($device->adUser) { echo " AD Domain: " . $device->adUser->adDomain . "\n"; } echo "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### List All User Properties Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Query all user properties associated with an Alibaba Cloud account. This includes property keys, values, and their IDs. ```php listProperty($request); $body = $response->body; foreach ($body->properties as $property) { echo "Property: " . $property->propertyKey . " (ID: " . $property->propertyId . ")\n"; foreach ($property->propertyValues as $value) { echo " - " . $value->propertyValue . " (ID: " . $value->propertyValueId . ")\n"; } echo "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### ListProperty Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Queries all user properties within an Alibaba Cloud account. ```APIDOC ## ListProperty ### Description Queries all user properties within an Alibaba Cloud account. Returns property definitions including keys, values, and their IDs. ``` -------------------------------- ### Describe MFA Devices API Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Queries information about virtual multi-factor authentication (MFA) devices bound to convenience accounts. ```APIDOC ## GET /api/edsuser/describeMfaDevices ### Description Queries information about virtual multi-factor authentication (MFA) devices bound to convenience accounts. Returns device status and user bindings. ### Method GET ### Endpoint /api/edsuser/describeMfaDevices ### Parameters #### Query Parameters - **endUserIds** (array[string]) - Optional - A list of user IDs to query MFA devices for. - **maxResults** (integer) - Optional - The maximum number of results to return. ### Request Example ```json { "endUserIds": ["user001", "user002"], "maxResults": 100 } ``` ### Response #### Success Response (200) - **mfaDevices** (array[object]) - A list of MFA devices. - **serialNumber** (string) - The serial number of the MFA device. - **endUserId** (string) - The ID of the user bound to the device. - **deviceStatus** (string) - The status of the MFA device (e.g., NORMAL, LOCKED). - **gmtType** (string) - The type of the MFA device. - **adUser** (object) - Information about the AD user if applicable. - **adDomain** (string) - The AD domain of the user. #### Response Example ```json { "mfaDevices": [ { "serialNumber": "mfa-device-serial-12345", "endUserId": "user001", "deviceStatus": "NORMAL", "gmtType": "VIRTUAL", "adUser": { "adDomain": "example.com" } } ] } ``` ``` -------------------------------- ### Describe Resource Groups in PHP Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Queries resource groups with optional filtering. Iterates through associated policies and timers in the response. ```php 'Dev', 'platform' => 'Windows', 'pageNumber' => 1, 'pageSize' => 20 ]); try { $response = $client->describeResourceGroups($request); $body = $response->body; foreach ($body->resourceGroup as $group) { echo "Resource Group: " . $group->resourceGroupName . "\n"; echo " ID: " . $group->resourceGroupId . "\n"; echo " Platform: " . $group->platform . "\n"; // Show policies if (!empty($group->policies)) { foreach ($group->policies as $policy) { echo " Policy: " . $policy->policyName . "\n"; } } // Show timers if (!empty($group->timers)) { foreach ($group->timers as $timer) { echo " Timer: Status=" . $timer->timerStatus . ", Bind=" . $timer->bindStatus . "\n"; } } echo "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Describe Users with PHP Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Retrieves user information including status, organization, and group memberships. Supports pagination and filtering by user IDs or organization. ```php ['user001', 'user002', 'user003'], 'maxResults' => 100, 'filter' => 'user', // Filter string to search by username 'status' => 0, // 0: Normal, 9: Locked 'orgId' => 'org-aliyun-wy-org-id', 'isQueryAllSubOrgs' => true ]); try { $response = $client->describeUsers($request); $body = $response->body; echo "Total Users Found: " . count($body->users) . "\n\n"; foreach ($body->users as $user) { echo "User ID: " . $user->endUserId . "\n"; echo " Email: " . $user->email . "\n"; echo " Phone: " . $user->phone . "\n"; echo " Status: " . ($user->status == 0 ? 'Normal' : 'Locked') . "\n"; echo " Password Expire Days: " . $user->passwordExpireDays . "\n"; echo " Is Desktop Manager: " . ($user->desktopManager ? 'Yes' : 'No') . "\n"; // Organization info if (!empty($user->orgs)) { foreach ($user->orgs as $org) { echo " Organization: " . $org->orgName . " (ID: " . $org->orgId . ")\n"; } } // Group memberships if (!empty($user->groups)) { foreach ($user->groups as $group) { echo " Group: " . $group->groupName . " (ID: " . $group->groupId . ")\n"; } } echo "\n"; } // Handle pagination if ($body->nextToken) { echo "More results available. NextToken: " . $body->nextToken . "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Associate Property Value with User Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Use this to link a specific property value to a convenience user. Requires user ID, user name, property ID, and property value ID. ```php 12345678, // Internal user ID 'userName' => 'user001', // User's EndUserId 'propertyId' => 100, // Property ID 'propertyValueId' => 200 // Property value ID ]); try { $response = $client->setUserPropertyValue($request); echo "Property value set for user!\n"; echo "Request ID: " . $response->body->requestId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Create Custom User Property Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Use this to create a custom user property. Ensure the property key and values are defined correctly. ```php 'Department', 'propertyValues' => ['Engineering', 'Marketing', 'Sales', 'HR', 'Finance'] ]); try { $response = $client->createProperty($request); $body = $response->body; echo "Property Created!\n"; echo "Property ID: " . $body->createResult->propertyId . "\n"; echo "Property Key: " . $body->createResult->propertyKey . "\n"; // Show saved property values foreach ($body->createResult->savePropertyValueModel->savePropertyValues as $value) { echo " Value ID: " . $value->propertyValueId . " - " . $value->propertyValue . "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### CreateOrg Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Creates an organization in the hierarchical organization tree. ```APIDOC ## CreateOrg ### Description Creates an organization in the hierarchical organization tree. Organizations are used to structure users and apply policies at different levels. ### Parameters #### Request Body - **orgName** (string) - Required - Name of the organization - **parentOrgId** (string) - Required - Parent organization ID ### Response #### Success Response (200) - **orgId** (string) - The ID of the created organization - **requestId** (string) - The unique request identifier ``` -------------------------------- ### Batch Manage User Group Membership with PHP Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Adds or removes multiple users from a specific group in a single operation. ```php 'ug-12345678901234567', 'endUserIds' => ['user001', 'user002', 'user003', 'user004'] ]); try { $response = $client->userBatchJoinGroup($request); echo "Users successfully added to group!\n"; echo "Request ID: " . $response->body->requestId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` ```php 'ug-12345678901234567', 'endUserIds' => ['user003', 'user004'] ]); try { $response = $client->userBatchQuitGroup($request); echo "Users successfully removed from group!\n"; echo "Request ID: " . $response->body->requestId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### CreateProperty Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Creates a custom user property that can be associated with convenience users. ```APIDOC ## CreateProperty ### Description Creates a custom user property that can be associated with convenience users. Properties allow you to add custom metadata to users for filtering and organization. ### Request Body - **propertyKey** (string) - Required - The key name of the property. - **propertyValues** (array) - Required - A list of values associated with the property. ``` -------------------------------- ### Query User Groups with PHP Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Retrieves a list of user groups with optional filtering and pagination. Accesses group details such as member counts and attached policies. ```php 'Development', // Partial match search 'pageNumber' => 1, 'pageSize' => 20 ]); try { $response = $client->describeGroups($request); $body = $response->body; echo "Total Groups: " . $body->count . "\n\n"; foreach ($body->groups as $group) { echo "Group: " . $group->groupName . "\n"; echo " ID: " . $group->groupId . "\n"; echo " Description: " . $group->description . "\n"; echo " User Count: " . $group->userCount . "\n"; echo " Created: " . $group->createTime . "\n"; echo " Transfer File Need Approval: " . ($group->transferFileNeedApproval ? 'Yes' : 'No') . "\n"; // Show attached login policy if any if ($group->attachedLoginPolicy) { echo " Login Policy: " . $group->attachedLoginPolicy->name . "\n"; } echo "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### DescribeUsers Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Queries information about convenience users including username, email address, status, organization, and group memberships. Supports filtering by user IDs, organization, group, and status with pagination. ```APIDOC ## DescribeUsers ### Description Queries information about convenience users including username, email address, status, organization, and group memberships. Supports filtering by user IDs, organization, group, and status with pagination. ### Parameters #### Request Body - **endUserIds** (array) - Optional - List of specific user IDs to query. - **maxResults** (integer) - Optional - Maximum number of results to return. - **filter** (string) - Optional - Filter string to search by username. - **status** (integer) - Optional - User status (0: Normal, 9: Locked). - **orgId** (string) - Optional - Organization ID. - **isQueryAllSubOrgs** (boolean) - Optional - Whether to query all sub-organizations. ``` -------------------------------- ### CreateGroup Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Creates a user group for organizing and managing convenience users. Groups can be used to assign resources and policies to multiple users simultaneously. ```APIDOC ## CreateGroup ### Description Creates a user group for organizing and managing convenience users. Groups can be used to assign resources and policies to multiple users simultaneously. ### Parameters #### Request Body - **groupName** (string) - Required - The name of the group. - **description** (string) - Optional - Description of the group. - **parentGroupId** (string) - Optional - ID of the parent group, empty for root-level. ``` -------------------------------- ### DescribeGroups Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Queries user groups with support for filtering by group name, ID, and pagination. ```APIDOC ## DescribeGroups ### Description Queries user groups with support for filtering by group name, ID, and pagination. Returns group details including member count, description, and associated policies. ### Parameters #### Request Body - **groupName** (string) - Optional - Partial match search for group name - **pageNumber** (integer) - Optional - Page number - **pageSize** (integer) - Optional - Number of items per page ### Response #### Success Response (200) - **count** (integer) - Total number of groups - **groups** (array) - List of group objects containing groupName, groupId, description, userCount, createTime, transferFileNeedApproval, and attachedLoginPolicy ``` -------------------------------- ### DescribeOrgs Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Queries organizations in the organization tree. ```APIDOC ## DescribeOrgs ### Description Queries organizations in the organization tree. Returns organization hierarchy information including names, IDs, and parent relationships. ### Parameters #### Request Body - **orgName** (string) - Optional - Filter by name - **parentOrgId** (string) - Optional - Parent organization ID - **maxResults** (integer) - Optional - Maximum number of results - **showExtras** (object) - Optional - Extra fields to include (e.g., OrgNamePath) ### Response #### Success Response (200) - **orgs** (array) - List of organization objects containing orgName, orgId, parentOrgId, and orgNamePath - **nextToken** (string) - Token for pagination ``` -------------------------------- ### Remove MFA Device API Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Removes a virtual MFA device bound to a convenience account. ```APIDOC ## POST /api/edsuser/removeMfaDevice ### Description Removes a virtual MFA device bound to a convenience account. The user must bind a new MFA device before logging in to MFA-enabled workspaces. ### Method POST ### Endpoint /api/edsuser/removeMfaDevice ### Parameters #### Request Body - **serialNumber** (string) - Required - The serial number of the MFA device to remove. ### Request Example ```json { "serialNumber": "mfa-device-serial-12345" } ``` ### Response #### Success Response (200) - **requestId** (string) - The ID of the request. #### Response Example ```json { "requestId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### UserBatchJoinGroup Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Adds multiple users to a user group in a single batch operation. ```APIDOC ## UserBatchJoinGroup ### Description Adds multiple users to a user group in a single batch operation. Efficiently assigns group membership to multiple convenience users. ### Parameters #### Request Body - **groupId** (string) - Required - The ID of the target group - **endUserIds** (array) - Required - List of user IDs to add to the group ### Response #### Success Response (200) - **requestId** (string) - The unique request identifier ``` -------------------------------- ### MoveUserOrg Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Moves users to a specific organization. ```APIDOC ## MoveUserOrg ### Description Moves users to a specific organization. Updates the organizational assignment for one or more convenience users. ### Parameters #### Request Body - **orgId** (string) - Required - Target organization ID - **endUserIds** (array) - Required - List of user IDs to move ### Response #### Success Response (200) - **requestId** (string) - The unique request identifier ``` -------------------------------- ### Remove MFA Device Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Deletes the binding of a virtual MFA device from a convenience account. ```php 'mfa-device-serial-12345' ]); try { $response = $client->removeMfaDevice($request); echo "MFA device removed!\n"; echo "Request ID: " . $response->body->requestId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Update API DescribeMfaDevices Source: https://github.com/alibabacloud-sdk-php/eds-user-20210308/blob/master/ChangeLog.md Details on the updates to the DescribeMfaDevices API, including new request and response parameters. ```APIDOC ## GET /api/DescribeMfaDevices ### Description Retrieves information about MFA devices. This version adds a filter parameter and includes AD user information in the response. ### Method GET ### Endpoint /api/DescribeMfaDevices ### Parameters #### Query Parameters - **Filter** (String) - Optional - Filters MFA devices based on specified criteria. #### Response #### Success Response (200) - **Body.MfaDevices.$.AdUser** (String) - The AD user associated with the MFA device. ``` -------------------------------- ### Unlock Convenience Users Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Unlocks one or more previously locked convenience users, restoring their access to cloud desktops. An optional auto-lock time can be set. ```php ['user001', 'user002'], 'autoLockTime' => '' // Optional: set auto-lock time ]); try { $response = $client->unlockUsers($request); $body = $response->body; echo "Unlock operation completed!\n"; foreach ($body->unlockUsersResult->unlockedUsers as $unlockedUser) { echo "Unlocked: " . $unlockedUser->endUserId . "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Unlock MFA Device Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Restores authentication capabilities for a user by unlocking their virtual MFA device. ```php 'mfa-device-serial-12345' ]); try { $response = $client->unlockMfaDevice($request); echo "MFA device unlocked!\n"; echo "Request ID: " . $response->body->requestId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Batch Operations Updates Source: https://github.com/alibabacloud-sdk-php/eds-user-20210308/blob/master/ChangeLog.md This section covers updates to various batch operations, primarily the addition of the 'BusinessChannel' parameter. ```APIDOC ## Batch Operations Updates ### Description Several batch operation APIs have been updated to include the 'BusinessChannel' parameter, allowing for more granular control and tracking. ### Method POST ### Endpoints - /api/BatchSetDesktopManager - /api/ChangeUserPassword - /api/CheckUsedProperty - /api/CheckUsedPropertyValue - /api/CreateGroup - /api/CreateOrg - /api/CreateProperty - /api/CreateUsers - /api/DeleteResourceGroup - /api/DeleteUserPropertyValue - /api/DescribeGroupUser - /api/DescribeGroups - /api/DescribeMfaDevices - /api/DescribeOrgByLayer - /api/DescribeOrgs - /api/DescribeResourceGroups - /api/DescribeUsers - /api/FilterUsers - /api/InitTenantAlias - /api/ListProperty - /api/ListPropertyValue - /api/LockMfaDevice - /api/LockUsers - /api/ModifyGroup - /api/ModifyOrg - /api/ModifyUser - /api/MoveOrg - /api/MoveUserOrg - /api/QuerySyncStatusByAliUid - /api/RemoveGroup - /api/RemoveMfaDevice - /api/RemoveOrg - /api/RemoveProperty - /api/RemoveUsers - /api/ResetUserPassword - /api/SetUserPropertyValue - /api/UnlockMfaDevice - /api/UnlockUsers - /api/UpdateProperty - /api/UserBatchJoinGroup - /api/UserBatchQuitGroup ### Parameters #### Request Body - **BusinessChannel** (String) - Optional - Specifies the business channel for the operation. ``` -------------------------------- ### Lock Convenience Users Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Locks one or more convenience users to prevent access to cloud desktops. Optionally forces logout of active sessions. ```php ['user001', 'user002'], 'logoutSession' => true // Force logout of active sessions ]); try { $response = $client->lockUsers($request); $body = $response->body; echo "Lock operation completed!\n"; foreach ($body->lockUsersResult->lockedUsers as $lockedUser) { echo "Locked: " . $lockedUser->endUserId . "\n"; } foreach ($body->lockUsersResult->failedUsers as $failedUser) { echo "Failed: " . $failedUser->endUserId . " - " . $failedUser->errorMessage . "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Lock MFA Device API Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Locks a virtual MFA device bound to a convenience user. ```APIDOC ## POST /api/edsuser/lockMfaDevice ### Description Locks a virtual MFA device bound to a convenience user. The user cannot log in to MFA-enabled workspaces until the device is unlocked. ### Method POST ### Endpoint /api/edsuser/lockMfaDevice ### Parameters #### Request Body - **serialNumber** (string) - Required - The serial number of the MFA device to lock. ### Request Example ```json { "serialNumber": "mfa-device-serial-12345" } ``` ### Response #### Success Response (200) - **requestId** (string) - The ID of the request. #### Response Example ```json { "requestId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### Unlock MFA Device API Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Unlocks a previously locked virtual MFA device. ```APIDOC ## POST /api/edsuser/unlockMfaDevice ### Description Unlocks a previously locked virtual MFA device, restoring the user's ability to authenticate with MFA. ### Method POST ### Endpoint /api/edsuser/unlockMfaDevice ### Parameters #### Request Body - **serialNumber** (string) - Required - The serial number of the MFA device to unlock. ### Request Example ```json { "serialNumber": "mfa-device-serial-12345" } ``` ### Response #### Success Response (200) - **requestId** (string) - The ID of the request. #### Response Example ```json { "requestId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### LockUsers Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Locks one or more convenience users, preventing them from accessing cloud desktops. ```APIDOC ## LockUsers ### Description Locks one or more convenience users, preventing them from accessing cloud desktops. Optionally logs out active sessions. ### Request Body - **users** (array) - Required - List of user IDs to lock. - **logoutSession** (boolean) - Optional - Force logout of active sessions. ``` -------------------------------- ### Update API DescribeOrgs Source: https://github.com/alibabacloud-sdk-php/eds-user-20210308/blob/master/ChangeLog.md Details on the updates to the DescribeOrgs API, including new request and response parameters. ```APIDOC ## GET /api/DescribeOrgs ### Description Retrieves information about organizations. This version adds a parameter to show extra details and includes the organization name path in the response. ### Method GET ### Endpoint /api/DescribeOrgs ### Parameters #### Query Parameters - **ShowExtras** (Boolean) - Optional - Specifies whether to show extra organization details. #### Response #### Success Response (200) - **Body.Orgs.$.OrgNamePath** (String) - The hierarchical path of the organization's name. ``` -------------------------------- ### Lock MFA Device Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Prevents a user from logging into MFA-enabled workspaces by locking their virtual MFA device. ```php 'mfa-device-serial-12345' ]); try { $response = $client->lockMfaDevice($request); echo "MFA device locked!\n"; echo "Request ID: " . $response->body->requestId . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Update API CreateUsers Source: https://github.com/alibabacloud-sdk-php/eds-user-20210308/blob/master/ChangeLog.md Details on the updates to the CreateUsers API, including new request parameters. ```APIDOC ## POST /api/CreateUsers ### Description Creates new users. This version adds the ability to specify the group list for new users during creation. ### Method POST ### Endpoint /api/CreateUsers ### Parameters #### Request Body - **Users** (Array) - Required - List of users to create. - **GroupIdList** (Array) - Optional - List of group IDs to which the user belongs. ``` -------------------------------- ### FilterUsers Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Filters convenience accounts by custom properties, organization, status, and other criteria. Provides advanced filtering capabilities including property-based filtering and result ordering. ```APIDOC ## FilterUsers ### Description Filters convenience accounts by custom properties, organization, status, and other criteria. Provides advanced filtering capabilities including property-based filtering and result ordering. ### Parameters #### Request Body - **filter** (string) - Optional - Search term for filtering. - **orgId** (string) - Optional - Organization ID. - **isQueryAllSubOrgs** (boolean) - Optional - Whether to query all sub-organizations. - **status** (integer) - Optional - User status (0: Normal). - **maxResults** (integer) - Optional - Maximum number of results to return. - **propertyFilterParam** (array) - Optional - List of property filter parameters. - **orderParam** (object) - Optional - Configuration for result ordering. - **includeDesktopCount** (boolean) - Optional - Include desktop count in response. - **includeDesktopGroupCount** (boolean) - Optional - Include desktop group count in response. - **includeOrgInfo** (boolean) - Optional - Include organization information in response. ``` -------------------------------- ### Reset User Password Source: https://context7.com/alibabacloud-sdk-php/eds-user-20210308/llms.txt Initiates a password reset for specified users by sending an email notification. ```php ['user001', 'user002'], 'notifyType' => 1 // 1: Send email notification ]); try { $response = $client->resetUserPassword($request); $body = $response->body; foreach ($body->resetUsersResult->resetUsers as $resetUser) { echo "Password reset initiated for: " . $resetUser->endUserId . "\n"; } } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; } ```