ecd-20201002/main.tea (2,837 lines of code) (raw):
/**
*
*/
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;
extends OpenApi;
init(config: OpenApi.Config){
super(config);
@signatureAlgorithm = 'v2';
@endpointRule = 'regional';
checkConfig(config);
@endpoint = getEndpoint('ecd', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}
function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
if (!Util.empty(endpoint)) {
return endpoint;
}
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
return endpointMap[regionId];
}
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model OssUploadCredential {
accessKeyId?: string(name='AccessKeyId'),
endpoint?: string(name='Endpoint'),
filePath?: string(name='FilePath'),
ossPolicy?: string(name='OssPolicy'),
ossSignature?: string(name='OssSignature'),
stsToken?: string(name='StsToken'),
}
model ApproveFotaUpdateRequest {
appVersion?: string(name='AppVersion', description='This parameter is required.', example='0.0.1-D-20220513.14****'),
clientId?: string(name='ClientId', description='This parameter is required.', example='d4452bd7-88df-4b90-a409-806da674****'),
desktopId?: string(name='DesktopId', example='ecd-138dsptkrt00u****'),
loginToken?: string(name='LoginToken', description='This parameter is required.', example='v18390c954ce59e2915ef16663205371721e0db9a46179ac89249a203320459523cb54ad08efe324784dd0eba25950****'),
regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', example='4771b873-c757-4893-973c-7f5beejh****'),
targetStatus?: string(name='TargetStatus'),
uuid?: string(name='Uuid'),
}
model ApproveFotaUpdateResponseBody = {
requestId?: string(name='RequestId', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
}
model ApproveFotaUpdateResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ApproveFotaUpdateResponseBody(name='body'),
}
/**
* @summary 允许桌面FOTA升级
*
* @param request ApproveFotaUpdateRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ApproveFotaUpdateResponse
*/
async function approveFotaUpdateWithOptions(request: ApproveFotaUpdateRequest, runtime: Util.RuntimeOptions): ApproveFotaUpdateResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.appVersion)) {
query['AppVersion'] = request.appVersion;
}
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.targetStatus)) {
query['TargetStatus'] = request.targetStatus;
}
if (!Util.isUnset(request.uuid)) {
query['Uuid'] = request.uuid;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ApproveFotaUpdate',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 允许桌面FOTA升级
*
* @param request ApproveFotaUpdateRequest
* @return ApproveFotaUpdateResponse
*/
async function approveFotaUpdate(request: ApproveFotaUpdateRequest): ApproveFotaUpdateResponse {
var runtime = new Util.RuntimeOptions{};
return approveFotaUpdateWithOptions(request, runtime);
}
model ChangePasswordRequest {
clientId?: string(name='ClientId', description='The client ID. The system generates a unique ID for each client.
This parameter is required.', example='42f6645a-9c3c-4772-be2a-cc5f5732****'),
endUserId?: string(name='EndUserId', description='The user ID.
This parameter is required.', example='liming'),
loginToken?: string(name='LoginToken', description='The logon token.
This parameter is required.', example='v18101ac6a9e69c66b04a163031680463660b4b216cd758f34b60b9ad6a7c7f7334b83dd8f75eef4209c68f9f1080b****'),
newPassword?: string(name='NewPassword', description='The new password.
This parameter is required.', example='67436290'),
officeSiteId?: string(name='OfficeSiteId', description='The office network ID.
This parameter is required.', example='cn-shanghai+dir-227468****'),
oldPassword?: string(name='OldPassword', description='The current password.
This parameter is required.', example='12345678'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='The session ID.', example='1'),
}
model ChangePasswordResponseBody = {
loginToken?: string(name='LoginToken', description='The logon token.', example='v18101ac6a9e69c66b04a163031680463660b4b216cd758f34b60b9ad6a7c7f7334b83dd8f75eef4209c68f9f1080b****'),
requestId?: string(name='RequestId', description='The request ID.', example='484256DA-D816-44D2-9D86-B6EE4D5B****'),
}
model ChangePasswordResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ChangePasswordResponseBody(name='body'),
}
/**
* @summary Changes the password of a user account.
*
* @param request ChangePasswordRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ChangePasswordResponse
*/
async function changePasswordWithOptions(request: ChangePasswordRequest, runtime: Util.RuntimeOptions): ChangePasswordResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.endUserId)) {
query['EndUserId'] = request.endUserId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.newPassword)) {
query['NewPassword'] = request.newPassword;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.oldPassword)) {
query['OldPassword'] = request.oldPassword;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ChangePassword',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Changes the password of a user account.
*
* @param request ChangePasswordRequest
* @return ChangePasswordResponse
*/
async function changePassword(request: ChangePasswordRequest): ChangePasswordResponse {
var runtime = new Util.RuntimeOptions{};
return changePasswordWithOptions(request, runtime);
}
model DeleteFingerPrintTemplateRequest {
clientId?: string(name='ClientId', description='This parameter is required.', example='59e86b39-ccac-4dfa-93d7-1f724052****'),
clientToken?: string(name='ClientToken', example='40401e62-5caf-4508-8de7-bf98af12****'),
index?: int32(name='Index', description='This parameter is required.', example='1'),
loginToken?: string(name='LoginToken', description='This parameter is required.', example='v1c0436c721786529914f16516396228454fa6284c9b80f9917f25ebbec2aa30c10343e3f6f9aff64500ce13808aef****'),
regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='This parameter is required.', example='6df06330-3b75-4768-b334-41a73a64****'),
}
model DeleteFingerPrintTemplateResponseBody = {
requestId?: string(name='RequestId', example='134BD0B2-B848-5743-9CE2-C1FD3D5F****'),
}
model DeleteFingerPrintTemplateResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteFingerPrintTemplateResponseBody(name='body'),
}
/**
* @param request DeleteFingerPrintTemplateRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteFingerPrintTemplateResponse
*/
async function deleteFingerPrintTemplateWithOptions(request: DeleteFingerPrintTemplateRequest, runtime: Util.RuntimeOptions): DeleteFingerPrintTemplateResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.index)) {
query['Index'] = request.index;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteFingerPrintTemplate',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request DeleteFingerPrintTemplateRequest
* @return DeleteFingerPrintTemplateResponse
*/
async function deleteFingerPrintTemplate(request: DeleteFingerPrintTemplateRequest): DeleteFingerPrintTemplateResponse {
var runtime = new Util.RuntimeOptions{};
return deleteFingerPrintTemplateWithOptions(request, runtime);
}
model DescribeDirectoriesRequest {
clientId?: string(name='ClientId', description='The client ID. The system generates a unique ID for each client.
This parameter is required.', example='54c17e1d-2d72-4b87-aa33-25f3b3f2****'),
directoryId?: [ string ](name='DirectoryId', description='The directory IDs.'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-hangzhou'),
}
model DescribeDirectoriesResponseBody = {
directories?: [
{
desktopAccessType?: string(name='DesktopAccessType', description='The connection method.
Valid values:
* VPC: End users connect to cloud computers over an enterprise virtual private cloud (VPC).
* INTERNET: End users connect to cloud computers over the Internet.
* ANY: End users connect to cloud computers over the Internet or an enterprise VPC.', example='INTERNET'),
directoryId?: string(name='DirectoryId', description='The directory ID.', example='cn-hangzhou+dir-gx2x1dhsmu52rd****'),
directoryType?: string(name='DirectoryType', description='The directory type.', example='AD_CONNECTOR'),
providerId?: string(name='ProviderId', description='The provider ID.', example='26842'),
ssoServiceUrl?: string(name='SsoServiceUrl', description='The URL of the SSO service.', example='https://eds-cn-shanghai-67726****'),
}
](name='Directories', description='The directories.'),
requestId?: string(name='RequestId', description='The request ID.', example='F369A091-002F-49C8-AD55-02A77629****'),
}
model DescribeDirectoriesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDirectoriesResponseBody(name='body'),
}
/**
* @summary Queries directory details.
*
* @param request DescribeDirectoriesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDirectoriesResponse
*/
async function describeDirectoriesWithOptions(request: DescribeDirectoriesRequest, runtime: Util.RuntimeOptions): DescribeDirectoriesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.directoryId)) {
query['DirectoryId'] = request.directoryId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDirectories',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries directory details.
*
* @param request DescribeDirectoriesRequest
* @return DescribeDirectoriesResponse
*/
async function describeDirectories(request: DescribeDirectoriesRequest): DescribeDirectoriesResponse {
var runtime = new Util.RuntimeOptions{};
return describeDirectoriesWithOptions(request, runtime);
}
model DescribeFingerPrintTemplatesRequest {
clientId?: string(name='ClientId', description='The client ID. The system generates a unique ID for each client.
This parameter is required.', example='61e39dc6-0450-45f6-a372-2a09e938****'),
loginToken?: string(name='LoginToken', description='The logon token.
This parameter is required.', example='v189646d6f329e4dfcbf51653542202890570fec26e4f9ee26427c5920fcd93871f017d2190199c4c7d0c0bf00f573****'),
regionId?: string(name='RegionId', description='The region ID
This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='The session ID.
This parameter is required.', example='a5062d68-e550-4d09-8288-67c8ba9e****'),
}
model DescribeFingerPrintTemplatesResponseBody = {
fingerPrintTemplates?: [
{
clientId?: string(name='ClientId', description='The client ID. The system generates a unique ID for each client.', example='2258a3d5-b8f8-4d79-a221-eaecf211****'),
creationTime?: string(name='CreationTime', description='The time when the template was created.', example='2022-03-13T13:26:29Z'),
description?: string(name='Description', description='The description of the template.', example='Finger 1'),
endUserId?: string(name='EndUserId', description='The user ID.', example='liming'),
index?: long(name='Index', description='The index.', example='1'),
loginTime?: string(name='LoginTime', description='The logon time.', example='2022-03-13T13:26:29Z'),
officeSiteId?: string(name='OfficeSiteId', description='The office network ID.', example='cn-hangzhou+dir-074949****'),
}
](name='FingerPrintTemplates', description='The fingerprint templates.'),
requestId?: string(name='RequestId', description='The request ID.', example='9C1D3FBE-84E1-5ABB-AD98-2003AC71****'),
}
model DescribeFingerPrintTemplatesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeFingerPrintTemplatesResponseBody(name='body'),
}
/**
* @summary Queries fingerprint templates.
*
* @param request DescribeFingerPrintTemplatesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeFingerPrintTemplatesResponse
*/
async function describeFingerPrintTemplatesWithOptions(request: DescribeFingerPrintTemplatesRequest, runtime: Util.RuntimeOptions): DescribeFingerPrintTemplatesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeFingerPrintTemplates',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries fingerprint templates.
*
* @param request DescribeFingerPrintTemplatesRequest
* @return DescribeFingerPrintTemplatesResponse
*/
async function describeFingerPrintTemplates(request: DescribeFingerPrintTemplatesRequest): DescribeFingerPrintTemplatesResponse {
var runtime = new Util.RuntimeOptions{};
return describeFingerPrintTemplatesWithOptions(request, runtime);
}
model DescribeGlobalDesktopsRequest {
clientId?: string(name='ClientId', description='This parameter is required.', example='c213150d-7ac3-432c-b749-6e1e090b****'),
desktopAccessType?: string(name='DesktopAccessType', example='INTERNET'),
desktopId?: [ string ](name='DesktopId'),
desktopName?: string(name='DesktopName', example='DesktopTest'),
desktopStatus?: string(name='DesktopStatus', example='Running'),
directoryId?: string(name='DirectoryId', example='cn-hangzhou+dir-880841****'),
keyword?: string(name='Keyword', description='关键字。支持模糊搜索桌面ID、云桌面名称和终端用户自定义的桌面名称。', example='ecd'),
language?: string(name='Language'),
loginRegionId?: string(name='LoginRegionId', example='cn-hangzhou'),
loginToken?: string(name='LoginToken', description='This parameter is required.', example='v147c9114a180489f89691663893169****'),
maxResults?: int32(name='MaxResults', example='500'),
nextToken?: string(name='NextToken', example='eyJkZWZhdWx0IjpbIjk2MjEy****'),
officeSiteId?: string(name='OfficeSiteId', example='cn-hangzhou+dir-880841****'),
orderBy?: string(name='OrderBy', example='AssignTime'),
queryFotaUpdate?: boolean(name='QueryFotaUpdate', example='true'),
regionId?: string(name='RegionId', example='cn-shanghai'),
searchRegionId?: string(name='SearchRegionId', example='cn-shanghai'),
sessionId?: string(name='SessionId', example='5c456a41-1e65-4e72-ab4d-5dcfff52****'),
sortType?: string(name='SortType', example='ASC'),
withoutLatency?: boolean(name='WithoutLatency', example='true'),
}
model DescribeGlobalDesktopsResponseBody = {
desktops?: [
{
chargeType?: string(name='ChargeType', example='PostPaid'),
clients?: [
{
clientType?: string(name='ClientType', description='客户端类型,取值:
- macos:Mac客户端
- ios:IOS客户端
- android:Android客户端
- html5:Web客户端
- windows:Windows客户端
- linux:Linux客户端', example='windows'),
status?: string(name='Status', description='客户端状态,取值:
- ON:允许登录
- OFF:不允许登录', example='ON'),
}
](name='Clients', description='支持的客户端信息'),
connectionStatus?: string(name='ConnectionStatus', example='Disconnected'),
cpu?: int32(name='Cpu', example='2'),
creationTime?: string(name='CreationTime', example='2020-11-06T08:28Z'),
desktopGroupId?: string(name='DesktopGroupId', example='dg-3uiojcc0j4kh7****'),
desktopId?: string(name='DesktopId', example='ecd-gx2x1dhsmucyy****'),
desktopName?: string(name='DesktopName', example='testDesktopName'),
desktopStatus?: string(name='DesktopStatus', example='Running'),
desktopTimers?: [
{
allowClientSetting?: boolean(name='AllowClientSetting'),
cronExpression?: string(name='CronExpression', example='0 0 0 ? * 1'),
enforce?: boolean(name='Enforce', example='false'),
executionTime?: string(name='ExecutionTime'),
interval?: int32(name='Interval', example='60'),
operationType?: string(name='OperationType'),
resetType?: string(name='ResetType', example='RESET_TYPE_BOTH'),
timerType?: string(name='TimerType', example='NoConnectShutdown'),
}
](name='DesktopTimers'),
desktopType?: string(name='DesktopType', example='ecd.basic.large'),
directoryId?: string(name='DirectoryId', example='cn-hangzhou+dir-jedbpr4sl9l37****'),
disks?: [
{
diskId?: string(name='DiskId', example='d-jedbpr4sl9l37****'),
diskSize?: int32(name='DiskSize', example='80'),
diskType?: string(name='DiskType', example='SYSTEM'),
}
](name='Disks'),
endUserId?: string(name='EndUserId', example='User1'),
endUserIds?: [ string ](name='EndUserIds'),
expiredTime?: string(name='ExpiredTime', example='2021-12-31T15:59Z'),
fotaUpdate?: {
channel?: string(name='Channel', example='Enterprise'),
currentAppVersion?: string(name='CurrentAppVersion', example='0.0.0-D-20220102.xxxx'),
force?: boolean(name='Force', example='false'),
newAppVersion?: string(name='NewAppVersion', example='0.0.0-R-20220307.xxxx'),
newDcdVersion?: string(name='NewDcdVersion'),
project?: string(name='Project', example='testProject'),
releaseNote?: string(name='ReleaseNote'),
releaseNoteEn?: string(name='ReleaseNoteEn'),
releaseNoteJp?: string(name='ReleaseNoteJp'),
size?: string(name='Size', example='100'),
}(name='FotaUpdate'),
gpuMemory?: int32(name='GpuMemory', example='2048'),
hibernationBeta?: boolean(name='HibernationBeta'),
hostName?: string(name='HostName', example='testName'),
imageId?: string(name='ImageId', example='m-4zfb6zj728hhr****'),
lastStartTime?: string(name='LastStartTime', example='2021-07-13T15:59Z'),
localName?: string(name='LocalName'),
managementFlags?: [ string ](name='ManagementFlags'),
memory?: long(name='Memory', example='4096'),
networkInterfaceIp?: string(name='NetworkInterfaceIp', example='192.168.xx.xx'),
officeSiteId?: string(name='OfficeSiteId', example='cn-hangzhou+dir-363353****'),
os?: string(name='Os'),
osDescription?: string(name='OsDescription'),
osType?: string(name='OsType', example='Windows'),
platform?: string(name='Platform'),
policyGroupId?: string(name='PolicyGroupId', example='pg-9cktlowtxfl6****'),
protocolType?: string(name='ProtocolType', example='ASP'),
realDesktopId?: string(name='RealDesktopId', example='ecd-gx2x1dhsm****'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
regionLocation?: string(name='RegionLocation'),
sessionType?: string(name='SessionType'),
sessions?: [
{
endUserId?: string(name='EndUserId', example='User1'),
establishmentTime?: string(name='EstablishmentTime', example='2021-03-07T08:23Z'),
}
](name='Sessions'),
supportHibernation?: boolean(name='SupportHibernation', example='true'),
userCustomName?: string(name='UserCustomName', example='testDesktop'),
}
](name='Desktops'),
nextToken?: string(name='NextToken', example='eyJkZWZhdWx0IjpbIjIwMjItMDgtMTdUM****'),
requestId?: string(name='RequestId', example='4686A731-D601-548C-83E2-4CB6371E****'),
}
model DescribeGlobalDesktopsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeGlobalDesktopsResponseBody(name='body'),
}
/**
* @param request DescribeGlobalDesktopsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeGlobalDesktopsResponse
*/
async function describeGlobalDesktopsWithOptions(request: DescribeGlobalDesktopsRequest, runtime: Util.RuntimeOptions): DescribeGlobalDesktopsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.desktopAccessType)) {
query['DesktopAccessType'] = request.desktopAccessType;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.desktopName)) {
query['DesktopName'] = request.desktopName;
}
if (!Util.isUnset(request.desktopStatus)) {
query['DesktopStatus'] = request.desktopStatus;
}
if (!Util.isUnset(request.directoryId)) {
query['DirectoryId'] = request.directoryId;
}
if (!Util.isUnset(request.keyword)) {
query['Keyword'] = request.keyword;
}
if (!Util.isUnset(request.language)) {
query['Language'] = request.language;
}
if (!Util.isUnset(request.loginRegionId)) {
query['LoginRegionId'] = request.loginRegionId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.orderBy)) {
query['OrderBy'] = request.orderBy;
}
if (!Util.isUnset(request.queryFotaUpdate)) {
query['QueryFotaUpdate'] = request.queryFotaUpdate;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.searchRegionId)) {
query['SearchRegionId'] = request.searchRegionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.sortType)) {
query['SortType'] = request.sortType;
}
if (!Util.isUnset(request.withoutLatency)) {
query['WithoutLatency'] = request.withoutLatency;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeGlobalDesktops',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request DescribeGlobalDesktopsRequest
* @return DescribeGlobalDesktopsResponse
*/
async function describeGlobalDesktops(request: DescribeGlobalDesktopsRequest): DescribeGlobalDesktopsResponse {
var runtime = new Util.RuntimeOptions{};
return describeGlobalDesktopsWithOptions(request, runtime);
}
model DescribeOfficeSitesRequest {
clientId?: string(name='ClientId', description='This parameter is required.', example='42f6645a-9c3c-4772-be2a-cc5f5732****'),
officeSiteId?: [ string ](name='OfficeSiteId'),
regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
}
model DescribeOfficeSitesResponseBody = {
officeSites?: [
{
desktopAccessType?: string(name='DesktopAccessType', example='VPC'),
desktopVpcEndpoint?: string(name='DesktopVpcEndpoint', example='http://ep-bp1s2vmbj55r5rzc****.epsrv-bp1pcfhpwvlpny01****.cn-hangzhou.privatelink.aliyuncs.com'),
officeSiteId?: string(name='OfficeSiteId', example='cn-hangzhou+dir-363353****'),
officeSiteType?: string(name='OfficeSiteType', example='SIMPLE'),
providerId?: string(name='ProviderId', example='268****'),
ssoServiceUrl?: string(name='SsoServiceUrl', example='https://eds-cn-shanghai-67****'),
}
](name='OfficeSites'),
requestId?: string(name='RequestId', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
}
model DescribeOfficeSitesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeOfficeSitesResponseBody(name='body'),
}
/**
* @param request DescribeOfficeSitesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeOfficeSitesResponse
*/
async function describeOfficeSitesWithOptions(request: DescribeOfficeSitesRequest, runtime: Util.RuntimeOptions): DescribeOfficeSitesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeOfficeSites',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request DescribeOfficeSitesRequest
* @return DescribeOfficeSitesResponse
*/
async function describeOfficeSites(request: DescribeOfficeSitesRequest): DescribeOfficeSitesResponse {
var runtime = new Util.RuntimeOptions{};
return describeOfficeSitesWithOptions(request, runtime);
}
model DescribeRegionsRequest {
clientId?: string(name='ClientId', description='The client ID. The system generates a unique ID for each client.
This parameter is required.', example='ac4a73ad-789a-449a-a88f-d18571d6****'),
regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'),
}
model DescribeRegionsResponseBody = {
regions?: [
{
regionEndpoint?: string(name='RegionEndpoint', description='The region endpoint.', example='ecd.cn-hangzhou.aliyuncs.com'),
regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'),
}
](name='Regions', description='The regions.'),
requestId?: string(name='RequestId', description='The request ID.', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
}
model DescribeRegionsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeRegionsResponseBody(name='body'),
}
/**
* @param request DescribeRegionsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeRegionsResponse
*/
async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeRegions',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request DescribeRegionsRequest
* @return DescribeRegionsResponse
*/
async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
var runtime = new Util.RuntimeOptions{};
return describeRegionsWithOptions(request, runtime);
}
model DescribeSnapshotsRequest {
clientId?: string(name='ClientId', description='This parameter is required.', example='16dad2b6-3c6d-4e4c-b057-78ecb13c****'),
desktopId?: string(name='DesktopId', example='ecd-gx2x1dhsmucyy****'),
loginToken?: string(name='LoginToken', description='This parameter is required.', example='v16abfb945208fc5745061668654680853da4a25202d1a394fcad57bba484e9827ad43ea7d10fb6bf13d44a4adc0e9****'),
maxResults?: int32(name='MaxResults', example='10'),
nextToken?: string(name='NextToken', example='AAAAAV3MpHK1AP0pfERHZN5pu6nmB7qrRFJ8vmttjxPL****'),
regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', example='a99b9aca-bac5-4da2-819e-400ce98f****'),
snapshotId?: string(name='SnapshotId', example='s-2ze81owrnv9pity4****'),
}
model DescribeSnapshotsResponseBody = {
nextToken?: string(name='NextToken', example='AAAAAV3MpHK1AP0pfERHZN5pu6nmB7qrRFJ8vmttjxPL****'),
requestId?: string(name='RequestId', example='51592A88-0F2C-55E6-AD2C-2AD9C10D****'),
snapshots?: [
{
creationTime?: string(name='CreationTime', example='2020-12-20T14:52:28Z'),
description?: string(name='Description', example='testDescription'),
desktopId?: string(name='DesktopId', example='ecd-g03l3tlm8djoj****'),
progress?: string(name='Progress', example='100%'),
remainTime?: int32(name='RemainTime', example='30'),
restorePointId?: string(name='RestorePointId'),
restorePointName?: string(name='RestorePointName'),
snapshotId?: string(name='SnapshotId', example='s-2zeipxmnhej803x7****'),
snapshotName?: string(name='SnapshotName', example='testSnapshotName'),
snapshotType?: string(name='SnapshotType', example='USER'),
sourceDiskSize?: string(name='SourceDiskSize', example='150'),
sourceDiskType?: string(name='SourceDiskType', example='SYSTEM'),
status?: string(name='Status', example='ACCOMPLISHED'),
}
](name='Snapshots'),
}
model DescribeSnapshotsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeSnapshotsResponseBody(name='body'),
}
/**
* @summary 列举快照
*
* @param request DescribeSnapshotsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeSnapshotsResponse
*/
async function describeSnapshotsWithOptions(request: DescribeSnapshotsRequest, runtime: Util.RuntimeOptions): DescribeSnapshotsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.snapshotId)) {
query['SnapshotId'] = request.snapshotId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeSnapshots',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 列举快照
*
* @param request DescribeSnapshotsRequest
* @return DescribeSnapshotsResponse
*/
async function describeSnapshots(request: DescribeSnapshotsRequest): DescribeSnapshotsResponse {
var runtime = new Util.RuntimeOptions{};
return describeSnapshotsWithOptions(request, runtime);
}
model DescribeUserResourcesRequest {
accessType?: string(name='AccessType', example='INTERNET'),
autoRefresh?: boolean(name='AutoRefresh', example='false'),
categoryId?: int32(name='CategoryId', example='0'),
categoryType?: int32(name='CategoryType', example='1'),
clientId?: string(name='ClientId', description='This parameter is required.', example='54c17e1d-2d72-4b87-aa33-25f3b3f2****'),
clientType?: string(name='ClientType', example='windows'),
clientVersion?: string(name='ClientVersion', example='7.6.0-R-20241112.222305'),
dualCenterForward?: boolean(name='DualCenterForward', example='false'),
language?: string(name='Language', example='zh-CN'),
loginRegionId?: string(name='LoginRegionId', example='cn-hangzhou'),
loginToken?: string(name='LoginToken', description='This parameter is required.', example='v18101ac6a9e69c66b04a163031680463660b4b216cd758f34b60b9ad6a7c7f7334b83dd8f75eef4209c68f9f1080b****'),
maxResults?: int32(name='MaxResults', example='500'),
nextToken?: string(name='NextToken', example='caeba0bbb2be03f84eb48b699f0a4883'),
officeSiteIds?: [ string ](name='OfficeSiteIds'),
orderBy?: string(name='OrderBy', example='AssignTime'),
productTypes?: [ string ](name='ProductTypes'),
protocolType?: string(name='ProtocolType', example='ASP'),
queryFotaUpdate?: boolean(name='QueryFotaUpdate', example='false'),
refreshFotaUpdate?: boolean(name='RefreshFotaUpdate', example='false'),
resourceIds?: [ string ](name='ResourceIds'),
resourceName?: string(name='ResourceName', example='testName'),
resourceTypes?: [ string ](name='ResourceTypes'),
scene?: string(name='Scene', example='desktop'),
searchRegionId?: string(name='SearchRegionId', example='cn-hangzhou'),
sessionId?: string(name='SessionId', example='cd45e873-650d-4d70-acb9-f996187a****'),
sortType?: string(name='SortType', example='ASC'),
}
model DescribeUserResourcesResponseBody = {
nextToken?: string(name='NextToken', example='AAAAAV3MpHK1AP0pfERHZN5pu6nmB7qrRFJ8vmttjxPL****'),
queryFailedResourceTypes?: [ string ](name='QueryFailedResourceTypes'),
rankVersion?: long(name='RankVersion', example='1732869815062'),
requestId?: string(name='RequestId', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
resources?: [
{
accessType?: string(name='AccessType', example='INTERNET'),
aliUid?: long(name='AliUid', example='194101959****'),
appId?: string(name='AppId', example='app-0001'),
authMode?: string(name='AuthMode', example='App'),
categoryId?: int32(name='CategoryId', example='0'),
categoryType?: int32(name='CategoryType', example='1'),
cdsName?: string(name='CdsName', example='cn-shanghai+cds-695277****'),
centerResourceId?: string(name='CenterResourceId', example='ecds-0****'),
chargeType?: string(name='ChargeType', example='PrePaid'),
clients?: [
{
clientType?: string(name='ClientType', example='windows'),
status?: string(name='Status', example='ON'),
}
](name='Clients'),
connectionProperties?: string(name='ConnectionProperties', example='{"authMode":"App"}'),
createTime?: string(name='CreateTime', example='2024-12-11T07:12:12Z'),
desktopDurationList?: [
{
orderInstanceId?: string(name='OrderInstanceId', example='mdp-0bxls4qpi6bl6****'),
packageCreationTime?: string(name='PackageCreationTime', example='2025-01-17T07:01Z'),
packageExpiredTime?: string(name='PackageExpiredTime', example='2025-02-17T15:59Z'),
packageId?: string(name='PackageId', example='mdp-0bxls4qpi6bl6****'),
packageStatus?: string(name='PackageStatus', example='Available'),
packageType?: string(name='PackageType', example='NORMAL_PACKAGE'),
packageUsedUpStrategy?: string(name='PackageUsedUpStrategy', example='Postpaid'),
periodEndTime?: string(name='PeriodEndTime', example='2025-02-17T15:59Z'),
periodStartTime?: string(name='PeriodStartTime', example='2025-01-17T07:01Z'),
postPaidLimitFee?: float(name='PostPaidLimitFee', example='199'),
totalDuration?: long(name='TotalDuration', example='432000'),
usedDuration?: long(name='UsedDuration', example='16850'),
}
](name='DesktopDurationList'),
desktopTimers?: [
{
allowClientSetting?: string(name='AllowClientSetting', example='false'),
cronExpression?: string(name='CronExpression', example='0 30 13 ? * 1-7'),
enforce?: boolean(name='Enforce', example='false'),
executionTime?: string(name='ExecutionTime', example='2025-01-21T11:37Z'),
interval?: int32(name='Interval', example='15'),
operationType?: string(name='OperationType', example='Hibernate'),
resetType?: string(name='ResetType', example='RESET_TYPE_SYSTEM'),
timerType?: string(name='TimerType', example='TimerBoot'),
}
](name='DesktopTimers'),
expiredTime?: string(name='ExpiredTime', example='2025-02-22T16:00:00Z'),
externalDomainId?: string(name='ExternalDomainId', example='stg114510'),
externalUserId?: string(name='ExternalUserId', example='test001'),
fotaUpdate?: {
channel?: string(name='Channel', example='aliyun'),
currentAppVersion?: string(name='CurrentAppVersion', example='2.7.0-R-20250122.154826'),
force?: boolean(name='Force', example='false'),
newAppVersion?: string(name='NewAppVersion', example='2.7.0-R-20250125.154826'),
newDcdVersion?: string(name='NewDcdVersion', example='2.6.9-R-20250123.153415'),
project?: string(name='Project', example='wuying-asp_single_session_desktop_win_x64'),
releaseNote?: string(name='ReleaseNote', example='up'),
releaseNoteEn?: string(name='ReleaseNoteEn', example='up'),
releaseNoteJp?: string(name='ReleaseNoteJp', example='up'),
size?: string(name='Size', example='474981930'),
}(name='FotaUpdate'),
globalStatus?: boolean(name='GlobalStatus', example='true'),
hasUpgrade?: boolean(name='HasUpgrade'),
hibernationBeta?: boolean(name='HibernationBeta', example='false'),
icon?: string(name='Icon', example='http://example.com/icon.png'),
lastStartTime?: string(name='LastStartTime', example='2025-01-24T03:12:04Z'),
localName?: string(name='LocalName'),
managementStatuses?: [ string ](name='ManagementStatuses'),
officeSiteId?: string(name='OfficeSiteId', example='cn-shanghai+dir-3367****'),
orderStatus?: string(name='OrderStatus', example='Normal'),
os?: string(name='Os', example='Windows Server 2022'),
osDescription?: string(name='OsDescription'),
osType?: string(name='OsType', example='Windows'),
osUpdate?: {
checkId?: string(name='CheckId'),
kbListString?: string(name='KbListString'),
packageCount?: int32(name='PackageCount'),
packages?: [
{
description?: string(name='Description'),
kb?: string(name='Kb'),
title?: string(name='Title'),
}
](name='Packages'),
updateCatalogUrl?: string(name='UpdateCatalogUrl'),
}(name='OsUpdate'),
productType?: string(name='ProductType', example='AndroidCloud'),
protocolType?: string(name='ProtocolType', example='ASP'),
realDesktopId?: string(name='RealDesktopId', example='ecd-0001'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
regionLocation?: string(name='RegionLocation', example='Mainland'),
resourceGroupId?: string(name='ResourceGroupId', example='dg-0****'),
resourceId?: string(name='ResourceId', example='ecd-d19tya8zi4****'),
resourceLevel?: string(name='ResourceLevel', example='Center'),
resourceName?: string(name='ResourceName', example='testName01'),
resourceSessionStatus?: string(name='ResourceSessionStatus', example='Connected'),
resourceStatus?: string(name='ResourceStatus', example='Running'),
resourceType?: string(name='ResourceType', example='Desktop'),
sessionType?: string(name='SessionType', example='SINGLE_SESSION'),
sessions?: [
{
nickName?: string(name='NickName'),
resourceSessionStartTime?: string(name='ResourceSessionStartTime', example='2025-01-22T11:03:36Z'),
userId?: string(name='UserId', example='user001'),
userPrincipalName?: string(name='UserPrincipalName', example='benchmark_test@test.shenzhen'),
}
](name='Sessions'),
subPayType?: string(name='SubPayType', example='PrePaid'),
supportHibernation?: boolean(name='SupportHibernation', example='true'),
supportedActions?: [ string ](name='SupportedActions'),
themeColor?: string(name='ThemeColor', example='#FFFFFF'),
userCustomName?: string(name='UserCustomName'),
version?: string(name='Version'),
}
](name='Resources'),
}
model DescribeUserResourcesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeUserResourcesResponseBody(name='body'),
}
/**
* @summary 查询用户资源列表
*
* @param request DescribeUserResourcesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeUserResourcesResponse
*/
async function describeUserResourcesWithOptions(request: DescribeUserResourcesRequest, runtime: Util.RuntimeOptions): DescribeUserResourcesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.accessType)) {
query['AccessType'] = request.accessType;
}
if (!Util.isUnset(request.autoRefresh)) {
query['AutoRefresh'] = request.autoRefresh;
}
if (!Util.isUnset(request.categoryId)) {
query['CategoryId'] = request.categoryId;
}
if (!Util.isUnset(request.categoryType)) {
query['CategoryType'] = request.categoryType;
}
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientType)) {
query['ClientType'] = request.clientType;
}
if (!Util.isUnset(request.clientVersion)) {
query['ClientVersion'] = request.clientVersion;
}
if (!Util.isUnset(request.dualCenterForward)) {
query['DualCenterForward'] = request.dualCenterForward;
}
if (!Util.isUnset(request.language)) {
query['Language'] = request.language;
}
if (!Util.isUnset(request.loginRegionId)) {
query['LoginRegionId'] = request.loginRegionId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.officeSiteIds)) {
query['OfficeSiteIds'] = request.officeSiteIds;
}
if (!Util.isUnset(request.orderBy)) {
query['OrderBy'] = request.orderBy;
}
if (!Util.isUnset(request.productTypes)) {
query['ProductTypes'] = request.productTypes;
}
if (!Util.isUnset(request.protocolType)) {
query['ProtocolType'] = request.protocolType;
}
if (!Util.isUnset(request.queryFotaUpdate)) {
query['QueryFotaUpdate'] = request.queryFotaUpdate;
}
if (!Util.isUnset(request.refreshFotaUpdate)) {
query['RefreshFotaUpdate'] = request.refreshFotaUpdate;
}
if (!Util.isUnset(request.resourceIds)) {
query['ResourceIds'] = request.resourceIds;
}
if (!Util.isUnset(request.resourceName)) {
query['ResourceName'] = request.resourceName;
}
if (!Util.isUnset(request.resourceTypes)) {
query['ResourceTypes'] = request.resourceTypes;
}
if (!Util.isUnset(request.scene)) {
query['Scene'] = request.scene;
}
if (!Util.isUnset(request.searchRegionId)) {
query['SearchRegionId'] = request.searchRegionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.sortType)) {
query['SortType'] = request.sortType;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeUserResources',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询用户资源列表
*
* @param request DescribeUserResourcesRequest
* @return DescribeUserResourcesResponse
*/
async function describeUserResources(request: DescribeUserResourcesRequest): DescribeUserResourcesResponse {
var runtime = new Util.RuntimeOptions{};
return describeUserResourcesWithOptions(request, runtime);
}
model EncryptPasswordRequest {
clientId?: string(name='ClientId', description='The ID of the client. The system generates a unique ID for each client.
This parameter is required.', example='1d40776f-e9cb-4e2b-a8da-308d10e8****'),
directoryId?: string(name='DirectoryId', description='The directory ID.', example='cn-beijing+dir-131196****'),
loginToken?: string(name='LoginToken', description='The logon token.
This parameter is required.', example='v1b16dcff3ab21a6c5ec01652238375511cff5a1db59fd4dc49afb37e2ea7a626af6f38109fd0498b6abd9de1af7743****'),
officeSiteId?: string(name='OfficeSiteId', description='The office network ID.', example='cn-beijing+dir-131196****'),
password?: string(name='Password', description='The password that you want to encrypt.
This parameter is required.', example='Ab123456'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-beijing'),
sessionId?: string(name='SessionId', description='The session ID.
This parameter is required.', example='c78e2e52-23d9-4401-a648-e67ac6ff****'),
}
model EncryptPasswordResponseBody = {
encryptedPassword?: string(name='EncryptedPassword', description='The encrypted password.', example='d34601bc-e6b1-4433-b0cc-8f6c5e52;n4apvGub3OBoj4Grwg==;thhO4UEomJfdvwnwlA=='),
requestId?: string(name='RequestId', description='The request ID.', example='AF538DA8-FFC6-52DA-8FF8-7B92579F****'),
}
model EncryptPasswordResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: EncryptPasswordResponseBody(name='body'),
}
/**
* @summary Encrypts a password.
*
* @param request EncryptPasswordRequest
* @param runtime runtime options for this request RuntimeOptions
* @return EncryptPasswordResponse
*/
async function encryptPasswordWithOptions(request: EncryptPasswordRequest, runtime: Util.RuntimeOptions): EncryptPasswordResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.directoryId)) {
query['DirectoryId'] = request.directoryId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.password)) {
query['Password'] = request.password;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'EncryptPassword',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Encrypts a password.
*
* @param request EncryptPasswordRequest
* @return EncryptPasswordResponse
*/
async function encryptPassword(request: EncryptPasswordRequest): EncryptPasswordResponse {
var runtime = new Util.RuntimeOptions{};
return encryptPasswordWithOptions(request, runtime);
}
model GetCloudDriveServiceMountTokenRequest {
clientId?: string(name='ClientId', example='00e122c3-13fb-4fc3-bc7a-5d9acb89****'),
loginToken?: string(name='LoginToken', example='v1972cd3446f0e523598916520951742474e6624fcdea6652994d47bc6157d27f7cc900c339db67882j3no4nh5bk3b4****'),
officeSiteId?: string(name='OfficeSiteId', example='cn-hangzhou+dir-7186763****'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
sessionId?: string(name='SessionId', example='14e1fe41-ce9b-491d-aa8c-345jk2n4bk****'),
}
model GetCloudDriveServiceMountTokenResponseBody = {
requestId?: string(name='RequestId', example='DC27288A-F9E1-5092-9B5B-71C27D15****'),
token?: {
domainId?: string(name='DomainId', example='h****'),
expiredAfter?: string(name='ExpiredAfter', example='2022-10-10T04:41:35Z'),
status?: string(name='Status', example='enabled'),
token?: string(name='Token', example='7836fa6eced7dc8d54c775k34iu3h4i2kh534f****'),
totalSize?: long(name='TotalSize', example='6050416754750'),
usedSize?: long(name='UsedSize', example='605089'),
}(name='Token'),
}
model GetCloudDriveServiceMountTokenResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetCloudDriveServiceMountTokenResponseBody(name='body'),
}
/**
* @summary 获取无影云盘的免密token
*
* @param request GetCloudDriveServiceMountTokenRequest
* @param runtime runtime options for this request RuntimeOptions
* @return GetCloudDriveServiceMountTokenResponse
*/
async function getCloudDriveServiceMountTokenWithOptions(request: GetCloudDriveServiceMountTokenRequest, runtime: Util.RuntimeOptions): GetCloudDriveServiceMountTokenResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetCloudDriveServiceMountToken',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 获取无影云盘的免密token
*
* @param request GetCloudDriveServiceMountTokenRequest
* @return GetCloudDriveServiceMountTokenResponse
*/
async function getCloudDriveServiceMountToken(request: GetCloudDriveServiceMountTokenRequest): GetCloudDriveServiceMountTokenResponse {
var runtime = new Util.RuntimeOptions{};
return getCloudDriveServiceMountTokenWithOptions(request, runtime);
}
model GetConnectionTicketRequest {
clientId?: string(name='ClientId', description='This parameter is required.', example='f4a0dc8e-1702-4728-9a60-95b27a35****'),
clientOS?: string(name='ClientOS', example='Windows_NT 10.0.18363 x64'),
clientType?: string(name='ClientType', example='windows'),
clientVersion?: string(name='ClientVersion', example='2.1.0-R-20210731.151756'),
commandContent?: string(name='CommandContent'),
desktopId?: string(name='DesktopId', example='ecd-gx2x1dhsmucyy****'),
loginToken?: string(name='LoginToken', description='This parameter is required.', example='v18101ac6a9e69c66b04a163031680463660b4b216cd758f34b60b9ad6a7c7f7334b83dd8f75eef4209c68f9f1080b****'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
sessionId?: string(name='SessionId', example='cd45e873-650d-4d70-acb9-f996187a****'),
tag?: [
{
key?: string(name='Key'),
value?: string(name='Value'),
}
](name='Tag'),
taskId?: string(name='TaskId', example='2afbad19-778a-4fc5-9674-1f19c638****'),
uuid?: string(name='Uuid'),
}
model GetConnectionTicketResponseBody = {
requestId?: string(name='RequestId', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
taskCode?: string(name='TaskCode'),
taskId?: string(name='TaskId', example='2afbad19-778a-4fc5-9674-1f19c63862da'),
taskMessage?: string(name='TaskMessage'),
taskStatus?: string(name='TaskStatus', example='FINISHED'),
ticket?: string(name='Ticket', example='W0VuY29kaW5nXQ0KSW5wdXRFbmNvZGluZz1V********'),
}
model GetConnectionTicketResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetConnectionTicketResponseBody(name='body'),
}
/**
* @param request GetConnectionTicketRequest
* @param runtime runtime options for this request RuntimeOptions
* @return GetConnectionTicketResponse
*/
async function getConnectionTicketWithOptions(request: GetConnectionTicketRequest, runtime: Util.RuntimeOptions): GetConnectionTicketResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientOS)) {
query['ClientOS'] = request.clientOS;
}
if (!Util.isUnset(request.clientType)) {
query['ClientType'] = request.clientType;
}
if (!Util.isUnset(request.clientVersion)) {
query['ClientVersion'] = request.clientVersion;
}
if (!Util.isUnset(request.commandContent)) {
query['CommandContent'] = request.commandContent;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.taskId)) {
query['TaskId'] = request.taskId;
}
if (!Util.isUnset(request.uuid)) {
query['Uuid'] = request.uuid;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetConnectionTicket',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request GetConnectionTicketRequest
* @return GetConnectionTicketResponse
*/
async function getConnectionTicket(request: GetConnectionTicketRequest): GetConnectionTicketResponse {
var runtime = new Util.RuntimeOptions{};
return getConnectionTicketWithOptions(request, runtime);
}
model GetLoginTokenRequest {
authenticationCode?: string(name='AuthenticationCode', description='The verification code that is generated by the virtual MFA device. This parameter is required if you set `CurrentStage` to `MFAVerify`.', example='47****'),
clientId?: string(name='ClientId', description='The ID of the Alibaba Cloud Workspace client. The system generates a unique ID for each client.
This parameter is required.', example='f4a0dc8e-1702-4728-9a60-95b27a35****'),
clientOS?: string(name='ClientOS', description='The operating system (OS) of the device that runs an Alibaba Cloud Workspace client.', example='Windows_NT 10.0.1**** x64'),
clientType?: string(name='ClientType', description='The type of Alibaba Cloud Workspace clients.
Valid values:
* HTML5: web client.
* WINDOWS: Windows client.
* MACOS: macOS client.
* IOS: iOS client.
* ANDROID: Android client.', example='Windows'),
clientVersion?: string(name='ClientVersion', description='The version of the client. When you use an Alibaba Cloud Workspace client, you can view the client version in the **About** dialog box on the client logon page.', example='2.1.0-R-20210731.1****'),
currentStage?: string(name='CurrentStage', description='The logon authentication stage. Valid values:
* `ADPassword`: the stage to verify the identity of the Active Directory (AD) user. You must specify the value when the system verifies the identity of a convenience account or an AD account.
* `MFABind: the stage to bind a virtual multi-factor authentication (MFA) device.`
* `MFAVerify: the stage to verify the verification code that is generated by the virtual MFA device.`
* `TokenVerify`: the stage to perform two-factor authentication on an Alibaba Cloud Workspace client (hereinafter referred to as the client).
* `ChangePassword`: the stage to change the password of the user.
* `KeepAliveVerify`: the stage to obtain LoginToken if KeepAliveToken is valid.', example='ADPassword'),
directoryId?: string(name='DirectoryId', description='The office network ID. This parameter has the same meaning as `OfficeSiteId`. We recommend that you replace `DirectoryId` with `OfficeSiteId`. You can specify a value for `DirectoryId` or `OfficeSiteId`.', example='cn-hangzhou+dir-885351****'),
endUserId?: string(name='EndUserId', description='The name of the convenience user or the AD user. This parameter is required if you set `CurrentStage` to `ADPassword`.', example='alice'),
keepAlive?: boolean(name='KeepAlive', description='Specifies whether to keep the user logged on to the client.
Valid values:
* null: Default value. Do not keep the user logged on to the client.
* true: Keep the user logged on to the client.
* false: Do not keep the user logged on to the client.', example='false'),
keepAliveToken?: string(name='KeepAliveToken', description='The token to keep logging on to an Alibaba Cloud Workspace client. When an end user logs on to the Alibaba Cloud Workspace client and select Auto Sign-in, `KeepAliveToken` is returned after you call this operation. Within the valid period of the returned token``, you can call the `GetLoginToken` operation and set `CurrentStage` to `KeepAliveVerify`. Then, you can obtain LoginToken. If you set `CurrentStage` to `KeepAliveVerify`, `KeepAliveToken` is required.', example='hide'),
newPassword?: string(name='NewPassword', description='The new password. This parameter is required if you set `CurrentStage` to `ChangePassword`.', example='NewPassword'),
officeSiteId?: string(name='OfficeSiteId', description='The office network ID.', example='cn-hangzhou+dir-885351****'),
oldPassword?: string(name='OldPassword', description='The current password. This parameter is required if you set `CurrentStage` to `ChangePassword`.', example='OldPassword'),
password?: string(name='Password', description='The password of the convenience user or the AD user. This parameter is required if you set `CurrentStage` to `ADPassword`.', example='Password1234'),
regionId?: string(name='RegionId', description='The region ID. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/196646.html) operation to query the regions supported by EDS.
This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='The ID of the session.
* If the virtual multi-factor authentication (MFA) device is not bound or two-factor authentication is not enabled for the client, you do not need to specify a value for `SessionId`.
* If the virtual MFA device is not bound or two-factor authentication is enabled for the client, you must specify a value for `SessionId` to verify the user identity after you specify a value for `ADPassword`. The value of the `SessionId` parameter is returned only if the CurrentStage parameter is set to `ADPassword` when you call the `GetLoginToken` operation.', example='cd45e873-650d-4d70-acb9-f996187a****'),
tokenCode?: string(name='TokenCode', description='If two-factor authentication is enabled for Alibaba Cloud Workspace terminals in the EDS console and the system detects that the current logon user is exposed to risks, the system sends a verification code to the email address of the user. This parameter is required if you set `CurrentStage` to `TokenVerify`.', example='63****'),
uuid?: string(name='Uuid', description='The unique identifier of the client. When you use an Alibaba Cloud Workspace client, you can view the client version in the **About** dialog box on the client logon page.', example='C78CA9E99315687575DD2844C1F3****'),
}
model GetLoginTokenResponseBody = {
email?: string(name='Email', description='The email address of the user. The system returns the email address in the return value of the LoginToken parameter after the user logs on to the client.
* For a convenience user, the return value is the email address specified when the administrator creates the convenience user.
* For an AD user, the return value is in the following format: `Username@Name of the AD domain`.', example='alice'),
endUserId?: string(name='EndUserId', description='The account of the convenience user or the AD user.', example='alice'),
industry?: string(name='Industry', description='> This is a parameter only for internal use.', example='edu'),
keepAliveToken?: string(name='KeepAliveToken', description='The token used to keep the user logged on. After the user logs on to the client and select the Keep Logon option, `KeepAliveToken` is returned when you call the operation. If the user does not select the Keep Logon option, null is returned.', example='006YwvYMsesWWsDBZnVB+Wq9AvJDVIqOY3YCktvtb7+KxMb3ClnNlV8+l/knhZYrXUmeP06IzkjF+IgcZ3vZKOyMprDyFHjCy1r27FRE/U7+geWCl8iQ+yF8GaCRHfJEkC2+ROs93HkT4tfHxyY1J8W7O7ZQGUC/cdCvm+cCP6FIy73IUuPuVR6PcKYXIpEZPW'),
label?: string(name='Label', description='The attribute of the convenience user. For an AD user, null is returned.', example='test:sample'),
loginToken?: string(name='LoginToken', description='The logon token.', example='v18101ac6a9e69c66b04a163031680463660b4b216cd758f34b60b9ad6a7c7f7334b83dd8f75eef4209c68f9f1080b****'),
nextStage?: string(name='NextStage', description='The next stage that is expected to enter. For example, an administrator enables MFA in the EDS console. When an end user enters the password, that is, the end user completes the `ADPassword` stage, this parameter returns `MFAVerify`. This indicates that MFA is required.
> For more information about the authentication stages, see the `CurrentStage` parameter.', example='MFAVerify'),
nickName?: string(name='NickName'),
passwordStrategy?: {
tenantAlternativeChars?: [ string ](name='TenantAlternativeChars', description='> This is a parameter only for internal use.'),
tenantPasswordLength?: string(name='TenantPasswordLength', description='> This is a parameter only for internal use.', example='null'),
}(name='PasswordStrategy', description='> This is a parameter only for internal use.'),
phone?: string(name='Phone', description='Enter the mobile number of the convenience user. For an AD user, null is returned.', example='1381111****'),
props?: map[string]string(name='Props', description='> This is a parameter only for internal use.'),
qrCodePng?: string(name='QrCodePng', description='The QR code that is generated when the virtual MFA device is bound. The value is encoded in Base64. This parameter can be empty. This parameter is required only when the CurrentStage parameter is set to `MFABind`.
> For more information about each authentication stage, see the parameter description of the request parameter `CurrentStage`.', example='5OCLLKKOJU5HPBX66H3QCTWY******'),
reason?: string(name='Reason', description='> This is a parameter only for internal use.', example='null'),
requestId?: string(name='RequestId', description='The ID of the request.', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
riskVerifyInfo?: {
email?: string(name='Email', description='The email used for authentication.', example='user@example.com'),
lastLockDuration?: long(name='LastLockDuration', description='The duration of the lock.', example='1713749778'),
locked?: string(name='Locked', description='Whether the account is locked or not.', example='true'),
phone?: string(name='Phone', description='The mobile number used for authentication.', example='1388888****'),
}(name='RiskVerifyInfo', description='Risk identification information regarding the signin process.'),
secret?: string(name='Secret', description='The key that is generated when you bind the virtual MFA device. This parameter is required when the CurrentStage parameter is set to `MFABind`.
> For more information about each authentication stage, see the parameter description of the request parameter `CurrentStage`.', example='5OCLLKKOJU5HPBX66H3QCTWYI7MH****'),
sessionId?: string(name='SessionId', description='The ID of the session. The ID is returned the first time you call the `GetLoginToken` operation in the session. If MFA is required, you must specify this parameter in subsequent stages.
> For more information about each authentication stage, see the parameter description of the request parameter `CurrentStage`.', example='d6ec166d-ab93-4286-bf7f-a18bb929****'),
tenantId?: long(name='TenantId', description='The ID of the Alibaba Cloud account. The ID is used for hardware client authentication.', example='166353906220****'),
windowDisplayMode?: string(name='WindowDisplayMode', description='> This is a parameter only for internal use.', example='mode'),
}
model GetLoginTokenResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetLoginTokenResponseBody(name='body'),
}
/**
* @summary Obtains logon credentials.
*
* @param request GetLoginTokenRequest
* @param runtime runtime options for this request RuntimeOptions
* @return GetLoginTokenResponse
*/
async function getLoginTokenWithOptions(request: GetLoginTokenRequest, runtime: Util.RuntimeOptions): GetLoginTokenResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.authenticationCode)) {
query['AuthenticationCode'] = request.authenticationCode;
}
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientOS)) {
query['ClientOS'] = request.clientOS;
}
if (!Util.isUnset(request.clientType)) {
query['ClientType'] = request.clientType;
}
if (!Util.isUnset(request.clientVersion)) {
query['ClientVersion'] = request.clientVersion;
}
if (!Util.isUnset(request.currentStage)) {
query['CurrentStage'] = request.currentStage;
}
if (!Util.isUnset(request.directoryId)) {
query['DirectoryId'] = request.directoryId;
}
if (!Util.isUnset(request.endUserId)) {
query['EndUserId'] = request.endUserId;
}
if (!Util.isUnset(request.keepAlive)) {
query['KeepAlive'] = request.keepAlive;
}
if (!Util.isUnset(request.keepAliveToken)) {
query['KeepAliveToken'] = request.keepAliveToken;
}
if (!Util.isUnset(request.newPassword)) {
query['NewPassword'] = request.newPassword;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.oldPassword)) {
query['OldPassword'] = request.oldPassword;
}
if (!Util.isUnset(request.password)) {
query['Password'] = request.password;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.tokenCode)) {
query['TokenCode'] = request.tokenCode;
}
if (!Util.isUnset(request.uuid)) {
query['Uuid'] = request.uuid;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetLoginToken',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Obtains logon credentials.
*
* @param request GetLoginTokenRequest
* @return GetLoginTokenResponse
*/
async function getLoginToken(request: GetLoginTokenRequest): GetLoginTokenResponse {
var runtime = new Util.RuntimeOptions{};
return getLoginTokenWithOptions(request, runtime);
}
model IsKeepAliveRequest {
clientId?: string(name='ClientId', description='This parameter is required.', example='f4a0dc8e-1702-4728-9a60-95b27a35****'),
officeSiteId?: string(name='OfficeSiteId', example='cn-hangzhou+dir-885351****'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model IsKeepAliveResponseBody = {
isKeepAlive?: boolean(name='IsKeepAlive', example='True'),
officeSiteId?: string(name='OfficeSiteId', example='cn-hangzhou+dir-885351****'),
requestId?: string(name='RequestId', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
tenantId?: string(name='TenantId', example='141631846826****'),
}
model IsKeepAliveResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: IsKeepAliveResponseBody(name='body'),
}
/**
* @summary 是否保持登录判断接口
*
* @param request IsKeepAliveRequest
* @param runtime runtime options for this request RuntimeOptions
* @return IsKeepAliveResponse
*/
async function isKeepAliveWithOptions(request: IsKeepAliveRequest, runtime: Util.RuntimeOptions): IsKeepAliveResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'IsKeepAlive',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 是否保持登录判断接口
*
* @param request IsKeepAliveRequest
* @return IsKeepAliveResponse
*/
async function isKeepAlive(request: IsKeepAliveRequest): IsKeepAliveResponse {
var runtime = new Util.RuntimeOptions{};
return isKeepAliveWithOptions(request, runtime);
}
model QueryEdsAgentReportConfigRequest {
aliUid?: long(name='AliUid'),
desktopId?: string(name='DesktopId'),
ecsInstanceId?: string(name='EcsInstanceId'),
}
model QueryEdsAgentReportConfigResponseBody = {
data?: {
config?: string(name='Config'),
}(name='Data'),
requestId?: string(name='RequestId'),
}
model QueryEdsAgentReportConfigResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: QueryEdsAgentReportConfigResponseBody(name='body'),
}
/**
* @summary 查询Agent需要上报的配置信息
*
* @param request QueryEdsAgentReportConfigRequest
* @param runtime runtime options for this request RuntimeOptions
* @return QueryEdsAgentReportConfigResponse
*/
async function queryEdsAgentReportConfigWithOptions(request: QueryEdsAgentReportConfigRequest, runtime: Util.RuntimeOptions): QueryEdsAgentReportConfigResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.aliUid)) {
query['AliUid'] = request.aliUid;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.ecsInstanceId)) {
query['EcsInstanceId'] = request.ecsInstanceId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'QueryEdsAgentReportConfig',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询Agent需要上报的配置信息
*
* @param request QueryEdsAgentReportConfigRequest
* @return QueryEdsAgentReportConfigResponse
*/
async function queryEdsAgentReportConfig(request: QueryEdsAgentReportConfigRequest): QueryEdsAgentReportConfigResponse {
var runtime = new Util.RuntimeOptions{};
return queryEdsAgentReportConfigWithOptions(request, runtime);
}
model RebootDesktopsRequest {
clientId?: string(name='ClientId', description='The client ID. The system generates a unique ID for each client.
This parameter is required.', example='f4a0dc8e-1702-4728-9a60-95b27a35****'),
clientOS?: string(name='ClientOS', description='The operating system (OS) of the device that runs the Alibaba Cloud Workspace client (hereinafter referred to as WUYING client).', example='Windows_NT 10.0.18363 x64'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How do I ensure the idempotence of a request?](https://help.aliyun.com/document_detail/25693.html)', example='40401e62-5caf-4508-8de7-bf98af12****'),
clientVersion?: string(name='ClientVersion', description='The client version. If you use a WUYING client, you can view the client version in the **About** dialog box on the client logon page.', example='2.1.0-R-20210731.151756'),
desktopId?: [ string ](name='DesktopId', description='The IDs of the cloud computers. You can specify the IDs of 1 to 20 cloud computers.
This parameter is required.', example='ecd-7w78ozhjcwa3u****'),
loginToken?: string(name='LoginToken', description='The logon token.', example='v18101ac6a9e69c66b04a163031680463660b4b216cd758f34b60b9ad6a7c7f7334b83dd8f75eef4209c68f9f1080b****'),
osUpdate?: boolean(name='OsUpdate'),
regionId?: string(name='RegionId', description='The region ID. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/196646.html) operation to query the regions supported by WUYING Workspace.
This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='The session ID.', example='cd45e873-650d-4d70-acb9-f996187a****'),
sessionToken?: string(name='SessionToken', description='The logon token.', example='04b7b80a0b020715c5c1b4175fc4771698****9e2a759557a4624665fd53ae40'),
uuid?: string(name='Uuid', description='The UUID of the client.', example='91761ED27169E2FC564F29388E2D****'),
}
model RebootDesktopsResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
}
model RebootDesktopsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: RebootDesktopsResponseBody(name='body'),
}
/**
* @summary Restart cloud computers.
*
* @param request RebootDesktopsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return RebootDesktopsResponse
*/
async function rebootDesktopsWithOptions(request: RebootDesktopsRequest, runtime: Util.RuntimeOptions): RebootDesktopsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientOS)) {
query['ClientOS'] = request.clientOS;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.clientVersion)) {
query['ClientVersion'] = request.clientVersion;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.osUpdate)) {
query['OsUpdate'] = request.osUpdate;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.sessionToken)) {
query['SessionToken'] = request.sessionToken;
}
if (!Util.isUnset(request.uuid)) {
query['Uuid'] = request.uuid;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'RebootDesktops',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Restart cloud computers.
*
* @param request RebootDesktopsRequest
* @return RebootDesktopsResponse
*/
async function rebootDesktops(request: RebootDesktopsRequest): RebootDesktopsResponse {
var runtime = new Util.RuntimeOptions{};
return rebootDesktopsWithOptions(request, runtime);
}
model RefreshLoginTokenRequest {
clientId?: string(name='ClientId', description='This parameter is required.', example='f4a0dc8e-1702-4728-9a60-95b27a35****'),
directoryId?: string(name='DirectoryId', example='cn-hangzhou+dir-jedbpr4sl9l37****'),
endUserId?: string(name='EndUserId', description='This parameter is required.', example='alice'),
loginToken?: string(name='LoginToken', description='This parameter is required.', example='v18101ac6a9e69c66b04a163031680463660b4b216cd758f34b60b9ad6a7c7f7334b83dd8f75eef4209c68f9f1080b****'),
officeSiteId?: string(name='OfficeSiteId', example='cn-shanghai+dir-238191****'),
regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', example='cd45e873-650d-4d70-acb9-f996187a****'),
}
model RefreshLoginTokenResponseBody = {
loginToken?: string(name='LoginToken', example='v1c27bab6c205b2fdfac916434306375722776d6aa89e30b7836d18c95ade9137f0f5ac4325260782184e96ee2b3f0****'),
requestId?: string(name='RequestId', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
}
model RefreshLoginTokenResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: RefreshLoginTokenResponseBody(name='body'),
}
/**
* @param request RefreshLoginTokenRequest
* @param runtime runtime options for this request RuntimeOptions
* @return RefreshLoginTokenResponse
*/
async function refreshLoginTokenWithOptions(request: RefreshLoginTokenRequest, runtime: Util.RuntimeOptions): RefreshLoginTokenResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.directoryId)) {
query['DirectoryId'] = request.directoryId;
}
if (!Util.isUnset(request.endUserId)) {
query['EndUserId'] = request.endUserId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'RefreshLoginToken',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request RefreshLoginTokenRequest
* @return RefreshLoginTokenResponse
*/
async function refreshLoginToken(request: RefreshLoginTokenRequest): RefreshLoginTokenResponse {
var runtime = new Util.RuntimeOptions{};
return refreshLoginTokenWithOptions(request, runtime);
}
model ReportEdsAgentInfoRequest {
aliUid?: long(name='AliUid'),
desktopId?: string(name='DesktopId'),
ecsInstanceId?: string(name='EcsInstanceId'),
edsAgentInfo?: string(name='EdsAgentInfo'),
}
model ReportEdsAgentInfoResponseBody = {
requestId?: string(name='RequestId'),
}
model ReportEdsAgentInfoResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ReportEdsAgentInfoResponseBody(name='body'),
}
/**
* @summary 上报edsAgent的信息
*
* @param request ReportEdsAgentInfoRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ReportEdsAgentInfoResponse
*/
async function reportEdsAgentInfoWithOptions(request: ReportEdsAgentInfoRequest, runtime: Util.RuntimeOptions): ReportEdsAgentInfoResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.aliUid)) {
query['AliUid'] = request.aliUid;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.ecsInstanceId)) {
query['EcsInstanceId'] = request.ecsInstanceId;
}
if (!Util.isUnset(request.edsAgentInfo)) {
query['EdsAgentInfo'] = request.edsAgentInfo;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ReportEdsAgentInfo',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 上报edsAgent的信息
*
* @param request ReportEdsAgentInfoRequest
* @return ReportEdsAgentInfoResponse
*/
async function reportEdsAgentInfo(request: ReportEdsAgentInfoRequest): ReportEdsAgentInfoResponse {
var runtime = new Util.RuntimeOptions{};
return reportEdsAgentInfoWithOptions(request, runtime);
}
model ReportSessionStatusRequest {
endUserId?: string(name='EndUserId', example='liming'),
instanceId?: string(name='InstanceId', description='This parameter is required.', example='i-bp167fcodoa90ixn****'),
regionId?: string(name='RegionId', description='This parameter is required.', example='cn-beijing'),
sessionChangeTime?: long(name='SessionChangeTime', description='This parameter is required.', example='1642909143781'),
sessionId?: string(name='SessionId', description='This parameter is required.', example='2'),
sessionStatus?: string(name='SessionStatus', description='This parameter is required.', example='SessionLogOn'),
}
model ReportSessionStatusResponseBody = {
requestId?: string(name='RequestId', example='0EE5DE20-25F4-5870-9D56-C259A45B****'),
}
model ReportSessionStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ReportSessionStatusResponseBody(name='body'),
}
/**
* @param request ReportSessionStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ReportSessionStatusResponse
*/
async function reportSessionStatusWithOptions(request: ReportSessionStatusRequest, runtime: Util.RuntimeOptions): ReportSessionStatusResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.endUserId)) {
query['EndUserId'] = request.endUserId;
}
if (!Util.isUnset(request.instanceId)) {
query['InstanceId'] = request.instanceId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionChangeTime)) {
query['SessionChangeTime'] = request.sessionChangeTime;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.sessionStatus)) {
query['SessionStatus'] = request.sessionStatus;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ReportSessionStatus',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request ReportSessionStatusRequest
* @return ReportSessionStatusResponse
*/
async function reportSessionStatus(request: ReportSessionStatusRequest): ReportSessionStatusResponse {
var runtime = new Util.RuntimeOptions{};
return reportSessionStatusWithOptions(request, runtime);
}
model ResetPasswordRequest {
clientId?: string(name='ClientId', description='The client ID. The system generates a unique ID for each client.
This parameter is required.', example='95e41934-383e-4c9f-824f-3b93b19b****'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='2f00ab32-a473-4c90-9aae-dd8842ae****'),
email?: string(name='Email', description='The email address of the user.', example='a***@example.edu'),
endUserId?: string(name='EndUserId', description='The user ID.
This parameter is required.', example='liming'),
officeSiteId?: string(name='OfficeSiteId', description='The office network ID.
This parameter is required.', example='cn-hangzhou+dir-899235****'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-hangzhou'),
phone?: string(name='phone', description='The phone number of the user.', example='1827912****'),
}
model ResetPasswordResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='A00477A5-167F-56D2-A315-EA77E4BD****'),
}
model ResetPasswordResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ResetPasswordResponseBody(name='body'),
}
/**
* @summary Resets a password.
*
* @param request ResetPasswordRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ResetPasswordResponse
*/
async function resetPasswordWithOptions(request: ResetPasswordRequest, runtime: Util.RuntimeOptions): ResetPasswordResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.email)) {
query['Email'] = request.email;
}
if (!Util.isUnset(request.endUserId)) {
query['EndUserId'] = request.endUserId;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.phone)) {
query['phone'] = request.phone;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ResetPassword',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Resets a password.
*
* @param request ResetPasswordRequest
* @return ResetPasswordResponse
*/
async function resetPassword(request: ResetPasswordRequest): ResetPasswordResponse {
var runtime = new Util.RuntimeOptions{};
return resetPasswordWithOptions(request, runtime);
}
model ResetSnapshotRequest {
clientId?: string(name='ClientId', description='The client ID. The system generates a unique ID for each client.
This parameter is required.', example='b9d8ddfd-65d4-4857-9e97-56477d1f****'),
desktopId?: string(name='DesktopId', description='The cloud computer ID.', example='ecd-e964cr92klwqb****'),
loginToken?: string(name='LoginToken', description='The logon token.
This parameter is required.', example='v1fdef51b727aa91d6c881658978508114d3f5680fa99a66b2a631d17d5bb4860cccf1173be24d77d5ef1423c83aea****'),
regionId?: string(name='RegionId', description='The region ID. You can call the [DescribeRegions](~~DescribeRegions~~) operation to query the list of regions where Elastic Desktop Service (EDS) Enterprise is available.
This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='The session ID.', example='05182b8c-bb0d-49d3-963c-ee63a507****'),
snapshotId?: string(name='SnapshotId', description='The snapshot ID.
This parameter is required.', example='s-2zeipxmnhej803x7****'),
stopDesktop?: boolean(name='StopDesktop', description='Specifies whether to stop the cloud computer.', example='true'),
}
model ResetSnapshotResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
}
model ResetSnapshotResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ResetSnapshotResponseBody(name='body'),
}
/**
* @summary Restores the data of a disk from a snapshot.
*
* @param request ResetSnapshotRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ResetSnapshotResponse
*/
async function resetSnapshotWithOptions(request: ResetSnapshotRequest, runtime: Util.RuntimeOptions): ResetSnapshotResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.snapshotId)) {
query['SnapshotId'] = request.snapshotId;
}
if (!Util.isUnset(request.stopDesktop)) {
query['StopDesktop'] = request.stopDesktop;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ResetSnapshot',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Restores the data of a disk from a snapshot.
*
* @param request ResetSnapshotRequest
* @return ResetSnapshotResponse
*/
async function resetSnapshot(request: ResetSnapshotRequest): ResetSnapshotResponse {
var runtime = new Util.RuntimeOptions{};
return resetSnapshotWithOptions(request, runtime);
}
model SendTokenCodeRequest {
clientId?: string(name='ClientId', description='The client ID. The system generates a unique ID for each client.
This parameter is required.', example='f4a0dc8e-1702-4728-9a60-95b27a35****'),
clientOS?: string(name='ClientOS', description='The operating system on which the client runs.', example='Windows_NT 10.0.18363 x64'),
clientVersion?: string(name='ClientVersion', description='The client version. If you use an Alibaba Cloud Workspace client, you can view the client version in the "About" dialog box on the client logon page.', example='2.1.0-R-20210731.151756'),
endUserId?: string(name='EndUserId', description='The username of the account.', example='alice'),
loginToken?: string(name='LoginToken', description='The logon token.', example='v28101ac6a9e69c66b04a163031680463660b4b216cd758f34b60b9ad6a7c7f7334b83dd8f75eef4209c68f9f1080b****'),
officeSiteId?: string(name='OfficeSiteId', description='The office network ID.', example='cn-hangzhou+dir-2925105532'),
sessionId?: string(name='SessionId', description='The session ID.', example='cd45e873-650d-4d70-acb9-f996187a****'),
tokenCode?: string(name='TokenCode', description='If two-factor authentication is enabled for clients in the Elastic Desktop Service (EDS) Enterprise console, the system will send a verification code to the user\\\\"s email address if it detects that the current logged-on user is at risk. This parameter is required if you set `CurrentStage` to `TokenVerify`.', example='63****'),
}
model SendTokenCodeResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='134BD0B2-B848-5743-9CE2-C1FD3D5F****'),
}
model SendTokenCodeResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SendTokenCodeResponseBody(name='body'),
}
/**
* @summary Sends a logon verification code.
*
* @param request SendTokenCodeRequest
* @param runtime runtime options for this request RuntimeOptions
* @return SendTokenCodeResponse
*/
async function sendTokenCodeWithOptions(request: SendTokenCodeRequest, runtime: Util.RuntimeOptions): SendTokenCodeResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientOS)) {
query['ClientOS'] = request.clientOS;
}
if (!Util.isUnset(request.clientVersion)) {
query['ClientVersion'] = request.clientVersion;
}
if (!Util.isUnset(request.endUserId)) {
query['EndUserId'] = request.endUserId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.tokenCode)) {
query['TokenCode'] = request.tokenCode;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'SendTokenCode',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Sends a logon verification code.
*
* @param request SendTokenCodeRequest
* @return SendTokenCodeResponse
*/
async function sendTokenCode(request: SendTokenCodeRequest): SendTokenCodeResponse {
var runtime = new Util.RuntimeOptions{};
return sendTokenCodeWithOptions(request, runtime);
}
model SetFingerPrintTemplateRequest {
clientId?: string(name='ClientId', description='This parameter is required.', example='347431a9-90f6-448e-82c4-42bc84a9****'),
clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-42665544****'),
description?: string(name='Description', example='testDescription'),
encryptedFingerPrintTemplate?: string(name='EncryptedFingerPrintTemplate', example='AAAAAAAAAAAAAA'),
encryptedKey?: string(name='EncryptedKey', example='drjfspchj'),
fingerPrintTemplate?: string(name='FingerPrintTemplate', example='goG3gG8AAABhujtscn'),
loginToken?: string(name='LoginToken', description='This parameter is required.', example='v11c73e7af0cb43ff39301651142485099ffb447085d76c4147519dbaa21c3bd90d53045e327c1f525ee6331c52556****'),
password?: string(name='Password', description='This parameter is required.', example='As53328794'),
regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='This parameter is required.', example='8b42538a-246e-45a1-95ea-e5c65b09****'),
}
model SetFingerPrintTemplateResponseBody = {
encryptedPassword?: string(name='EncryptedPassword', example='0711abb9-4cf8-41b2-9d0e-b51209468631;da4VFPNxwY3CZegFjOrCNw==;iHp2l9/qGcfD4tWx7jZIZQ=='),
index?: int32(name='Index', example='1'),
requestId?: string(name='RequestId', example='CDE666EA-4FCD-5024-895C-8698E3D3****'),
}
model SetFingerPrintTemplateResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SetFingerPrintTemplateResponseBody(name='body'),
}
/**
* @param request SetFingerPrintTemplateRequest
* @param runtime runtime options for this request RuntimeOptions
* @return SetFingerPrintTemplateResponse
*/
async function setFingerPrintTemplateWithOptions(request: SetFingerPrintTemplateRequest, runtime: Util.RuntimeOptions): SetFingerPrintTemplateResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.encryptedFingerPrintTemplate)) {
query['EncryptedFingerPrintTemplate'] = request.encryptedFingerPrintTemplate;
}
if (!Util.isUnset(request.encryptedKey)) {
query['EncryptedKey'] = request.encryptedKey;
}
if (!Util.isUnset(request.fingerPrintTemplate)) {
query['FingerPrintTemplate'] = request.fingerPrintTemplate;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.password)) {
query['Password'] = request.password;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'SetFingerPrintTemplate',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request SetFingerPrintTemplateRequest
* @return SetFingerPrintTemplateResponse
*/
async function setFingerPrintTemplate(request: SetFingerPrintTemplateRequest): SetFingerPrintTemplateResponse {
var runtime = new Util.RuntimeOptions{};
return setFingerPrintTemplateWithOptions(request, runtime);
}
model SetFingerPrintTemplateDescriptionRequest {
clientId?: string(name='ClientId', description='This parameter is required.', example='0764064c-1609-4d3c-8cb7-ab8d3feg****'),
clientToken?: string(name='ClientToken', example='40401e62-5caf-4508-8de7-bf98af12****'),
description?: string(name='Description', description='This parameter is required.', example='Finger 1'),
index?: int32(name='Index', description='This parameter is required.', example='1'),
loginToken?: string(name='LoginToken', description='This parameter is required.', example='v14e5a2404c495249f7541646535779667ea0b5d87754b5d2d2a3099bda774f3832e24756ef3e66eb574b1f3e99078****'),
regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='This parameter is required.', example='d28520d4-da0b-4a97-981d-683db865****'),
}
model SetFingerPrintTemplateDescriptionResponseBody = {
requestId?: string(name='RequestId', example='BBD7DFD1-A5DE-51D9-8FD6-3BF54EF4****'),
}
model SetFingerPrintTemplateDescriptionResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SetFingerPrintTemplateDescriptionResponseBody(name='body'),
}
/**
* @param request SetFingerPrintTemplateDescriptionRequest
* @param runtime runtime options for this request RuntimeOptions
* @return SetFingerPrintTemplateDescriptionResponse
*/
async function setFingerPrintTemplateDescriptionWithOptions(request: SetFingerPrintTemplateDescriptionRequest, runtime: Util.RuntimeOptions): SetFingerPrintTemplateDescriptionResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.index)) {
query['Index'] = request.index;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'SetFingerPrintTemplateDescription',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request SetFingerPrintTemplateDescriptionRequest
* @return SetFingerPrintTemplateDescriptionResponse
*/
async function setFingerPrintTemplateDescription(request: SetFingerPrintTemplateDescriptionRequest): SetFingerPrintTemplateDescriptionResponse {
var runtime = new Util.RuntimeOptions{};
return setFingerPrintTemplateDescriptionWithOptions(request, runtime);
}
model StartDesktopsRequest {
clientId?: string(name='ClientId', description='The ID of the Alibaba Cloud Workspace client (hereinafter referred to as WUYING client). The system generates a unique ID for each client.
This parameter is required.', example='f4a0dc8e-1702-4728-9a60-95b27a35****'),
clientOS?: string(name='ClientOS', description='The operating system (OS) of the device that run the client.', example='Windows_NT 10.0.18363 x64'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='21e7be12-aa4f-4389-b3e1-82f4a1b5****'),
clientVersion?: string(name='ClientVersion', description='The client version. If you use a WUYING client, you can click **About** on the client logon page to view the version of the client.', example='2.1.0-R-20210731.151756'),
desktopId?: [ string ](name='DesktopId', description='The IDs of the cloud computers. You can specify the IDs of 1 to 20 cloud computers.
This parameter is required.', example='ecd-cg27ufmapab08****'),
loginToken?: string(name='LoginToken', description='The logon token.
This parameter is required.', example='v18101ac6a9e69c66b04a163031680463660b4b216cd758f34b60b9ad6a7c7f7334b83dd8f75eef4209c68f9f1080b****'),
regionId?: string(name='RegionId', description='The region ID. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/196646.html) operation to query the regions supported by WUYING Workspace.
This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='The session ID.', example='cd45e873-650d-4d70-acb9-f996187a****'),
uuid?: string(name='Uuid', description='The UUID of the client.', example='71F6A700735E74A61161A53F0C47****'),
}
model StartDesktopsResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
}
model StartDesktopsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StartDesktopsResponseBody(name='body'),
}
/**
* @summary Start cloud computers.
*
* @description The cloud computers that you want to start must be in the Stopped state. After you call this operation, the cloud computers enter the Running state.
*
* @param request StartDesktopsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StartDesktopsResponse
*/
async function startDesktopsWithOptions(request: StartDesktopsRequest, runtime: Util.RuntimeOptions): StartDesktopsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientOS)) {
query['ClientOS'] = request.clientOS;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.clientVersion)) {
query['ClientVersion'] = request.clientVersion;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.uuid)) {
query['Uuid'] = request.uuid;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StartDesktops',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Start cloud computers.
*
* @description The cloud computers that you want to start must be in the Stopped state. After you call this operation, the cloud computers enter the Running state.
*
* @param request StartDesktopsRequest
* @return StartDesktopsResponse
*/
async function startDesktops(request: StartDesktopsRequest): StartDesktopsResponse {
var runtime = new Util.RuntimeOptions{};
return startDesktopsWithOptions(request, runtime);
}
model StartRecordContentRequest {
clientId?: string(name='ClientId', description='This parameter is required.'),
clientOS?: string(name='ClientOS'),
clientVersion?: string(name='ClientVersion'),
desktopId?: string(name='DesktopId', description='This parameter is required.'),
filePath?: string(name='FilePath'),
loginToken?: string(name='LoginToken', description='This parameter is required.'),
regionId?: string(name='RegionId', description='This parameter is required.'),
sessionId?: string(name='SessionId', description='This parameter is required.'),
}
model StartRecordContentResponseBody = {
requestId?: string(name='RequestId'),
}
model StartRecordContentResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StartRecordContentResponseBody(name='body'),
}
/**
* @param request StartRecordContentRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StartRecordContentResponse
*/
async function startRecordContentWithOptions(request: StartRecordContentRequest, runtime: Util.RuntimeOptions): StartRecordContentResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientOS)) {
query['ClientOS'] = request.clientOS;
}
if (!Util.isUnset(request.clientVersion)) {
query['ClientVersion'] = request.clientVersion;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.filePath)) {
query['FilePath'] = request.filePath;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StartRecordContent',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request StartRecordContentRequest
* @return StartRecordContentResponse
*/
async function startRecordContent(request: StartRecordContentRequest): StartRecordContentResponse {
var runtime = new Util.RuntimeOptions{};
return startRecordContentWithOptions(request, runtime);
}
model StopDesktopsRequest {
clientId?: string(name='ClientId', description='The client ID. The system generates a unique ID for each client.
This parameter is required.', example='f4a0dc8e-1702-4728-9a60-95b27a35****'),
clientOS?: string(name='ClientOS', description='The operating system (OS) of the device that runs the Alibaba Cloud Workspace client (hereinafter referred to as WUYING client).', example='Windows_NT 10.0.18363 x64'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How do I ensure the idempotence of a request?](https://help.aliyun.com/document_detail/25693.html)', example='6ce412a8-399f-49f9-9518-66ee028a****'),
clientVersion?: string(name='ClientVersion', description='The client version. If you use a WUYING client, you can view the client version in the **About** dialog box on the client logon page.', example='2.1.0-R-20210731.151756'),
desktopId?: [ string ](name='DesktopId', description='The IDs of the cloud computers. You can specify the IDs of 1 to 20 cloud computers.
This parameter is required.', example='ecd-7w78ozhjcwa3u****'),
loginToken?: string(name='LoginToken', description='The logon token.', example='v18101ac6a9e69c66b04a163031680463660b4b216cd758f34b60b9ad6a7c7f7334b83dd8f75eef4209c68f9f1080b****'),
osUpdate?: boolean(name='OsUpdate'),
regionId?: string(name='RegionId', description='The region ID. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/196646.html) operation to query the regions supported by WUYING Workspace.
This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='The session ID.', example='cd45e873-650d-4d70-acb9-f996187a****'),
sessionToken?: string(name='SessionToken', description='The logon token.', example='04b7b80a0b020715c5c1b4175fc4771698****9e2a759557a4624665fd53ae40'),
uuid?: string(name='Uuid'),
}
model StopDesktopsResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='1CBAFFAB-B697-4049-A9B1-67E1FC5F****'),
}
model StopDesktopsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StopDesktopsResponseBody(name='body'),
}
/**
* @summary Stops cloud computers.
*
* @description The cloud computers that you want to stop must be in the Running state. After you call this operation, the cloud computers enter the Stopped state.
*
* @param request StopDesktopsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StopDesktopsResponse
*/
async function stopDesktopsWithOptions(request: StopDesktopsRequest, runtime: Util.RuntimeOptions): StopDesktopsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientOS)) {
query['ClientOS'] = request.clientOS;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.clientVersion)) {
query['ClientVersion'] = request.clientVersion;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.osUpdate)) {
query['OsUpdate'] = request.osUpdate;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.sessionToken)) {
query['SessionToken'] = request.sessionToken;
}
if (!Util.isUnset(request.uuid)) {
query['Uuid'] = request.uuid;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StopDesktops',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Stops cloud computers.
*
* @description The cloud computers that you want to stop must be in the Running state. After you call this operation, the cloud computers enter the Stopped state.
*
* @param request StopDesktopsRequest
* @return StopDesktopsResponse
*/
async function stopDesktops(request: StopDesktopsRequest): StopDesktopsResponse {
var runtime = new Util.RuntimeOptions{};
return stopDesktopsWithOptions(request, runtime);
}
model StopRecordContentRequest {
clientId?: string(name='ClientId', description='This parameter is required.'),
clientOS?: string(name='ClientOS'),
clientVersion?: string(name='ClientVersion'),
desktopId?: string(name='DesktopId', description='This parameter is required.'),
loginToken?: string(name='LoginToken', description='This parameter is required.'),
regionId?: string(name='RegionId', description='This parameter is required.'),
sessionId?: string(name='SessionId', description='This parameter is required.'),
}
model StopRecordContentResponseBody = {
requestId?: string(name='RequestId'),
}
model StopRecordContentResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StopRecordContentResponseBody(name='body'),
}
/**
* @param request StopRecordContentRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StopRecordContentResponse
*/
async function stopRecordContentWithOptions(request: StopRecordContentRequest, runtime: Util.RuntimeOptions): StopRecordContentResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientOS)) {
query['ClientOS'] = request.clientOS;
}
if (!Util.isUnset(request.clientVersion)) {
query['ClientVersion'] = request.clientVersion;
}
if (!Util.isUnset(request.desktopId)) {
query['DesktopId'] = request.desktopId;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StopRecordContent',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request StopRecordContentRequest
* @return StopRecordContentResponse
*/
async function stopRecordContent(request: StopRecordContentRequest): StopRecordContentResponse {
var runtime = new Util.RuntimeOptions{};
return stopRecordContentWithOptions(request, runtime);
}
model UnbindUserDesktopRequest {
clientId?: string(name='ClientId', description='The client ID.
This parameter is required.', example='58f96f67-7944-4f97-9342-****'),
clientType?: string(name='ClientType', description='The client type.', example='windows'),
force?: boolean(name='Force', description='Specifies whether to enable forced unbinding.
Valid values:
* true: Even when end users connect to cloud computers, the forced unbinding is still enforced.
* false: Forced unbinding is only enforced when end users are disconnected from cloud computers.', example='true'),
loginToken?: string(name='LoginToken', description='The logon token.
This parameter is required.', example='v12307f5e0****'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-hangzhou'),
sessionId?: string(name='SessionId', description='The session ID.
This parameter is required.', example='3b053331-dc98-43d8-b247-****'),
userDesktopId?: string(name='UserDesktopId', description='The cloud computer ID.
This parameter is required.', example='ud-sdfs****'),
}
model UnbindUserDesktopResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='D5B7CF35-E078-5EBF-A010-****'),
}
model UnbindUserDesktopResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UnbindUserDesktopResponseBody(name='body'),
}
/**
* @summary Unbinds end users from cloud computers.
*
* @param request UnbindUserDesktopRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UnbindUserDesktopResponse
*/
async function unbindUserDesktopWithOptions(request: UnbindUserDesktopRequest, runtime: Util.RuntimeOptions): UnbindUserDesktopResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.clientType)) {
query['ClientType'] = request.clientType;
}
if (!Util.isUnset(request.force)) {
query['Force'] = request.force;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
if (!Util.isUnset(request.userDesktopId)) {
query['UserDesktopId'] = request.userDesktopId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'UnbindUserDesktop',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Unbinds end users from cloud computers.
*
* @param request UnbindUserDesktopRequest
* @return UnbindUserDesktopResponse
*/
async function unbindUserDesktop(request: UnbindUserDesktopRequest): UnbindUserDesktopResponse {
var runtime = new Util.RuntimeOptions{};
return unbindUserDesktopWithOptions(request, runtime);
}
model VerifyCredentialRequest {
clientId?: string(name='ClientId', description='This parameter is required.', example='d0b95762-0541-4b53-a0e4-7ed09f39****'),
credential?: string(name='Credential', description='This parameter is required.', example='123456789cyG'),
credentialType?: string(name='CredentialType', example='Password'),
encryptedKey?: string(name='EncryptedKey', example='drjfs****'),
loginToken?: string(name='LoginToken', description='This parameter is required.', example='v1f5772a1c60dbea9fd8e1648567079018086448d234b5bc8e30bec0ba6e80c41c767c4dd0db51e9e5c4e0f111431a****'),
officeSiteId?: string(name='OfficeSiteId', description='This parameter is required.', example='cn-shanghai+dir-227468****'),
regionId?: string(name='RegionId', description='This parameter is required.', example='cn-beijing'),
sessionId?: string(name='SessionId', example='eb17af2e-1dd6-4cc4-a3ee-3a14d0d7****'),
}
model VerifyCredentialResponseBody = {
requestId?: string(name='RequestId', example='D5F0BDFB-A229-5F1D-B790-33709D43****'),
}
model VerifyCredentialResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: VerifyCredentialResponseBody(name='body'),
}
/**
* @param request VerifyCredentialRequest
* @param runtime runtime options for this request RuntimeOptions
* @return VerifyCredentialResponse
*/
async function verifyCredentialWithOptions(request: VerifyCredentialRequest, runtime: Util.RuntimeOptions): VerifyCredentialResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientId)) {
query['ClientId'] = request.clientId;
}
if (!Util.isUnset(request.credential)) {
query['Credential'] = request.credential;
}
if (!Util.isUnset(request.credentialType)) {
query['CredentialType'] = request.credentialType;
}
if (!Util.isUnset(request.encryptedKey)) {
query['EncryptedKey'] = request.encryptedKey;
}
if (!Util.isUnset(request.loginToken)) {
query['LoginToken'] = request.loginToken;
}
if (!Util.isUnset(request.officeSiteId)) {
query['OfficeSiteId'] = request.officeSiteId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sessionId)) {
query['SessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'VerifyCredential',
version = '2020-10-02',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'Anonymous',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @param request VerifyCredentialRequest
* @return VerifyCredentialResponse
*/
async function verifyCredential(request: VerifyCredentialRequest): VerifyCredentialResponse {
var runtime = new Util.RuntimeOptions{};
return verifyCredentialWithOptions(request, runtime);
}