oci-desktops 2.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +89 -0
- package/NOTICE.txt +1 -0
- package/README.md +22 -0
- package/THIRD_PARTY_LICENSES.txt +576 -0
- package/index.d.ts +23 -0
- package/index.js +46 -0
- package/index.js.map +1 -0
- package/lib/client.d.ts +292 -0
- package/lib/client.js +1578 -0
- package/lib/client.js.map +1 -0
- package/lib/desktopservice-waiter.d.ts +45 -0
- package/lib/desktopservice-waiter.js +89 -0
- package/lib/desktopservice-waiter.js.map +1 -0
- package/lib/model/action-type.d.ts +33 -0
- package/lib/model/action-type.js +44 -0
- package/lib/model/action-type.js.map +1 -0
- package/lib/model/change-desktop-pool-compartment-details.d.ts +26 -0
- package/lib/model/change-desktop-pool-compartment-details.js +30 -0
- package/lib/model/change-desktop-pool-compartment-details.js.map +1 -0
- package/lib/model/create-desktop-pool-details.d.ts +110 -0
- package/lib/model/create-desktop-pool-details.js +72 -0
- package/lib/model/create-desktop-pool-details.js.map +1 -0
- package/lib/model/desktop-availability-policy.d.ts +25 -0
- package/lib/model/desktop-availability-policy.js +64 -0
- package/lib/model/desktop-availability-policy.js.map +1 -0
- package/lib/model/desktop-collection.d.ts +27 -0
- package/lib/model/desktop-collection.js +62 -0
- package/lib/model/desktop-collection.js.map +1 -0
- package/lib/model/desktop-device-policy.d.ts +97 -0
- package/lib/model/desktop-device-policy.js +65 -0
- package/lib/model/desktop-device-policy.js.map +1 -0
- package/lib/model/desktop-image.d.ts +30 -0
- package/lib/model/desktop-image.js +30 -0
- package/lib/model/desktop-image.js.map +1 -0
- package/lib/model/desktop-network-configuration.d.ts +30 -0
- package/lib/model/desktop-network-configuration.js +30 -0
- package/lib/model/desktop-network-configuration.js.map +1 -0
- package/lib/model/desktop-pool-collection.d.ts +27 -0
- package/lib/model/desktop-pool-collection.js +62 -0
- package/lib/model/desktop-pool-collection.js.map +1 -0
- package/lib/model/desktop-pool-desktop-collection.d.ts +27 -0
- package/lib/model/desktop-pool-desktop-collection.js +62 -0
- package/lib/model/desktop-pool-desktop-collection.js.map +1 -0
- package/lib/model/desktop-pool-desktop-summary.d.ts +67 -0
- package/lib/model/desktop-pool-desktop-summary.js +30 -0
- package/lib/model/desktop-pool-desktop-summary.js.map +1 -0
- package/lib/model/desktop-pool-summary.d.ts +77 -0
- package/lib/model/desktop-pool-summary.js +30 -0
- package/lib/model/desktop-pool-summary.js.map +1 -0
- package/lib/model/desktop-pool-volume-collection.d.ts +27 -0
- package/lib/model/desktop-pool-volume-collection.js +62 -0
- package/lib/model/desktop-pool-volume-collection.js.map +1 -0
- package/lib/model/desktop-pool-volume-summary.d.ts +74 -0
- package/lib/model/desktop-pool-volume-summary.js +40 -0
- package/lib/model/desktop-pool-volume-summary.js.map +1 -0
- package/lib/model/desktop-pool.d.ts +122 -0
- package/lib/model/desktop-pool.js +72 -0
- package/lib/model/desktop-pool.js.map +1 -0
- package/lib/model/desktop-schedule.d.ts +30 -0
- package/lib/model/desktop-schedule.js +30 -0
- package/lib/model/desktop-schedule.js.map +1 -0
- package/lib/model/desktop-summary.d.ts +66 -0
- package/lib/model/desktop-summary.js +30 -0
- package/lib/model/desktop-summary.js.map +1 -0
- package/lib/model/desktop.d.ts +68 -0
- package/lib/model/desktop.js +64 -0
- package/lib/model/desktop.js.map +1 -0
- package/lib/model/hosting-options.d.ts +28 -0
- package/lib/model/hosting-options.js +54 -0
- package/lib/model/hosting-options.js.map +1 -0
- package/lib/model/index.d.ts +77 -0
- package/lib/model/index.js +100 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/lifecycle-state.d.ts +34 -0
- package/lib/model/lifecycle-state.js +45 -0
- package/lib/model/lifecycle-state.js.map +1 -0
- package/lib/model/operation-status.d.ts +34 -0
- package/lib/model/operation-status.js +45 -0
- package/lib/model/operation-status.js.map +1 -0
- package/lib/model/operation-type.d.ts +37 -0
- package/lib/model/operation-type.js +48 -0
- package/lib/model/operation-type.js.map +1 -0
- package/lib/model/update-desktop-details.d.ts +45 -0
- package/lib/model/update-desktop-details.js +30 -0
- package/lib/model/update-desktop-details.js.map +1 -0
- package/lib/model/update-desktop-pool-details.d.ts +76 -0
- package/lib/model/update-desktop-pool-details.js +64 -0
- package/lib/model/update-desktop-pool-details.js.map +1 -0
- package/lib/model/work-request-error-collection.d.ts +27 -0
- package/lib/model/work-request-error-collection.js +62 -0
- package/lib/model/work-request-error-collection.js.map +1 -0
- package/lib/model/work-request-error.d.ts +36 -0
- package/lib/model/work-request-error.js +30 -0
- package/lib/model/work-request-error.js.map +1 -0
- package/lib/model/work-request-log-entry-collection.d.ts +27 -0
- package/lib/model/work-request-log-entry-collection.js +62 -0
- package/lib/model/work-request-log-entry-collection.js.map +1 -0
- package/lib/model/work-request-log-entry.d.ts +30 -0
- package/lib/model/work-request-log-entry.js +30 -0
- package/lib/model/work-request-log-entry.js.map +1 -0
- package/lib/model/work-request-resource.d.ts +43 -0
- package/lib/model/work-request-resource.js +30 -0
- package/lib/model/work-request-resource.js.map +1 -0
- package/lib/model/work-request-summary-collection.d.ts +27 -0
- package/lib/model/work-request-summary-collection.js +62 -0
- package/lib/model/work-request-summary-collection.js.map +1 -0
- package/lib/model/work-request-summary.d.ts +64 -0
- package/lib/model/work-request-summary.js +62 -0
- package/lib/model/work-request-summary.js.map +1 -0
- package/lib/model/work-request.d.ts +64 -0
- package/lib/model/work-request.js +62 -0
- package/lib/model/work-request.js.map +1 -0
- package/lib/request/cancel-work-request-request.d.ts +30 -0
- package/lib/request/cancel-work-request-request.js +15 -0
- package/lib/request/cancel-work-request-request.js.map +1 -0
- package/lib/request/change-desktop-pool-compartment-request.d.ts +39 -0
- package/lib/request/change-desktop-pool-compartment-request.js +15 -0
- package/lib/request/change-desktop-pool-compartment-request.js.map +1 -0
- package/lib/request/create-desktop-pool-request.d.ts +31 -0
- package/lib/request/create-desktop-pool-request.js +15 -0
- package/lib/request/create-desktop-pool-request.js.map +1 -0
- package/lib/request/delete-desktop-pool-request.d.ts +34 -0
- package/lib/request/delete-desktop-pool-request.js +15 -0
- package/lib/request/delete-desktop-pool-request.js.map +1 -0
- package/lib/request/delete-desktop-request.d.ts +30 -0
- package/lib/request/delete-desktop-request.js +15 -0
- package/lib/request/delete-desktop-request.js.map +1 -0
- package/lib/request/get-desktop-pool-request.d.ts +26 -0
- package/lib/request/get-desktop-pool-request.js +15 -0
- package/lib/request/get-desktop-pool-request.js.map +1 -0
- package/lib/request/get-desktop-request.d.ts +26 -0
- package/lib/request/get-desktop-request.js +15 -0
- package/lib/request/get-desktop-request.js.map +1 -0
- package/lib/request/get-work-request-request.d.ts +26 -0
- package/lib/request/get-work-request-request.js +15 -0
- package/lib/request/get-work-request-request.js.map +1 -0
- package/lib/request/index.d.ts +55 -0
- package/lib/request/index.js +50 -0
- package/lib/request/index.js.map +1 -0
- package/lib/request/list-desktop-pool-desktops-request.d.ts +72 -0
- package/lib/request/list-desktop-pool-desktops-request.js +29 -0
- package/lib/request/list-desktop-pool-desktops-request.js.map +1 -0
- package/lib/request/list-desktop-pool-volumes-request.d.ts +72 -0
- package/lib/request/list-desktop-pool-volumes-request.js +29 -0
- package/lib/request/list-desktop-pool-volumes-request.js.map +1 -0
- package/lib/request/list-desktop-pools-request.d.ts +68 -0
- package/lib/request/list-desktop-pools-request.js +29 -0
- package/lib/request/list-desktop-pools-request.js.map +1 -0
- package/lib/request/list-desktops-request.d.ts +72 -0
- package/lib/request/list-desktops-request.js +29 -0
- package/lib/request/list-desktops-request.js.map +1 -0
- package/lib/request/list-work-request-errors-request.d.ts +52 -0
- package/lib/request/list-work-request-errors-request.js +28 -0
- package/lib/request/list-work-request-errors-request.js.map +1 -0
- package/lib/request/list-work-request-logs-request.d.ts +52 -0
- package/lib/request/list-work-request-logs-request.js +28 -0
- package/lib/request/list-work-request-logs-request.js.map +1 -0
- package/lib/request/list-work-requests-request.d.ts +65 -0
- package/lib/request/list-work-requests-request.js +28 -0
- package/lib/request/list-work-requests-request.js.map +1 -0
- package/lib/request/start-desktop-pool-request.d.ts +34 -0
- package/lib/request/start-desktop-pool-request.js +15 -0
- package/lib/request/start-desktop-pool-request.js.map +1 -0
- package/lib/request/start-desktop-request.d.ts +34 -0
- package/lib/request/start-desktop-request.js +15 -0
- package/lib/request/start-desktop-request.js.map +1 -0
- package/lib/request/stop-desktop-pool-request.d.ts +34 -0
- package/lib/request/stop-desktop-pool-request.js +15 -0
- package/lib/request/stop-desktop-pool-request.js.map +1 -0
- package/lib/request/stop-desktop-request.d.ts +34 -0
- package/lib/request/stop-desktop-request.js +15 -0
- package/lib/request/stop-desktop-request.js.map +1 -0
- package/lib/request/update-desktop-pool-request.d.ts +35 -0
- package/lib/request/update-desktop-pool-request.js +15 -0
- package/lib/request/update-desktop-pool-request.js.map +1 -0
- package/lib/request/update-desktop-request.d.ts +35 -0
- package/lib/request/update-desktop-request.js +15 -0
- package/lib/request/update-desktop-request.js.map +1 -0
- package/lib/response/cancel-work-request-response.d.ts +18 -0
- package/lib/response/cancel-work-request-response.js +15 -0
- package/lib/response/cancel-work-request-response.js.map +1 -0
- package/lib/response/change-desktop-pool-compartment-response.d.ts +22 -0
- package/lib/response/change-desktop-pool-compartment-response.js +15 -0
- package/lib/response/change-desktop-pool-compartment-response.js.map +1 -0
- package/lib/response/create-desktop-pool-response.d.ts +39 -0
- package/lib/response/create-desktop-pool-response.js +15 -0
- package/lib/response/create-desktop-pool-response.js.map +1 -0
- package/lib/response/delete-desktop-pool-response.d.ts +22 -0
- package/lib/response/delete-desktop-pool-response.js +15 -0
- package/lib/response/delete-desktop-pool-response.js.map +1 -0
- package/lib/response/delete-desktop-response.d.ts +22 -0
- package/lib/response/delete-desktop-response.js +15 -0
- package/lib/response/delete-desktop-response.js.map +1 -0
- package/lib/response/get-desktop-pool-response.d.ts +27 -0
- package/lib/response/get-desktop-pool-response.js +15 -0
- package/lib/response/get-desktop-pool-response.js.map +1 -0
- package/lib/response/get-desktop-response.d.ts +27 -0
- package/lib/response/get-desktop-response.js +15 -0
- package/lib/response/get-desktop-response.js.map +1 -0
- package/lib/response/get-work-request-response.d.ts +27 -0
- package/lib/response/get-work-request-response.js +15 -0
- package/lib/response/get-work-request-response.js.map +1 -0
- package/lib/response/index.d.ts +55 -0
- package/lib/response/index.js +16 -0
- package/lib/response/index.js.map +1 -0
- package/lib/response/list-desktop-pool-desktops-response.d.ts +27 -0
- package/lib/response/list-desktop-pool-desktops-response.js +15 -0
- package/lib/response/list-desktop-pool-desktops-response.js.map +1 -0
- package/lib/response/list-desktop-pool-volumes-response.d.ts +27 -0
- package/lib/response/list-desktop-pool-volumes-response.js +15 -0
- package/lib/response/list-desktop-pool-volumes-response.js.map +1 -0
- package/lib/response/list-desktop-pools-response.d.ts +27 -0
- package/lib/response/list-desktop-pools-response.js +15 -0
- package/lib/response/list-desktop-pools-response.js.map +1 -0
- package/lib/response/list-desktops-response.d.ts +27 -0
- package/lib/response/list-desktops-response.js +15 -0
- package/lib/response/list-desktops-response.js.map +1 -0
- package/lib/response/list-work-request-errors-response.d.ts +27 -0
- package/lib/response/list-work-request-errors-response.js +15 -0
- package/lib/response/list-work-request-errors-response.js.map +1 -0
- package/lib/response/list-work-request-logs-response.d.ts +27 -0
- package/lib/response/list-work-request-logs-response.js +15 -0
- package/lib/response/list-work-request-logs-response.js.map +1 -0
- package/lib/response/list-work-requests-response.d.ts +27 -0
- package/lib/response/list-work-requests-response.js +15 -0
- package/lib/response/list-work-requests-response.js.map +1 -0
- package/lib/response/start-desktop-pool-response.d.ts +22 -0
- package/lib/response/start-desktop-pool-response.js +15 -0
- package/lib/response/start-desktop-pool-response.js.map +1 -0
- package/lib/response/start-desktop-response.d.ts +22 -0
- package/lib/response/start-desktop-response.js +15 -0
- package/lib/response/start-desktop-response.js.map +1 -0
- package/lib/response/stop-desktop-pool-response.d.ts +22 -0
- package/lib/response/stop-desktop-pool-response.js +15 -0
- package/lib/response/stop-desktop-pool-response.js.map +1 -0
- package/lib/response/stop-desktop-response.d.ts +22 -0
- package/lib/response/stop-desktop-response.js +15 -0
- package/lib/response/stop-desktop-response.js.map +1 -0
- package/lib/response/update-desktop-pool-response.d.ts +22 -0
- package/lib/response/update-desktop-pool-response.js +15 -0
- package/lib/response/update-desktop-pool-response.js.map +1 -0
- package/lib/response/update-desktop-response.d.ts +22 -0
- package/lib/response/update-desktop-response.js +15 -0
- package/lib/response/update-desktop-response.js.map +1 -0
- package/package.json +29 -0
package/lib/client.js
ADDED
|
@@ -0,0 +1,1578 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Secure Desktops API
|
|
4
|
+
* Create and manage cloud-hosted desktops which can be accessed from a web browser or installed client.
|
|
5
|
+
|
|
6
|
+
* OpenAPI spec version: 20220618
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
|
13
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
18
|
+
}) : (function(o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
}));
|
|
22
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
+
}) : function(o, v) {
|
|
25
|
+
o["default"] = v;
|
|
26
|
+
});
|
|
27
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
35
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
36
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
38
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
39
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
40
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.DesktopServiceClient = exports.DesktopServiceApiKeys = void 0;
|
|
45
|
+
const common = require("oci-common");
|
|
46
|
+
const model = __importStar(require("./model"));
|
|
47
|
+
const desktopservice_waiter_1 = require("./desktopservice-waiter");
|
|
48
|
+
const oci_common_1 = require("oci-common");
|
|
49
|
+
const Breaker = require("opossum");
|
|
50
|
+
// ===============================================
|
|
51
|
+
// This file is autogenerated - Please do not edit
|
|
52
|
+
// ===============================================
|
|
53
|
+
var DesktopServiceApiKeys;
|
|
54
|
+
(function (DesktopServiceApiKeys) {
|
|
55
|
+
})(DesktopServiceApiKeys = exports.DesktopServiceApiKeys || (exports.DesktopServiceApiKeys = {}));
|
|
56
|
+
/**
|
|
57
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
58
|
+
*/
|
|
59
|
+
class DesktopServiceClient {
|
|
60
|
+
constructor(params, clientConfiguration) {
|
|
61
|
+
this["_realmSpecificEndpointTemplateEnabled"] = undefined;
|
|
62
|
+
this["_endpoint"] = "";
|
|
63
|
+
this["_defaultHeaders"] = {};
|
|
64
|
+
this._circuitBreaker = null;
|
|
65
|
+
this._httpOptions = undefined;
|
|
66
|
+
this._bodyDuplexMode = undefined;
|
|
67
|
+
this.targetService = "DesktopService";
|
|
68
|
+
this._regionId = "";
|
|
69
|
+
this._lastSetRegionOrRegionId = "";
|
|
70
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
71
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
72
|
+
: null;
|
|
73
|
+
if (clientConfiguration) {
|
|
74
|
+
this._clientConfiguration = clientConfiguration;
|
|
75
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
76
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
77
|
+
: null;
|
|
78
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
79
|
+
? clientConfiguration.httpOptions
|
|
80
|
+
: undefined;
|
|
81
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
82
|
+
? clientConfiguration.bodyDuplexMode
|
|
83
|
+
: undefined;
|
|
84
|
+
}
|
|
85
|
+
if (!oci_common_1.developerToolConfiguration.isServiceEnabled("desktops")) {
|
|
86
|
+
let errmsg = "The developerToolConfiguration configuration disabled this service, this behavior is controlled by developerToolConfiguration.ociEnabledServiceSet variable. Please check if your local developer_tool_configuration file has configured the service you're targeting or contact the cloud provider on the availability of this service : ";
|
|
87
|
+
throw errmsg.concat("desktops");
|
|
88
|
+
}
|
|
89
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
90
|
+
const specCircuitBreakerEnabled = true;
|
|
91
|
+
if (!this._circuitBreaker &&
|
|
92
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
93
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
94
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
95
|
+
}
|
|
96
|
+
this._httpClient =
|
|
97
|
+
params.httpClient ||
|
|
98
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
99
|
+
if (params.authenticationDetailsProvider &&
|
|
100
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
101
|
+
const provider = params.authenticationDetailsProvider;
|
|
102
|
+
if (provider.getRegion()) {
|
|
103
|
+
this.region = provider.getRegion();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
109
|
+
*/
|
|
110
|
+
get endpoint() {
|
|
111
|
+
return this._endpoint;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
115
|
+
* @param endpoint The endpoint of the service.
|
|
116
|
+
*/
|
|
117
|
+
set endpoint(endpoint) {
|
|
118
|
+
this._endpoint = endpoint;
|
|
119
|
+
this._endpoint = this._endpoint + "/20220618";
|
|
120
|
+
if (this.logger)
|
|
121
|
+
this.logger.info(`DesktopServiceClient endpoint set to ${this._endpoint}`);
|
|
122
|
+
}
|
|
123
|
+
get logger() {
|
|
124
|
+
return common.LOG.logger;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
128
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
129
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
130
|
+
*/
|
|
131
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
132
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
133
|
+
if (this.logger)
|
|
134
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
135
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
136
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(DesktopServiceClient.serviceEndpointTemplate, this._region, DesktopServiceClient.endpointServiceName);
|
|
137
|
+
}
|
|
138
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
139
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(DesktopServiceClient.serviceEndpointTemplate, this._regionId, DesktopServiceClient.endpointServiceName);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
144
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
145
|
+
* @param region The region of the service.
|
|
146
|
+
*/
|
|
147
|
+
set region(region) {
|
|
148
|
+
this._region = region;
|
|
149
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(DesktopServiceClient.serviceEndpointTemplate, region, DesktopServiceClient.endpointServiceName);
|
|
150
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
154
|
+
*
|
|
155
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
156
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
157
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
158
|
+
* @param regionId The public region ID.
|
|
159
|
+
*/
|
|
160
|
+
set regionId(regionId) {
|
|
161
|
+
this._regionId = regionId;
|
|
162
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(DesktopServiceClient.serviceEndpointTemplate, regionId, DesktopServiceClient.endpointServiceName);
|
|
163
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Creates a new DesktopServiceWaiter for resources for this service.
|
|
167
|
+
*
|
|
168
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
169
|
+
* @return The service waiters.
|
|
170
|
+
*/
|
|
171
|
+
createWaiters(config) {
|
|
172
|
+
this._waiters = new desktopservice_waiter_1.DesktopServiceWaiter(this, config);
|
|
173
|
+
return this._waiters;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Gets the waiters available for resources for this service.
|
|
177
|
+
*
|
|
178
|
+
* @return The service waiters.
|
|
179
|
+
*/
|
|
180
|
+
getWaiters() {
|
|
181
|
+
if (this._waiters) {
|
|
182
|
+
return this._waiters;
|
|
183
|
+
}
|
|
184
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
188
|
+
*/
|
|
189
|
+
shutdownCircuitBreaker() {
|
|
190
|
+
if (this._circuitBreaker) {
|
|
191
|
+
this._circuitBreaker.shutdown();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Cancel work request with the given ID.
|
|
196
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
197
|
+
* @param CancelWorkRequestRequest
|
|
198
|
+
* @return CancelWorkRequestResponse
|
|
199
|
+
* @throws OciError when an error occurs
|
|
200
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/CancelWorkRequest.ts.html |here} to see how to use CancelWorkRequest API.
|
|
201
|
+
*/
|
|
202
|
+
cancelWorkRequest(cancelWorkRequestRequest) {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
if (this.logger)
|
|
205
|
+
this.logger.debug("Calling operation DesktopServiceClient#cancelWorkRequest.");
|
|
206
|
+
const operationName = "cancelWorkRequest";
|
|
207
|
+
const apiReferenceLink = "";
|
|
208
|
+
const pathParams = {
|
|
209
|
+
"{workRequestId}": cancelWorkRequestRequest.workRequestId
|
|
210
|
+
};
|
|
211
|
+
const queryParams = {};
|
|
212
|
+
let headerParams = {
|
|
213
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
214
|
+
"if-match": cancelWorkRequestRequest.ifMatch,
|
|
215
|
+
"opc-request-id": cancelWorkRequestRequest.opcRequestId
|
|
216
|
+
};
|
|
217
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
218
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
219
|
+
if (this.logger)
|
|
220
|
+
retrier.logger = this.logger;
|
|
221
|
+
const request = yield oci_common_1.composeRequest({
|
|
222
|
+
baseEndpoint: this._endpoint,
|
|
223
|
+
defaultHeaders: this._defaultHeaders,
|
|
224
|
+
path: "/workRequests/{workRequestId}",
|
|
225
|
+
method: "DELETE",
|
|
226
|
+
pathParams: pathParams,
|
|
227
|
+
headerParams: headerParams,
|
|
228
|
+
queryParams: queryParams
|
|
229
|
+
});
|
|
230
|
+
try {
|
|
231
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
232
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
233
|
+
responseObject: {},
|
|
234
|
+
responseHeaders: [
|
|
235
|
+
{
|
|
236
|
+
value: response.headers.get("opc-request-id"),
|
|
237
|
+
key: "opcRequestId",
|
|
238
|
+
dataType: "string"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
});
|
|
242
|
+
return sdkResponse;
|
|
243
|
+
}
|
|
244
|
+
catch (err) {
|
|
245
|
+
throw err;
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Moves a desktop pool into a different compartment within the same tenancy. You must provide the OCID of the desktop pool and the OCID of the compartment that you are moving the pool to.
|
|
251
|
+
*
|
|
252
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
253
|
+
* @param ChangeDesktopPoolCompartmentRequest
|
|
254
|
+
* @return ChangeDesktopPoolCompartmentResponse
|
|
255
|
+
* @throws OciError when an error occurs
|
|
256
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/ChangeDesktopPoolCompartment.ts.html |here} to see how to use ChangeDesktopPoolCompartment API.
|
|
257
|
+
*/
|
|
258
|
+
changeDesktopPoolCompartment(changeDesktopPoolCompartmentRequest) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
+
if (this.logger)
|
|
261
|
+
this.logger.debug("Calling operation DesktopServiceClient#changeDesktopPoolCompartment.");
|
|
262
|
+
const operationName = "changeDesktopPoolCompartment";
|
|
263
|
+
const apiReferenceLink = "";
|
|
264
|
+
const pathParams = {
|
|
265
|
+
"{desktopPoolId}": changeDesktopPoolCompartmentRequest.desktopPoolId
|
|
266
|
+
};
|
|
267
|
+
const queryParams = {};
|
|
268
|
+
let headerParams = {
|
|
269
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
270
|
+
"opc-request-id": changeDesktopPoolCompartmentRequest.opcRequestId,
|
|
271
|
+
"if-match": changeDesktopPoolCompartmentRequest.ifMatch,
|
|
272
|
+
"opc-retry-token": changeDesktopPoolCompartmentRequest.opcRetryToken
|
|
273
|
+
};
|
|
274
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
275
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeDesktopPoolCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
276
|
+
if (this.logger)
|
|
277
|
+
retrier.logger = this.logger;
|
|
278
|
+
const request = yield oci_common_1.composeRequest({
|
|
279
|
+
baseEndpoint: this._endpoint,
|
|
280
|
+
defaultHeaders: this._defaultHeaders,
|
|
281
|
+
path: "/desktopPools/{desktopPoolId}/actions/changeCompartment",
|
|
282
|
+
method: "POST",
|
|
283
|
+
bodyContent: common.ObjectSerializer.serialize(changeDesktopPoolCompartmentRequest.changeDesktopPoolCompartmentDetails, "ChangeDesktopPoolCompartmentDetails", model.ChangeDesktopPoolCompartmentDetails.getJsonObj),
|
|
284
|
+
pathParams: pathParams,
|
|
285
|
+
headerParams: headerParams,
|
|
286
|
+
queryParams: queryParams
|
|
287
|
+
});
|
|
288
|
+
try {
|
|
289
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
290
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
291
|
+
responseObject: {},
|
|
292
|
+
responseHeaders: [
|
|
293
|
+
{
|
|
294
|
+
value: response.headers.get("opc-request-id"),
|
|
295
|
+
key: "opcRequestId",
|
|
296
|
+
dataType: "string"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
value: response.headers.get("opc-work-request-id"),
|
|
300
|
+
key: "opcWorkRequestId",
|
|
301
|
+
dataType: "string"
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
});
|
|
305
|
+
return sdkResponse;
|
|
306
|
+
}
|
|
307
|
+
catch (err) {
|
|
308
|
+
throw err;
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Creates a desktop pool with the given configuration parameters.
|
|
314
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
315
|
+
* @param CreateDesktopPoolRequest
|
|
316
|
+
* @return CreateDesktopPoolResponse
|
|
317
|
+
* @throws OciError when an error occurs
|
|
318
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/CreateDesktopPool.ts.html |here} to see how to use CreateDesktopPool API.
|
|
319
|
+
*/
|
|
320
|
+
createDesktopPool(createDesktopPoolRequest) {
|
|
321
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
322
|
+
if (this.logger)
|
|
323
|
+
this.logger.debug("Calling operation DesktopServiceClient#createDesktopPool.");
|
|
324
|
+
const operationName = "createDesktopPool";
|
|
325
|
+
const apiReferenceLink = "";
|
|
326
|
+
const pathParams = {};
|
|
327
|
+
const queryParams = {};
|
|
328
|
+
let headerParams = {
|
|
329
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
330
|
+
"opc-retry-token": createDesktopPoolRequest.opcRetryToken,
|
|
331
|
+
"opc-request-id": createDesktopPoolRequest.opcRequestId
|
|
332
|
+
};
|
|
333
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
334
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createDesktopPoolRequest.retryConfiguration, specRetryConfiguration);
|
|
335
|
+
if (this.logger)
|
|
336
|
+
retrier.logger = this.logger;
|
|
337
|
+
const request = yield oci_common_1.composeRequest({
|
|
338
|
+
baseEndpoint: this._endpoint,
|
|
339
|
+
defaultHeaders: this._defaultHeaders,
|
|
340
|
+
path: "/desktopPools",
|
|
341
|
+
method: "POST",
|
|
342
|
+
bodyContent: common.ObjectSerializer.serialize(createDesktopPoolRequest.createDesktopPoolDetails, "CreateDesktopPoolDetails", model.CreateDesktopPoolDetails.getJsonObj),
|
|
343
|
+
pathParams: pathParams,
|
|
344
|
+
headerParams: headerParams,
|
|
345
|
+
queryParams: queryParams
|
|
346
|
+
});
|
|
347
|
+
try {
|
|
348
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
349
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
350
|
+
responseObject: {},
|
|
351
|
+
body: yield response.json(),
|
|
352
|
+
bodyKey: "desktopPool",
|
|
353
|
+
bodyModel: model.DesktopPool,
|
|
354
|
+
type: "model.DesktopPool",
|
|
355
|
+
responseHeaders: [
|
|
356
|
+
{
|
|
357
|
+
value: response.headers.get("opc-request-id"),
|
|
358
|
+
key: "opcRequestId",
|
|
359
|
+
dataType: "string"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
value: response.headers.get("opc-work-request-id"),
|
|
363
|
+
key: "opcWorkRequestId",
|
|
364
|
+
dataType: "string"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
value: response.headers.get("Location"),
|
|
368
|
+
key: "location",
|
|
369
|
+
dataType: "string"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
value: response.headers.get("Content-Location"),
|
|
373
|
+
key: "contentLocation",
|
|
374
|
+
dataType: "string"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
value: response.headers.get("etag"),
|
|
378
|
+
key: "etag",
|
|
379
|
+
dataType: "string"
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
});
|
|
383
|
+
return sdkResponse;
|
|
384
|
+
}
|
|
385
|
+
catch (err) {
|
|
386
|
+
throw err;
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Deletes the desktop with the specified OCID. The service terminates the associated compute instance. The end-user loses access to the desktop instance permanently. Any associated block volume becomes inactive but is not deleted.
|
|
392
|
+
*
|
|
393
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
394
|
+
* @param DeleteDesktopRequest
|
|
395
|
+
* @return DeleteDesktopResponse
|
|
396
|
+
* @throws OciError when an error occurs
|
|
397
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/DeleteDesktop.ts.html |here} to see how to use DeleteDesktop API.
|
|
398
|
+
*/
|
|
399
|
+
deleteDesktop(deleteDesktopRequest) {
|
|
400
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
401
|
+
if (this.logger)
|
|
402
|
+
this.logger.debug("Calling operation DesktopServiceClient#deleteDesktop.");
|
|
403
|
+
const operationName = "deleteDesktop";
|
|
404
|
+
const apiReferenceLink = "";
|
|
405
|
+
const pathParams = {
|
|
406
|
+
"{desktopId}": deleteDesktopRequest.desktopId
|
|
407
|
+
};
|
|
408
|
+
const queryParams = {};
|
|
409
|
+
let headerParams = {
|
|
410
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
411
|
+
"opc-request-id": deleteDesktopRequest.opcRequestId,
|
|
412
|
+
"if-match": deleteDesktopRequest.ifMatch
|
|
413
|
+
};
|
|
414
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
415
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteDesktopRequest.retryConfiguration, specRetryConfiguration);
|
|
416
|
+
if (this.logger)
|
|
417
|
+
retrier.logger = this.logger;
|
|
418
|
+
const request = yield oci_common_1.composeRequest({
|
|
419
|
+
baseEndpoint: this._endpoint,
|
|
420
|
+
defaultHeaders: this._defaultHeaders,
|
|
421
|
+
path: "/desktops/{desktopId}",
|
|
422
|
+
method: "DELETE",
|
|
423
|
+
pathParams: pathParams,
|
|
424
|
+
headerParams: headerParams,
|
|
425
|
+
queryParams: queryParams
|
|
426
|
+
});
|
|
427
|
+
try {
|
|
428
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
429
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
430
|
+
responseObject: {},
|
|
431
|
+
responseHeaders: [
|
|
432
|
+
{
|
|
433
|
+
value: response.headers.get("opc-request-id"),
|
|
434
|
+
key: "opcRequestId",
|
|
435
|
+
dataType: "string"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
value: response.headers.get("opc-work-request-id"),
|
|
439
|
+
key: "opcWorkRequestId",
|
|
440
|
+
dataType: "string"
|
|
441
|
+
}
|
|
442
|
+
]
|
|
443
|
+
});
|
|
444
|
+
return sdkResponse;
|
|
445
|
+
}
|
|
446
|
+
catch (err) {
|
|
447
|
+
throw err;
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Deletes a desktop pool with the specified OCID. The service terminates all compute instances and users immediately lose access to their desktops. You can choose to preserve the block volumes associated with the pool.
|
|
453
|
+
*
|
|
454
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
455
|
+
* @param DeleteDesktopPoolRequest
|
|
456
|
+
* @return DeleteDesktopPoolResponse
|
|
457
|
+
* @throws OciError when an error occurs
|
|
458
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/DeleteDesktopPool.ts.html |here} to see how to use DeleteDesktopPool API.
|
|
459
|
+
*/
|
|
460
|
+
deleteDesktopPool(deleteDesktopPoolRequest) {
|
|
461
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
462
|
+
if (this.logger)
|
|
463
|
+
this.logger.debug("Calling operation DesktopServiceClient#deleteDesktopPool.");
|
|
464
|
+
const operationName = "deleteDesktopPool";
|
|
465
|
+
const apiReferenceLink = "";
|
|
466
|
+
const pathParams = {
|
|
467
|
+
"{desktopPoolId}": deleteDesktopPoolRequest.desktopPoolId
|
|
468
|
+
};
|
|
469
|
+
const queryParams = {
|
|
470
|
+
"areVolumesPreserved": deleteDesktopPoolRequest.areVolumesPreserved
|
|
471
|
+
};
|
|
472
|
+
let headerParams = {
|
|
473
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
474
|
+
"opc-request-id": deleteDesktopPoolRequest.opcRequestId,
|
|
475
|
+
"if-match": deleteDesktopPoolRequest.ifMatch
|
|
476
|
+
};
|
|
477
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
478
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteDesktopPoolRequest.retryConfiguration, specRetryConfiguration);
|
|
479
|
+
if (this.logger)
|
|
480
|
+
retrier.logger = this.logger;
|
|
481
|
+
const request = yield oci_common_1.composeRequest({
|
|
482
|
+
baseEndpoint: this._endpoint,
|
|
483
|
+
defaultHeaders: this._defaultHeaders,
|
|
484
|
+
path: "/desktopPools/{desktopPoolId}",
|
|
485
|
+
method: "DELETE",
|
|
486
|
+
pathParams: pathParams,
|
|
487
|
+
headerParams: headerParams,
|
|
488
|
+
queryParams: queryParams
|
|
489
|
+
});
|
|
490
|
+
try {
|
|
491
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
492
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
493
|
+
responseObject: {},
|
|
494
|
+
responseHeaders: [
|
|
495
|
+
{
|
|
496
|
+
value: response.headers.get("opc-request-id"),
|
|
497
|
+
key: "opcRequestId",
|
|
498
|
+
dataType: "string"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
value: response.headers.get("opc-work-request-id"),
|
|
502
|
+
key: "opcWorkRequestId",
|
|
503
|
+
dataType: "string"
|
|
504
|
+
}
|
|
505
|
+
]
|
|
506
|
+
});
|
|
507
|
+
return sdkResponse;
|
|
508
|
+
}
|
|
509
|
+
catch (err) {
|
|
510
|
+
throw err;
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Provides information about the desktop with the specified OCID.
|
|
516
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
517
|
+
* @param GetDesktopRequest
|
|
518
|
+
* @return GetDesktopResponse
|
|
519
|
+
* @throws OciError when an error occurs
|
|
520
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/GetDesktop.ts.html |here} to see how to use GetDesktop API.
|
|
521
|
+
*/
|
|
522
|
+
getDesktop(getDesktopRequest) {
|
|
523
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
524
|
+
if (this.logger)
|
|
525
|
+
this.logger.debug("Calling operation DesktopServiceClient#getDesktop.");
|
|
526
|
+
const operationName = "getDesktop";
|
|
527
|
+
const apiReferenceLink = "";
|
|
528
|
+
const pathParams = {
|
|
529
|
+
"{desktopId}": getDesktopRequest.desktopId
|
|
530
|
+
};
|
|
531
|
+
const queryParams = {};
|
|
532
|
+
let headerParams = {
|
|
533
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
534
|
+
"opc-request-id": getDesktopRequest.opcRequestId
|
|
535
|
+
};
|
|
536
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
537
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getDesktopRequest.retryConfiguration, specRetryConfiguration);
|
|
538
|
+
if (this.logger)
|
|
539
|
+
retrier.logger = this.logger;
|
|
540
|
+
const request = yield oci_common_1.composeRequest({
|
|
541
|
+
baseEndpoint: this._endpoint,
|
|
542
|
+
defaultHeaders: this._defaultHeaders,
|
|
543
|
+
path: "/desktops/{desktopId}",
|
|
544
|
+
method: "GET",
|
|
545
|
+
pathParams: pathParams,
|
|
546
|
+
headerParams: headerParams,
|
|
547
|
+
queryParams: queryParams
|
|
548
|
+
});
|
|
549
|
+
try {
|
|
550
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
551
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
552
|
+
responseObject: {},
|
|
553
|
+
body: yield response.json(),
|
|
554
|
+
bodyKey: "desktop",
|
|
555
|
+
bodyModel: model.Desktop,
|
|
556
|
+
type: "model.Desktop",
|
|
557
|
+
responseHeaders: [
|
|
558
|
+
{
|
|
559
|
+
value: response.headers.get("opc-request-id"),
|
|
560
|
+
key: "opcRequestId",
|
|
561
|
+
dataType: "string"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
value: response.headers.get("etag"),
|
|
565
|
+
key: "etag",
|
|
566
|
+
dataType: "string"
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
});
|
|
570
|
+
return sdkResponse;
|
|
571
|
+
}
|
|
572
|
+
catch (err) {
|
|
573
|
+
throw err;
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Returns information about the desktop pool including all configuration parameters and the current state.
|
|
579
|
+
*
|
|
580
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
581
|
+
* @param GetDesktopPoolRequest
|
|
582
|
+
* @return GetDesktopPoolResponse
|
|
583
|
+
* @throws OciError when an error occurs
|
|
584
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/GetDesktopPool.ts.html |here} to see how to use GetDesktopPool API.
|
|
585
|
+
*/
|
|
586
|
+
getDesktopPool(getDesktopPoolRequest) {
|
|
587
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
588
|
+
if (this.logger)
|
|
589
|
+
this.logger.debug("Calling operation DesktopServiceClient#getDesktopPool.");
|
|
590
|
+
const operationName = "getDesktopPool";
|
|
591
|
+
const apiReferenceLink = "";
|
|
592
|
+
const pathParams = {
|
|
593
|
+
"{desktopPoolId}": getDesktopPoolRequest.desktopPoolId
|
|
594
|
+
};
|
|
595
|
+
const queryParams = {};
|
|
596
|
+
let headerParams = {
|
|
597
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
598
|
+
"opc-request-id": getDesktopPoolRequest.opcRequestId
|
|
599
|
+
};
|
|
600
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
601
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getDesktopPoolRequest.retryConfiguration, specRetryConfiguration);
|
|
602
|
+
if (this.logger)
|
|
603
|
+
retrier.logger = this.logger;
|
|
604
|
+
const request = yield oci_common_1.composeRequest({
|
|
605
|
+
baseEndpoint: this._endpoint,
|
|
606
|
+
defaultHeaders: this._defaultHeaders,
|
|
607
|
+
path: "/desktopPools/{desktopPoolId}",
|
|
608
|
+
method: "GET",
|
|
609
|
+
pathParams: pathParams,
|
|
610
|
+
headerParams: headerParams,
|
|
611
|
+
queryParams: queryParams
|
|
612
|
+
});
|
|
613
|
+
try {
|
|
614
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
615
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
616
|
+
responseObject: {},
|
|
617
|
+
body: yield response.json(),
|
|
618
|
+
bodyKey: "desktopPool",
|
|
619
|
+
bodyModel: model.DesktopPool,
|
|
620
|
+
type: "model.DesktopPool",
|
|
621
|
+
responseHeaders: [
|
|
622
|
+
{
|
|
623
|
+
value: response.headers.get("opc-request-id"),
|
|
624
|
+
key: "opcRequestId",
|
|
625
|
+
dataType: "string"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
value: response.headers.get("etag"),
|
|
629
|
+
key: "etag",
|
|
630
|
+
dataType: "string"
|
|
631
|
+
}
|
|
632
|
+
]
|
|
633
|
+
});
|
|
634
|
+
return sdkResponse;
|
|
635
|
+
}
|
|
636
|
+
catch (err) {
|
|
637
|
+
throw err;
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Gets the status of the work request with the given ID.
|
|
643
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
644
|
+
* @param GetWorkRequestRequest
|
|
645
|
+
* @return GetWorkRequestResponse
|
|
646
|
+
* @throws OciError when an error occurs
|
|
647
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
|
|
648
|
+
*/
|
|
649
|
+
getWorkRequest(getWorkRequestRequest) {
|
|
650
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
651
|
+
if (this.logger)
|
|
652
|
+
this.logger.debug("Calling operation DesktopServiceClient#getWorkRequest.");
|
|
653
|
+
const operationName = "getWorkRequest";
|
|
654
|
+
const apiReferenceLink = "";
|
|
655
|
+
const pathParams = {
|
|
656
|
+
"{workRequestId}": getWorkRequestRequest.workRequestId
|
|
657
|
+
};
|
|
658
|
+
const queryParams = {};
|
|
659
|
+
let headerParams = {
|
|
660
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
661
|
+
"opc-request-id": getWorkRequestRequest.opcRequestId
|
|
662
|
+
};
|
|
663
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
664
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
665
|
+
if (this.logger)
|
|
666
|
+
retrier.logger = this.logger;
|
|
667
|
+
const request = yield oci_common_1.composeRequest({
|
|
668
|
+
baseEndpoint: this._endpoint,
|
|
669
|
+
defaultHeaders: this._defaultHeaders,
|
|
670
|
+
path: "/workRequests/{workRequestId}",
|
|
671
|
+
method: "GET",
|
|
672
|
+
pathParams: pathParams,
|
|
673
|
+
headerParams: headerParams,
|
|
674
|
+
queryParams: queryParams
|
|
675
|
+
});
|
|
676
|
+
try {
|
|
677
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
678
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
679
|
+
responseObject: {},
|
|
680
|
+
body: yield response.json(),
|
|
681
|
+
bodyKey: "workRequest",
|
|
682
|
+
bodyModel: model.WorkRequest,
|
|
683
|
+
type: "model.WorkRequest",
|
|
684
|
+
responseHeaders: [
|
|
685
|
+
{
|
|
686
|
+
value: response.headers.get("etag"),
|
|
687
|
+
key: "etag",
|
|
688
|
+
dataType: "string"
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
value: response.headers.get("opc-request-id"),
|
|
692
|
+
key: "opcRequestId",
|
|
693
|
+
dataType: "string"
|
|
694
|
+
}
|
|
695
|
+
]
|
|
696
|
+
});
|
|
697
|
+
return sdkResponse;
|
|
698
|
+
}
|
|
699
|
+
catch (err) {
|
|
700
|
+
throw err;
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Returns a list of desktops within a given desktop pool. You can limit the results to an availability domain, desktop name, or desktop state. You can limit the number of results returned, sort the results by time or name, and sort in ascending or descending order.
|
|
706
|
+
*
|
|
707
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
708
|
+
* @param ListDesktopPoolDesktopsRequest
|
|
709
|
+
* @return ListDesktopPoolDesktopsResponse
|
|
710
|
+
* @throws OciError when an error occurs
|
|
711
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/ListDesktopPoolDesktops.ts.html |here} to see how to use ListDesktopPoolDesktops API.
|
|
712
|
+
*/
|
|
713
|
+
listDesktopPoolDesktops(listDesktopPoolDesktopsRequest) {
|
|
714
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
715
|
+
if (this.logger)
|
|
716
|
+
this.logger.debug("Calling operation DesktopServiceClient#listDesktopPoolDesktops.");
|
|
717
|
+
const operationName = "listDesktopPoolDesktops";
|
|
718
|
+
const apiReferenceLink = "";
|
|
719
|
+
const pathParams = {
|
|
720
|
+
"{desktopPoolId}": listDesktopPoolDesktopsRequest.desktopPoolId
|
|
721
|
+
};
|
|
722
|
+
const queryParams = {
|
|
723
|
+
"compartmentId": listDesktopPoolDesktopsRequest.compartmentId,
|
|
724
|
+
"availabilityDomain": listDesktopPoolDesktopsRequest.availabilityDomain,
|
|
725
|
+
"displayName": listDesktopPoolDesktopsRequest.displayName,
|
|
726
|
+
"id": listDesktopPoolDesktopsRequest.id,
|
|
727
|
+
"lifecycleState": listDesktopPoolDesktopsRequest.lifecycleState,
|
|
728
|
+
"limit": listDesktopPoolDesktopsRequest.limit,
|
|
729
|
+
"sortBy": listDesktopPoolDesktopsRequest.sortBy,
|
|
730
|
+
"sortOrder": listDesktopPoolDesktopsRequest.sortOrder,
|
|
731
|
+
"page": listDesktopPoolDesktopsRequest.page
|
|
732
|
+
};
|
|
733
|
+
let headerParams = {
|
|
734
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
735
|
+
"opc-request-id": listDesktopPoolDesktopsRequest.opcRequestId
|
|
736
|
+
};
|
|
737
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
738
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listDesktopPoolDesktopsRequest.retryConfiguration, specRetryConfiguration);
|
|
739
|
+
if (this.logger)
|
|
740
|
+
retrier.logger = this.logger;
|
|
741
|
+
const request = yield oci_common_1.composeRequest({
|
|
742
|
+
baseEndpoint: this._endpoint,
|
|
743
|
+
defaultHeaders: this._defaultHeaders,
|
|
744
|
+
path: "/desktopPools/{desktopPoolId}/desktops",
|
|
745
|
+
method: "GET",
|
|
746
|
+
pathParams: pathParams,
|
|
747
|
+
headerParams: headerParams,
|
|
748
|
+
queryParams: queryParams
|
|
749
|
+
});
|
|
750
|
+
try {
|
|
751
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
752
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
753
|
+
responseObject: {},
|
|
754
|
+
body: yield response.json(),
|
|
755
|
+
bodyKey: "desktopPoolDesktopCollection",
|
|
756
|
+
bodyModel: model.DesktopPoolDesktopCollection,
|
|
757
|
+
type: "model.DesktopPoolDesktopCollection",
|
|
758
|
+
responseHeaders: [
|
|
759
|
+
{
|
|
760
|
+
value: response.headers.get("opc-request-id"),
|
|
761
|
+
key: "opcRequestId",
|
|
762
|
+
dataType: "string"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
value: response.headers.get("opc-next-page"),
|
|
766
|
+
key: "opcNextPage",
|
|
767
|
+
dataType: "string"
|
|
768
|
+
}
|
|
769
|
+
]
|
|
770
|
+
});
|
|
771
|
+
return sdkResponse;
|
|
772
|
+
}
|
|
773
|
+
catch (err) {
|
|
774
|
+
throw err;
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Returns a list of volumes within the given desktop pool. You can limit the results to an availability domain, volume name, or volume state. You can limit the number of results returned, sort the results by time or name, and sort in ascending or descending order.
|
|
780
|
+
*
|
|
781
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
782
|
+
* @param ListDesktopPoolVolumesRequest
|
|
783
|
+
* @return ListDesktopPoolVolumesResponse
|
|
784
|
+
* @throws OciError when an error occurs
|
|
785
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/ListDesktopPoolVolumes.ts.html |here} to see how to use ListDesktopPoolVolumes API.
|
|
786
|
+
*/
|
|
787
|
+
listDesktopPoolVolumes(listDesktopPoolVolumesRequest) {
|
|
788
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
789
|
+
if (this.logger)
|
|
790
|
+
this.logger.debug("Calling operation DesktopServiceClient#listDesktopPoolVolumes.");
|
|
791
|
+
const operationName = "listDesktopPoolVolumes";
|
|
792
|
+
const apiReferenceLink = "";
|
|
793
|
+
const pathParams = {
|
|
794
|
+
"{desktopPoolId}": listDesktopPoolVolumesRequest.desktopPoolId
|
|
795
|
+
};
|
|
796
|
+
const queryParams = {
|
|
797
|
+
"compartmentId": listDesktopPoolVolumesRequest.compartmentId,
|
|
798
|
+
"availabilityDomain": listDesktopPoolVolumesRequest.availabilityDomain,
|
|
799
|
+
"displayName": listDesktopPoolVolumesRequest.displayName,
|
|
800
|
+
"id": listDesktopPoolVolumesRequest.id,
|
|
801
|
+
"lifecycleState": listDesktopPoolVolumesRequest.lifecycleState,
|
|
802
|
+
"limit": listDesktopPoolVolumesRequest.limit,
|
|
803
|
+
"sortBy": listDesktopPoolVolumesRequest.sortBy,
|
|
804
|
+
"sortOrder": listDesktopPoolVolumesRequest.sortOrder,
|
|
805
|
+
"page": listDesktopPoolVolumesRequest.page
|
|
806
|
+
};
|
|
807
|
+
let headerParams = {
|
|
808
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
809
|
+
"opc-request-id": listDesktopPoolVolumesRequest.opcRequestId
|
|
810
|
+
};
|
|
811
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
812
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listDesktopPoolVolumesRequest.retryConfiguration, specRetryConfiguration);
|
|
813
|
+
if (this.logger)
|
|
814
|
+
retrier.logger = this.logger;
|
|
815
|
+
const request = yield oci_common_1.composeRequest({
|
|
816
|
+
baseEndpoint: this._endpoint,
|
|
817
|
+
defaultHeaders: this._defaultHeaders,
|
|
818
|
+
path: "/desktopPools/{desktopPoolId}/volumes",
|
|
819
|
+
method: "GET",
|
|
820
|
+
pathParams: pathParams,
|
|
821
|
+
headerParams: headerParams,
|
|
822
|
+
queryParams: queryParams
|
|
823
|
+
});
|
|
824
|
+
try {
|
|
825
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
826
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
827
|
+
responseObject: {},
|
|
828
|
+
body: yield response.json(),
|
|
829
|
+
bodyKey: "desktopPoolVolumeCollection",
|
|
830
|
+
bodyModel: model.DesktopPoolVolumeCollection,
|
|
831
|
+
type: "model.DesktopPoolVolumeCollection",
|
|
832
|
+
responseHeaders: [
|
|
833
|
+
{
|
|
834
|
+
value: response.headers.get("opc-request-id"),
|
|
835
|
+
key: "opcRequestId",
|
|
836
|
+
dataType: "string"
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
value: response.headers.get("opc-next-page"),
|
|
840
|
+
key: "opcNextPage",
|
|
841
|
+
dataType: "string"
|
|
842
|
+
}
|
|
843
|
+
]
|
|
844
|
+
});
|
|
845
|
+
return sdkResponse;
|
|
846
|
+
}
|
|
847
|
+
catch (err) {
|
|
848
|
+
throw err;
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Returns a list of desktop pools within the given compartment. You can limit the results to an availability domain, pool name, or pool state. You can limit the number of results returned, sort the results by time or name, and sort in ascending or descending order.
|
|
854
|
+
*
|
|
855
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
856
|
+
* @param ListDesktopPoolsRequest
|
|
857
|
+
* @return ListDesktopPoolsResponse
|
|
858
|
+
* @throws OciError when an error occurs
|
|
859
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/ListDesktopPools.ts.html |here} to see how to use ListDesktopPools API.
|
|
860
|
+
*/
|
|
861
|
+
listDesktopPools(listDesktopPoolsRequest) {
|
|
862
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
863
|
+
if (this.logger)
|
|
864
|
+
this.logger.debug("Calling operation DesktopServiceClient#listDesktopPools.");
|
|
865
|
+
const operationName = "listDesktopPools";
|
|
866
|
+
const apiReferenceLink = "";
|
|
867
|
+
const pathParams = {};
|
|
868
|
+
const queryParams = {
|
|
869
|
+
"compartmentId": listDesktopPoolsRequest.compartmentId,
|
|
870
|
+
"availabilityDomain": listDesktopPoolsRequest.availabilityDomain,
|
|
871
|
+
"displayName": listDesktopPoolsRequest.displayName,
|
|
872
|
+
"id": listDesktopPoolsRequest.id,
|
|
873
|
+
"lifecycleState": listDesktopPoolsRequest.lifecycleState,
|
|
874
|
+
"limit": listDesktopPoolsRequest.limit,
|
|
875
|
+
"sortBy": listDesktopPoolsRequest.sortBy,
|
|
876
|
+
"sortOrder": listDesktopPoolsRequest.sortOrder,
|
|
877
|
+
"page": listDesktopPoolsRequest.page
|
|
878
|
+
};
|
|
879
|
+
let headerParams = {
|
|
880
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
881
|
+
"opc-request-id": listDesktopPoolsRequest.opcRequestId
|
|
882
|
+
};
|
|
883
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
884
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listDesktopPoolsRequest.retryConfiguration, specRetryConfiguration);
|
|
885
|
+
if (this.logger)
|
|
886
|
+
retrier.logger = this.logger;
|
|
887
|
+
const request = yield oci_common_1.composeRequest({
|
|
888
|
+
baseEndpoint: this._endpoint,
|
|
889
|
+
defaultHeaders: this._defaultHeaders,
|
|
890
|
+
path: "/desktopPools",
|
|
891
|
+
method: "GET",
|
|
892
|
+
pathParams: pathParams,
|
|
893
|
+
headerParams: headerParams,
|
|
894
|
+
queryParams: queryParams
|
|
895
|
+
});
|
|
896
|
+
try {
|
|
897
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
898
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
899
|
+
responseObject: {},
|
|
900
|
+
body: yield response.json(),
|
|
901
|
+
bodyKey: "desktopPoolCollection",
|
|
902
|
+
bodyModel: model.DesktopPoolCollection,
|
|
903
|
+
type: "model.DesktopPoolCollection",
|
|
904
|
+
responseHeaders: [
|
|
905
|
+
{
|
|
906
|
+
value: response.headers.get("opc-request-id"),
|
|
907
|
+
key: "opcRequestId",
|
|
908
|
+
dataType: "string"
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
value: response.headers.get("opc-next-page"),
|
|
912
|
+
key: "opcNextPage",
|
|
913
|
+
dataType: "string"
|
|
914
|
+
}
|
|
915
|
+
]
|
|
916
|
+
});
|
|
917
|
+
return sdkResponse;
|
|
918
|
+
}
|
|
919
|
+
catch (err) {
|
|
920
|
+
throw err;
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Returns a list of desktops filtered by the specified parameters. You can limit the results to an availability domain, desktop name, desktop OCID, desktop state, pool OCID, or compartment OCID. You can limit the number of results returned, sort the results by time or name, and sort in ascending or descending order.
|
|
926
|
+
*
|
|
927
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
928
|
+
* @param ListDesktopsRequest
|
|
929
|
+
* @return ListDesktopsResponse
|
|
930
|
+
* @throws OciError when an error occurs
|
|
931
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/ListDesktops.ts.html |here} to see how to use ListDesktops API.
|
|
932
|
+
*/
|
|
933
|
+
listDesktops(listDesktopsRequest) {
|
|
934
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
935
|
+
if (this.logger)
|
|
936
|
+
this.logger.debug("Calling operation DesktopServiceClient#listDesktops.");
|
|
937
|
+
const operationName = "listDesktops";
|
|
938
|
+
const apiReferenceLink = "";
|
|
939
|
+
const pathParams = {};
|
|
940
|
+
const queryParams = {
|
|
941
|
+
"availabilityDomain": listDesktopsRequest.availabilityDomain,
|
|
942
|
+
"displayName": listDesktopsRequest.displayName,
|
|
943
|
+
"id": listDesktopsRequest.id,
|
|
944
|
+
"lifecycleState": listDesktopsRequest.lifecycleState,
|
|
945
|
+
"limit": listDesktopsRequest.limit,
|
|
946
|
+
"sortBy": listDesktopsRequest.sortBy,
|
|
947
|
+
"sortOrder": listDesktopsRequest.sortOrder,
|
|
948
|
+
"compartmentId": listDesktopsRequest.compartmentId,
|
|
949
|
+
"page": listDesktopsRequest.page,
|
|
950
|
+
"desktopPoolId": listDesktopsRequest.desktopPoolId
|
|
951
|
+
};
|
|
952
|
+
let headerParams = {
|
|
953
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
954
|
+
"opc-request-id": listDesktopsRequest.opcRequestId
|
|
955
|
+
};
|
|
956
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
957
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listDesktopsRequest.retryConfiguration, specRetryConfiguration);
|
|
958
|
+
if (this.logger)
|
|
959
|
+
retrier.logger = this.logger;
|
|
960
|
+
const request = yield oci_common_1.composeRequest({
|
|
961
|
+
baseEndpoint: this._endpoint,
|
|
962
|
+
defaultHeaders: this._defaultHeaders,
|
|
963
|
+
path: "/desktops",
|
|
964
|
+
method: "GET",
|
|
965
|
+
pathParams: pathParams,
|
|
966
|
+
headerParams: headerParams,
|
|
967
|
+
queryParams: queryParams
|
|
968
|
+
});
|
|
969
|
+
try {
|
|
970
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
971
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
972
|
+
responseObject: {},
|
|
973
|
+
body: yield response.json(),
|
|
974
|
+
bodyKey: "desktopCollection",
|
|
975
|
+
bodyModel: model.DesktopCollection,
|
|
976
|
+
type: "model.DesktopCollection",
|
|
977
|
+
responseHeaders: [
|
|
978
|
+
{
|
|
979
|
+
value: response.headers.get("opc-request-id"),
|
|
980
|
+
key: "opcRequestId",
|
|
981
|
+
dataType: "string"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
value: response.headers.get("opc-next-page"),
|
|
985
|
+
key: "opcNextPage",
|
|
986
|
+
dataType: "string"
|
|
987
|
+
}
|
|
988
|
+
]
|
|
989
|
+
});
|
|
990
|
+
return sdkResponse;
|
|
991
|
+
}
|
|
992
|
+
catch (err) {
|
|
993
|
+
throw err;
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* Return a (paginated) list of errors for a given work request.
|
|
999
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1000
|
+
* @param ListWorkRequestErrorsRequest
|
|
1001
|
+
* @return ListWorkRequestErrorsResponse
|
|
1002
|
+
* @throws OciError when an error occurs
|
|
1003
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
|
|
1004
|
+
*/
|
|
1005
|
+
listWorkRequestErrors(listWorkRequestErrorsRequest) {
|
|
1006
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1007
|
+
if (this.logger)
|
|
1008
|
+
this.logger.debug("Calling operation DesktopServiceClient#listWorkRequestErrors.");
|
|
1009
|
+
const operationName = "listWorkRequestErrors";
|
|
1010
|
+
const apiReferenceLink = "";
|
|
1011
|
+
const pathParams = {
|
|
1012
|
+
"{workRequestId}": listWorkRequestErrorsRequest.workRequestId
|
|
1013
|
+
};
|
|
1014
|
+
const queryParams = {
|
|
1015
|
+
"page": listWorkRequestErrorsRequest.page,
|
|
1016
|
+
"limit": listWorkRequestErrorsRequest.limit,
|
|
1017
|
+
"sortBy": listWorkRequestErrorsRequest.sortBy,
|
|
1018
|
+
"sortOrder": listWorkRequestErrorsRequest.sortOrder
|
|
1019
|
+
};
|
|
1020
|
+
let headerParams = {
|
|
1021
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1022
|
+
"opc-request-id": listWorkRequestErrorsRequest.opcRequestId
|
|
1023
|
+
};
|
|
1024
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1025
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
|
|
1026
|
+
if (this.logger)
|
|
1027
|
+
retrier.logger = this.logger;
|
|
1028
|
+
const request = yield oci_common_1.composeRequest({
|
|
1029
|
+
baseEndpoint: this._endpoint,
|
|
1030
|
+
defaultHeaders: this._defaultHeaders,
|
|
1031
|
+
path: "/workRequests/{workRequestId}/errors",
|
|
1032
|
+
method: "GET",
|
|
1033
|
+
pathParams: pathParams,
|
|
1034
|
+
headerParams: headerParams,
|
|
1035
|
+
queryParams: queryParams
|
|
1036
|
+
});
|
|
1037
|
+
try {
|
|
1038
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1039
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1040
|
+
responseObject: {},
|
|
1041
|
+
body: yield response.json(),
|
|
1042
|
+
bodyKey: "workRequestErrorCollection",
|
|
1043
|
+
bodyModel: model.WorkRequestErrorCollection,
|
|
1044
|
+
type: "model.WorkRequestErrorCollection",
|
|
1045
|
+
responseHeaders: [
|
|
1046
|
+
{
|
|
1047
|
+
value: response.headers.get("opc-next-page"),
|
|
1048
|
+
key: "opcNextPage",
|
|
1049
|
+
dataType: "string"
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
value: response.headers.get("opc-request-id"),
|
|
1053
|
+
key: "opcRequestId",
|
|
1054
|
+
dataType: "string"
|
|
1055
|
+
}
|
|
1056
|
+
]
|
|
1057
|
+
});
|
|
1058
|
+
return sdkResponse;
|
|
1059
|
+
}
|
|
1060
|
+
catch (err) {
|
|
1061
|
+
throw err;
|
|
1062
|
+
}
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Return a (paginated) list of logs for a given work request.
|
|
1067
|
+
*
|
|
1068
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1069
|
+
* @param ListWorkRequestLogsRequest
|
|
1070
|
+
* @return ListWorkRequestLogsResponse
|
|
1071
|
+
* @throws OciError when an error occurs
|
|
1072
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
|
|
1073
|
+
*/
|
|
1074
|
+
listWorkRequestLogs(listWorkRequestLogsRequest) {
|
|
1075
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1076
|
+
if (this.logger)
|
|
1077
|
+
this.logger.debug("Calling operation DesktopServiceClient#listWorkRequestLogs.");
|
|
1078
|
+
const operationName = "listWorkRequestLogs";
|
|
1079
|
+
const apiReferenceLink = "";
|
|
1080
|
+
const pathParams = {
|
|
1081
|
+
"{workRequestId}": listWorkRequestLogsRequest.workRequestId
|
|
1082
|
+
};
|
|
1083
|
+
const queryParams = {
|
|
1084
|
+
"page": listWorkRequestLogsRequest.page,
|
|
1085
|
+
"limit": listWorkRequestLogsRequest.limit,
|
|
1086
|
+
"sortBy": listWorkRequestLogsRequest.sortBy,
|
|
1087
|
+
"sortOrder": listWorkRequestLogsRequest.sortOrder
|
|
1088
|
+
};
|
|
1089
|
+
let headerParams = {
|
|
1090
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1091
|
+
"opc-request-id": listWorkRequestLogsRequest.opcRequestId
|
|
1092
|
+
};
|
|
1093
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1094
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
|
|
1095
|
+
if (this.logger)
|
|
1096
|
+
retrier.logger = this.logger;
|
|
1097
|
+
const request = yield oci_common_1.composeRequest({
|
|
1098
|
+
baseEndpoint: this._endpoint,
|
|
1099
|
+
defaultHeaders: this._defaultHeaders,
|
|
1100
|
+
path: "/workRequests/{workRequestId}/logs",
|
|
1101
|
+
method: "GET",
|
|
1102
|
+
pathParams: pathParams,
|
|
1103
|
+
headerParams: headerParams,
|
|
1104
|
+
queryParams: queryParams
|
|
1105
|
+
});
|
|
1106
|
+
try {
|
|
1107
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1108
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1109
|
+
responseObject: {},
|
|
1110
|
+
body: yield response.json(),
|
|
1111
|
+
bodyKey: "workRequestLogEntryCollection",
|
|
1112
|
+
bodyModel: model.WorkRequestLogEntryCollection,
|
|
1113
|
+
type: "model.WorkRequestLogEntryCollection",
|
|
1114
|
+
responseHeaders: [
|
|
1115
|
+
{
|
|
1116
|
+
value: response.headers.get("opc-next-page"),
|
|
1117
|
+
key: "opcNextPage",
|
|
1118
|
+
dataType: "string"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
value: response.headers.get("opc-request-id"),
|
|
1122
|
+
key: "opcRequestId",
|
|
1123
|
+
dataType: "string"
|
|
1124
|
+
}
|
|
1125
|
+
]
|
|
1126
|
+
});
|
|
1127
|
+
return sdkResponse;
|
|
1128
|
+
}
|
|
1129
|
+
catch (err) {
|
|
1130
|
+
throw err;
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
/**
|
|
1135
|
+
* Lists the work requests in a compartment.
|
|
1136
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1137
|
+
* @param ListWorkRequestsRequest
|
|
1138
|
+
* @return ListWorkRequestsResponse
|
|
1139
|
+
* @throws OciError when an error occurs
|
|
1140
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
|
|
1141
|
+
*/
|
|
1142
|
+
listWorkRequests(listWorkRequestsRequest) {
|
|
1143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1144
|
+
if (this.logger)
|
|
1145
|
+
this.logger.debug("Calling operation DesktopServiceClient#listWorkRequests.");
|
|
1146
|
+
const operationName = "listWorkRequests";
|
|
1147
|
+
const apiReferenceLink = "";
|
|
1148
|
+
const pathParams = {};
|
|
1149
|
+
const queryParams = {
|
|
1150
|
+
"compartmentId": listWorkRequestsRequest.compartmentId,
|
|
1151
|
+
"workRequestId": listWorkRequestsRequest.workRequestId,
|
|
1152
|
+
"status": listWorkRequestsRequest.status,
|
|
1153
|
+
"resourceId": listWorkRequestsRequest.resourceId,
|
|
1154
|
+
"page": listWorkRequestsRequest.page,
|
|
1155
|
+
"limit": listWorkRequestsRequest.limit,
|
|
1156
|
+
"sortOrder": listWorkRequestsRequest.sortOrder,
|
|
1157
|
+
"sortBy": listWorkRequestsRequest.sortBy
|
|
1158
|
+
};
|
|
1159
|
+
let headerParams = {
|
|
1160
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1161
|
+
"opc-request-id": listWorkRequestsRequest.opcRequestId
|
|
1162
|
+
};
|
|
1163
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1164
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
|
|
1165
|
+
if (this.logger)
|
|
1166
|
+
retrier.logger = this.logger;
|
|
1167
|
+
const request = yield oci_common_1.composeRequest({
|
|
1168
|
+
baseEndpoint: this._endpoint,
|
|
1169
|
+
defaultHeaders: this._defaultHeaders,
|
|
1170
|
+
path: "/workRequests",
|
|
1171
|
+
method: "GET",
|
|
1172
|
+
pathParams: pathParams,
|
|
1173
|
+
headerParams: headerParams,
|
|
1174
|
+
queryParams: queryParams
|
|
1175
|
+
});
|
|
1176
|
+
try {
|
|
1177
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1178
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1179
|
+
responseObject: {},
|
|
1180
|
+
body: yield response.json(),
|
|
1181
|
+
bodyKey: "workRequestSummaryCollection",
|
|
1182
|
+
bodyModel: model.WorkRequestSummaryCollection,
|
|
1183
|
+
type: "model.WorkRequestSummaryCollection",
|
|
1184
|
+
responseHeaders: [
|
|
1185
|
+
{
|
|
1186
|
+
value: response.headers.get("opc-request-id"),
|
|
1187
|
+
key: "opcRequestId",
|
|
1188
|
+
dataType: "string"
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
value: response.headers.get("opc-next-page"),
|
|
1192
|
+
key: "opcNextPage",
|
|
1193
|
+
dataType: "string"
|
|
1194
|
+
}
|
|
1195
|
+
]
|
|
1196
|
+
});
|
|
1197
|
+
return sdkResponse;
|
|
1198
|
+
}
|
|
1199
|
+
catch (err) {
|
|
1200
|
+
throw err;
|
|
1201
|
+
}
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* Starts the desktop with the specified OCID.
|
|
1206
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1207
|
+
* @param StartDesktopRequest
|
|
1208
|
+
* @return StartDesktopResponse
|
|
1209
|
+
* @throws OciError when an error occurs
|
|
1210
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/StartDesktop.ts.html |here} to see how to use StartDesktop API.
|
|
1211
|
+
*/
|
|
1212
|
+
startDesktop(startDesktopRequest) {
|
|
1213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1214
|
+
if (this.logger)
|
|
1215
|
+
this.logger.debug("Calling operation DesktopServiceClient#startDesktop.");
|
|
1216
|
+
const operationName = "startDesktop";
|
|
1217
|
+
const apiReferenceLink = "";
|
|
1218
|
+
const pathParams = {
|
|
1219
|
+
"{desktopId}": startDesktopRequest.desktopId
|
|
1220
|
+
};
|
|
1221
|
+
const queryParams = {};
|
|
1222
|
+
let headerParams = {
|
|
1223
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1224
|
+
"opc-request-id": startDesktopRequest.opcRequestId,
|
|
1225
|
+
"if-match": startDesktopRequest.ifMatch,
|
|
1226
|
+
"opc-retry-token": startDesktopRequest.opcRetryToken
|
|
1227
|
+
};
|
|
1228
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1229
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, startDesktopRequest.retryConfiguration, specRetryConfiguration);
|
|
1230
|
+
if (this.logger)
|
|
1231
|
+
retrier.logger = this.logger;
|
|
1232
|
+
const request = yield oci_common_1.composeRequest({
|
|
1233
|
+
baseEndpoint: this._endpoint,
|
|
1234
|
+
defaultHeaders: this._defaultHeaders,
|
|
1235
|
+
path: "/desktops/{desktopId}/actions/start",
|
|
1236
|
+
method: "POST",
|
|
1237
|
+
pathParams: pathParams,
|
|
1238
|
+
headerParams: headerParams,
|
|
1239
|
+
queryParams: queryParams
|
|
1240
|
+
});
|
|
1241
|
+
try {
|
|
1242
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1243
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1244
|
+
responseObject: {},
|
|
1245
|
+
responseHeaders: [
|
|
1246
|
+
{
|
|
1247
|
+
value: response.headers.get("opc-request-id"),
|
|
1248
|
+
key: "opcRequestId",
|
|
1249
|
+
dataType: "string"
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1253
|
+
key: "opcWorkRequestId",
|
|
1254
|
+
dataType: "string"
|
|
1255
|
+
}
|
|
1256
|
+
]
|
|
1257
|
+
});
|
|
1258
|
+
return sdkResponse;
|
|
1259
|
+
}
|
|
1260
|
+
catch (err) {
|
|
1261
|
+
throw err;
|
|
1262
|
+
}
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Starts the desktop pool with the specified OCID. Once the pool is ACTIVE, users will have access to their desktops within the pool.
|
|
1267
|
+
*
|
|
1268
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1269
|
+
* @param StartDesktopPoolRequest
|
|
1270
|
+
* @return StartDesktopPoolResponse
|
|
1271
|
+
* @throws OciError when an error occurs
|
|
1272
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/StartDesktopPool.ts.html |here} to see how to use StartDesktopPool API.
|
|
1273
|
+
*/
|
|
1274
|
+
startDesktopPool(startDesktopPoolRequest) {
|
|
1275
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1276
|
+
if (this.logger)
|
|
1277
|
+
this.logger.debug("Calling operation DesktopServiceClient#startDesktopPool.");
|
|
1278
|
+
const operationName = "startDesktopPool";
|
|
1279
|
+
const apiReferenceLink = "";
|
|
1280
|
+
const pathParams = {
|
|
1281
|
+
"{desktopPoolId}": startDesktopPoolRequest.desktopPoolId
|
|
1282
|
+
};
|
|
1283
|
+
const queryParams = {};
|
|
1284
|
+
let headerParams = {
|
|
1285
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1286
|
+
"opc-request-id": startDesktopPoolRequest.opcRequestId,
|
|
1287
|
+
"if-match": startDesktopPoolRequest.ifMatch,
|
|
1288
|
+
"opc-retry-token": startDesktopPoolRequest.opcRetryToken
|
|
1289
|
+
};
|
|
1290
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1291
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, startDesktopPoolRequest.retryConfiguration, specRetryConfiguration);
|
|
1292
|
+
if (this.logger)
|
|
1293
|
+
retrier.logger = this.logger;
|
|
1294
|
+
const request = yield oci_common_1.composeRequest({
|
|
1295
|
+
baseEndpoint: this._endpoint,
|
|
1296
|
+
defaultHeaders: this._defaultHeaders,
|
|
1297
|
+
path: "/desktopPools/{desktopPoolId}/actions/start",
|
|
1298
|
+
method: "POST",
|
|
1299
|
+
pathParams: pathParams,
|
|
1300
|
+
headerParams: headerParams,
|
|
1301
|
+
queryParams: queryParams
|
|
1302
|
+
});
|
|
1303
|
+
try {
|
|
1304
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1305
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1306
|
+
responseObject: {},
|
|
1307
|
+
responseHeaders: [
|
|
1308
|
+
{
|
|
1309
|
+
value: response.headers.get("opc-request-id"),
|
|
1310
|
+
key: "opcRequestId",
|
|
1311
|
+
dataType: "string"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1315
|
+
key: "opcWorkRequestId",
|
|
1316
|
+
dataType: "string"
|
|
1317
|
+
}
|
|
1318
|
+
]
|
|
1319
|
+
});
|
|
1320
|
+
return sdkResponse;
|
|
1321
|
+
}
|
|
1322
|
+
catch (err) {
|
|
1323
|
+
throw err;
|
|
1324
|
+
}
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
/**
|
|
1328
|
+
* Stops the desktop with the specified OCID. Stopping a desktop causes the end-user to lose access to their desktop instance until the desktop is restarted.
|
|
1329
|
+
*
|
|
1330
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1331
|
+
* @param StopDesktopRequest
|
|
1332
|
+
* @return StopDesktopResponse
|
|
1333
|
+
* @throws OciError when an error occurs
|
|
1334
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/StopDesktop.ts.html |here} to see how to use StopDesktop API.
|
|
1335
|
+
*/
|
|
1336
|
+
stopDesktop(stopDesktopRequest) {
|
|
1337
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1338
|
+
if (this.logger)
|
|
1339
|
+
this.logger.debug("Calling operation DesktopServiceClient#stopDesktop.");
|
|
1340
|
+
const operationName = "stopDesktop";
|
|
1341
|
+
const apiReferenceLink = "";
|
|
1342
|
+
const pathParams = {
|
|
1343
|
+
"{desktopId}": stopDesktopRequest.desktopId
|
|
1344
|
+
};
|
|
1345
|
+
const queryParams = {};
|
|
1346
|
+
let headerParams = {
|
|
1347
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1348
|
+
"opc-request-id": stopDesktopRequest.opcRequestId,
|
|
1349
|
+
"if-match": stopDesktopRequest.ifMatch,
|
|
1350
|
+
"opc-retry-token": stopDesktopRequest.opcRetryToken
|
|
1351
|
+
};
|
|
1352
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1353
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, stopDesktopRequest.retryConfiguration, specRetryConfiguration);
|
|
1354
|
+
if (this.logger)
|
|
1355
|
+
retrier.logger = this.logger;
|
|
1356
|
+
const request = yield oci_common_1.composeRequest({
|
|
1357
|
+
baseEndpoint: this._endpoint,
|
|
1358
|
+
defaultHeaders: this._defaultHeaders,
|
|
1359
|
+
path: "/desktops/{desktopId}/actions/stop",
|
|
1360
|
+
method: "POST",
|
|
1361
|
+
pathParams: pathParams,
|
|
1362
|
+
headerParams: headerParams,
|
|
1363
|
+
queryParams: queryParams
|
|
1364
|
+
});
|
|
1365
|
+
try {
|
|
1366
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1367
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1368
|
+
responseObject: {},
|
|
1369
|
+
responseHeaders: [
|
|
1370
|
+
{
|
|
1371
|
+
value: response.headers.get("opc-request-id"),
|
|
1372
|
+
key: "opcRequestId",
|
|
1373
|
+
dataType: "string"
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1377
|
+
key: "opcWorkRequestId",
|
|
1378
|
+
dataType: "string"
|
|
1379
|
+
}
|
|
1380
|
+
]
|
|
1381
|
+
});
|
|
1382
|
+
return sdkResponse;
|
|
1383
|
+
}
|
|
1384
|
+
catch (err) {
|
|
1385
|
+
throw err;
|
|
1386
|
+
}
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
/**
|
|
1390
|
+
* Stops the desktop pool with the specified OCID. Users will lose access to their desktops until you explicitly start the pool again.
|
|
1391
|
+
*
|
|
1392
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1393
|
+
* @param StopDesktopPoolRequest
|
|
1394
|
+
* @return StopDesktopPoolResponse
|
|
1395
|
+
* @throws OciError when an error occurs
|
|
1396
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/StopDesktopPool.ts.html |here} to see how to use StopDesktopPool API.
|
|
1397
|
+
*/
|
|
1398
|
+
stopDesktopPool(stopDesktopPoolRequest) {
|
|
1399
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1400
|
+
if (this.logger)
|
|
1401
|
+
this.logger.debug("Calling operation DesktopServiceClient#stopDesktopPool.");
|
|
1402
|
+
const operationName = "stopDesktopPool";
|
|
1403
|
+
const apiReferenceLink = "";
|
|
1404
|
+
const pathParams = {
|
|
1405
|
+
"{desktopPoolId}": stopDesktopPoolRequest.desktopPoolId
|
|
1406
|
+
};
|
|
1407
|
+
const queryParams = {};
|
|
1408
|
+
let headerParams = {
|
|
1409
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1410
|
+
"opc-request-id": stopDesktopPoolRequest.opcRequestId,
|
|
1411
|
+
"if-match": stopDesktopPoolRequest.ifMatch,
|
|
1412
|
+
"opc-retry-token": stopDesktopPoolRequest.opcRetryToken
|
|
1413
|
+
};
|
|
1414
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1415
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, stopDesktopPoolRequest.retryConfiguration, specRetryConfiguration);
|
|
1416
|
+
if (this.logger)
|
|
1417
|
+
retrier.logger = this.logger;
|
|
1418
|
+
const request = yield oci_common_1.composeRequest({
|
|
1419
|
+
baseEndpoint: this._endpoint,
|
|
1420
|
+
defaultHeaders: this._defaultHeaders,
|
|
1421
|
+
path: "/desktopPools/{desktopPoolId}/actions/stop",
|
|
1422
|
+
method: "POST",
|
|
1423
|
+
pathParams: pathParams,
|
|
1424
|
+
headerParams: headerParams,
|
|
1425
|
+
queryParams: queryParams
|
|
1426
|
+
});
|
|
1427
|
+
try {
|
|
1428
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1429
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1430
|
+
responseObject: {},
|
|
1431
|
+
responseHeaders: [
|
|
1432
|
+
{
|
|
1433
|
+
value: response.headers.get("opc-request-id"),
|
|
1434
|
+
key: "opcRequestId",
|
|
1435
|
+
dataType: "string"
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1439
|
+
key: "opcWorkRequestId",
|
|
1440
|
+
dataType: "string"
|
|
1441
|
+
}
|
|
1442
|
+
]
|
|
1443
|
+
});
|
|
1444
|
+
return sdkResponse;
|
|
1445
|
+
}
|
|
1446
|
+
catch (err) {
|
|
1447
|
+
throw err;
|
|
1448
|
+
}
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Modifies information about the desktop such as the name.
|
|
1453
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1454
|
+
* @param UpdateDesktopRequest
|
|
1455
|
+
* @return UpdateDesktopResponse
|
|
1456
|
+
* @throws OciError when an error occurs
|
|
1457
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/UpdateDesktop.ts.html |here} to see how to use UpdateDesktop API.
|
|
1458
|
+
*/
|
|
1459
|
+
updateDesktop(updateDesktopRequest) {
|
|
1460
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1461
|
+
if (this.logger)
|
|
1462
|
+
this.logger.debug("Calling operation DesktopServiceClient#updateDesktop.");
|
|
1463
|
+
const operationName = "updateDesktop";
|
|
1464
|
+
const apiReferenceLink = "";
|
|
1465
|
+
const pathParams = {
|
|
1466
|
+
"{desktopId}": updateDesktopRequest.desktopId
|
|
1467
|
+
};
|
|
1468
|
+
const queryParams = {};
|
|
1469
|
+
let headerParams = {
|
|
1470
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1471
|
+
"opc-request-id": updateDesktopRequest.opcRequestId,
|
|
1472
|
+
"if-match": updateDesktopRequest.ifMatch
|
|
1473
|
+
};
|
|
1474
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1475
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateDesktopRequest.retryConfiguration, specRetryConfiguration);
|
|
1476
|
+
if (this.logger)
|
|
1477
|
+
retrier.logger = this.logger;
|
|
1478
|
+
const request = yield oci_common_1.composeRequest({
|
|
1479
|
+
baseEndpoint: this._endpoint,
|
|
1480
|
+
defaultHeaders: this._defaultHeaders,
|
|
1481
|
+
path: "/desktops/{desktopId}",
|
|
1482
|
+
method: "PUT",
|
|
1483
|
+
bodyContent: common.ObjectSerializer.serialize(updateDesktopRequest.updateDesktopDetails, "UpdateDesktopDetails", model.UpdateDesktopDetails.getJsonObj),
|
|
1484
|
+
pathParams: pathParams,
|
|
1485
|
+
headerParams: headerParams,
|
|
1486
|
+
queryParams: queryParams
|
|
1487
|
+
});
|
|
1488
|
+
try {
|
|
1489
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1490
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1491
|
+
responseObject: {},
|
|
1492
|
+
responseHeaders: [
|
|
1493
|
+
{
|
|
1494
|
+
value: response.headers.get("opc-request-id"),
|
|
1495
|
+
key: "opcRequestId",
|
|
1496
|
+
dataType: "string"
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1500
|
+
key: "opcWorkRequestId",
|
|
1501
|
+
dataType: "string"
|
|
1502
|
+
}
|
|
1503
|
+
]
|
|
1504
|
+
});
|
|
1505
|
+
return sdkResponse;
|
|
1506
|
+
}
|
|
1507
|
+
catch (err) {
|
|
1508
|
+
throw err;
|
|
1509
|
+
}
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
/**
|
|
1513
|
+
* Modifies the configuration of the desktop pool such as the availability, contact information, description, name, device policy, pool size, standby size, and start or stop time.
|
|
1514
|
+
*
|
|
1515
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1516
|
+
* @param UpdateDesktopPoolRequest
|
|
1517
|
+
* @return UpdateDesktopPoolResponse
|
|
1518
|
+
* @throws OciError when an error occurs
|
|
1519
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.80.0/desktops/UpdateDesktopPool.ts.html |here} to see how to use UpdateDesktopPool API.
|
|
1520
|
+
*/
|
|
1521
|
+
updateDesktopPool(updateDesktopPoolRequest) {
|
|
1522
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1523
|
+
if (this.logger)
|
|
1524
|
+
this.logger.debug("Calling operation DesktopServiceClient#updateDesktopPool.");
|
|
1525
|
+
const operationName = "updateDesktopPool";
|
|
1526
|
+
const apiReferenceLink = "";
|
|
1527
|
+
const pathParams = {
|
|
1528
|
+
"{desktopPoolId}": updateDesktopPoolRequest.desktopPoolId
|
|
1529
|
+
};
|
|
1530
|
+
const queryParams = {};
|
|
1531
|
+
let headerParams = {
|
|
1532
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1533
|
+
"opc-request-id": updateDesktopPoolRequest.opcRequestId,
|
|
1534
|
+
"if-match": updateDesktopPoolRequest.ifMatch
|
|
1535
|
+
};
|
|
1536
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1537
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateDesktopPoolRequest.retryConfiguration, specRetryConfiguration);
|
|
1538
|
+
if (this.logger)
|
|
1539
|
+
retrier.logger = this.logger;
|
|
1540
|
+
const request = yield oci_common_1.composeRequest({
|
|
1541
|
+
baseEndpoint: this._endpoint,
|
|
1542
|
+
defaultHeaders: this._defaultHeaders,
|
|
1543
|
+
path: "/desktopPools/{desktopPoolId}",
|
|
1544
|
+
method: "PUT",
|
|
1545
|
+
bodyContent: common.ObjectSerializer.serialize(updateDesktopPoolRequest.updateDesktopPoolDetails, "UpdateDesktopPoolDetails", model.UpdateDesktopPoolDetails.getJsonObj),
|
|
1546
|
+
pathParams: pathParams,
|
|
1547
|
+
headerParams: headerParams,
|
|
1548
|
+
queryParams: queryParams
|
|
1549
|
+
});
|
|
1550
|
+
try {
|
|
1551
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1552
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1553
|
+
responseObject: {},
|
|
1554
|
+
responseHeaders: [
|
|
1555
|
+
{
|
|
1556
|
+
value: response.headers.get("opc-request-id"),
|
|
1557
|
+
key: "opcRequestId",
|
|
1558
|
+
dataType: "string"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1562
|
+
key: "opcWorkRequestId",
|
|
1563
|
+
dataType: "string"
|
|
1564
|
+
}
|
|
1565
|
+
]
|
|
1566
|
+
});
|
|
1567
|
+
return sdkResponse;
|
|
1568
|
+
}
|
|
1569
|
+
catch (err) {
|
|
1570
|
+
throw err;
|
|
1571
|
+
}
|
|
1572
|
+
});
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
exports.DesktopServiceClient = DesktopServiceClient;
|
|
1576
|
+
DesktopServiceClient.serviceEndpointTemplate = "https://api.desktops.{region}.oci.{secondLevelDomain}";
|
|
1577
|
+
DesktopServiceClient.endpointServiceName = "";
|
|
1578
|
+
//# sourceMappingURL=client.js.map
|