oci-mngdmac 2.106.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 +25 -0
- package/index.js +48 -0
- package/index.js.map +1 -0
- package/lib/client.d.ts +313 -0
- package/lib/client.js +1307 -0
- package/lib/client.js.map +1 -0
- package/lib/macdevice-waiter.d.ts +29 -0
- package/lib/macdevice-waiter.js +65 -0
- package/lib/macdevice-waiter.js.map +1 -0
- package/lib/macorder-waiter.d.ts +36 -0
- package/lib/macorder-waiter.js +76 -0
- package/lib/macorder-waiter.js.map +1 -0
- package/lib/model/action-type.d.ts +32 -0
- package/lib/model/action-type.js +43 -0
- package/lib/model/action-type.js.map +1 -0
- package/lib/model/cancel-mac-order-details.d.ts +25 -0
- package/lib/model/cancel-mac-order-details.js +29 -0
- package/lib/model/cancel-mac-order-details.js.map +1 -0
- package/lib/model/change-mac-order-compartment-details.d.ts +26 -0
- package/lib/model/change-mac-order-compartment-details.js +29 -0
- package/lib/model/change-mac-order-compartment-details.js.map +1 -0
- package/lib/model/create-mac-order-details.d.ts +55 -0
- package/lib/model/create-mac-order-details.js +29 -0
- package/lib/model/create-mac-order-details.js.map +1 -0
- package/lib/model/create-node-config-details.d.ts +89 -0
- package/lib/model/create-node-config-details.js +29 -0
- package/lib/model/create-node-config-details.js.map +1 -0
- package/lib/model/index.d.ts +70 -0
- package/lib/model/index.js +93 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/mac-device-collection.d.ts +26 -0
- package/lib/model/mac-device-collection.js +61 -0
- package/lib/model/mac-device-collection.js.map +1 -0
- package/lib/model/mac-device-summary.d.ts +65 -0
- package/lib/model/mac-device-summary.js +29 -0
- package/lib/model/mac-device-summary.js.map +1 -0
- package/lib/model/mac-device.d.ts +78 -0
- package/lib/model/mac-device.js +42 -0
- package/lib/model/mac-device.js.map +1 -0
- package/lib/model/mac-order-collection.d.ts +26 -0
- package/lib/model/mac-order-collection.js +61 -0
- package/lib/model/mac-order-collection.js.map +1 -0
- package/lib/model/mac-order-summary.d.ts +92 -0
- package/lib/model/mac-order-summary.js +29 -0
- package/lib/model/mac-order-summary.js.map +1 -0
- package/lib/model/mac-order.d.ts +152 -0
- package/lib/model/mac-order.js +84 -0
- package/lib/model/mac-order.js.map +1 -0
- package/lib/model/node-config.d.ts +89 -0
- package/lib/model/node-config.js +29 -0
- package/lib/model/node-config.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 +32 -0
- package/lib/model/operation-type.js +43 -0
- package/lib/model/operation-type.js.map +1 -0
- package/lib/model/ops-action-create-mac-device-details.d.ts +29 -0
- package/lib/model/ops-action-create-mac-device-details.js +29 -0
- package/lib/model/ops-action-create-mac-device-details.js.map +1 -0
- package/lib/model/ops-action-update-mac-device-details.d.ts +36 -0
- package/lib/model/ops-action-update-mac-device-details.js +37 -0
- package/lib/model/ops-action-update-mac-device-details.js.map +1 -0
- package/lib/model/ops-action-update-mac-order-details.d.ts +37 -0
- package/lib/model/ops-action-update-mac-order-details.js +29 -0
- package/lib/model/ops-action-update-mac-order-details.js.map +1 -0
- package/lib/model/sort-order.d.ts +30 -0
- package/lib/model/sort-order.js +41 -0
- package/lib/model/sort-order.js.map +1 -0
- package/lib/model/update-mac-order-details.d.ts +47 -0
- package/lib/model/update-mac-order-details.js +29 -0
- package/lib/model/update-mac-order-details.js.map +1 -0
- package/lib/model/update-node-config-details.d.ts +85 -0
- package/lib/model/update-node-config-details.js +29 -0
- package/lib/model/update-node-config-details.js.map +1 -0
- package/lib/model/work-request-error-collection.d.ts +26 -0
- package/lib/model/work-request-error-collection.js +61 -0
- package/lib/model/work-request-error-collection.js.map +1 -0
- package/lib/model/work-request-error.d.ts +37 -0
- package/lib/model/work-request-error.js +29 -0
- package/lib/model/work-request-error.js.map +1 -0
- package/lib/model/work-request-log-entry-collection.d.ts +26 -0
- package/lib/model/work-request-log-entry-collection.js +61 -0
- package/lib/model/work-request-log-entry-collection.js.map +1 -0
- package/lib/model/work-request-log-entry.d.ts +31 -0
- package/lib/model/work-request-log-entry.js +29 -0
- package/lib/model/work-request-log-entry.js.map +1 -0
- package/lib/model/work-request-resource-metadata-key.d.ts +27 -0
- package/lib/model/work-request-resource-metadata-key.js +38 -0
- package/lib/model/work-request-resource-metadata-key.js.map +1 -0
- package/lib/model/work-request-resource.d.ts +48 -0
- package/lib/model/work-request-resource.js +29 -0
- package/lib/model/work-request-resource.js.map +1 -0
- package/lib/model/work-request-summary-collection.d.ts +26 -0
- package/lib/model/work-request-summary-collection.js +61 -0
- package/lib/model/work-request-summary-collection.js.map +1 -0
- package/lib/model/work-request-summary.d.ts +73 -0
- package/lib/model/work-request-summary.js +61 -0
- package/lib/model/work-request-summary.js.map +1 -0
- package/lib/model/work-request.d.ts +76 -0
- package/lib/model/work-request.js +61 -0
- package/lib/model/work-request.js.map +1 -0
- package/lib/request/cancel-mac-order-request.d.ts +52 -0
- package/lib/request/cancel-mac-order-request.js +15 -0
- package/lib/request/cancel-mac-order-request.js.map +1 -0
- package/lib/request/cancel-work-request-request.d.ts +38 -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-mac-order-compartment-request.d.ts +43 -0
- package/lib/request/change-mac-order-compartment-request.js +15 -0
- package/lib/request/change-mac-order-compartment-request.js.map +1 -0
- package/lib/request/create-mac-order-request.d.ts +40 -0
- package/lib/request/create-mac-order-request.js +15 -0
- package/lib/request/create-mac-order-request.js.map +1 -0
- package/lib/request/get-mac-device-request.d.ts +34 -0
- package/lib/request/get-mac-device-request.js +15 -0
- package/lib/request/get-mac-device-request.js.map +1 -0
- package/lib/request/get-mac-order-request.d.ts +30 -0
- package/lib/request/get-mac-order-request.js +15 -0
- package/lib/request/get-mac-order-request.js.map +1 -0
- package/lib/request/get-work-request-request.d.ts +30 -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 +40 -0
- package/lib/request/index.js +45 -0
- package/lib/request/index.js.map +1 -0
- package/lib/request/list-mac-devices-request.d.ts +79 -0
- package/lib/request/list-mac-devices-request.js +24 -0
- package/lib/request/list-mac-devices-request.js.map +1 -0
- package/lib/request/list-mac-orders-request.d.ts +75 -0
- package/lib/request/list-mac-orders-request.js +24 -0
- package/lib/request/list-mac-orders-request.js.map +1 -0
- package/lib/request/list-work-request-errors-request.d.ts +59 -0
- package/lib/request/list-work-request-errors-request.js +23 -0
- package/lib/request/list-work-request-errors-request.js.map +1 -0
- package/lib/request/list-work-request-logs-request.d.ts +59 -0
- package/lib/request/list-work-request-logs-request.js +23 -0
- package/lib/request/list-work-request-logs-request.js.map +1 -0
- package/lib/request/list-work-requests-request.d.ts +71 -0
- package/lib/request/list-work-requests-request.js +23 -0
- package/lib/request/list-work-requests-request.js.map +1 -0
- package/lib/request/terminate-mac-device-request.d.ts +51 -0
- package/lib/request/terminate-mac-device-request.js +15 -0
- package/lib/request/terminate-mac-device-request.js.map +1 -0
- package/lib/request/update-mac-order-request.d.ts +43 -0
- package/lib/request/update-mac-order-request.js +15 -0
- package/lib/request/update-mac-order-request.js.map +1 -0
- package/lib/response/cancel-mac-order-response.d.ts +26 -0
- package/lib/response/cancel-mac-order-response.js +15 -0
- package/lib/response/cancel-mac-order-response.js.map +1 -0
- package/lib/response/cancel-work-request-response.d.ts +20 -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-mac-order-compartment-response.d.ts +26 -0
- package/lib/response/change-mac-order-compartment-response.js +15 -0
- package/lib/response/change-mac-order-compartment-response.js.map +1 -0
- package/lib/response/create-mac-order-response.d.ts +44 -0
- package/lib/response/create-mac-order-response.js +15 -0
- package/lib/response/create-mac-order-response.js.map +1 -0
- package/lib/response/get-mac-device-response.d.ts +30 -0
- package/lib/response/get-mac-device-response.js +15 -0
- package/lib/response/get-mac-device-response.js.map +1 -0
- package/lib/response/get-mac-order-response.d.ts +30 -0
- package/lib/response/get-mac-order-response.js +15 -0
- package/lib/response/get-mac-order-response.js.map +1 -0
- package/lib/response/get-work-request-response.d.ts +34 -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 +40 -0
- package/lib/response/index.js +15 -0
- package/lib/response/index.js.map +1 -0
- package/lib/response/list-mac-devices-response.d.ts +31 -0
- package/lib/response/list-mac-devices-response.js +15 -0
- package/lib/response/list-mac-devices-response.js.map +1 -0
- package/lib/response/list-mac-orders-response.d.ts +31 -0
- package/lib/response/list-mac-orders-response.js +15 -0
- package/lib/response/list-mac-orders-response.js.map +1 -0
- package/lib/response/list-work-request-errors-response.d.ts +31 -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 +31 -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 +31 -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/terminate-mac-device-response.d.ts +26 -0
- package/lib/response/terminate-mac-device-response.js +15 -0
- package/lib/response/terminate-mac-device-response.js.map +1 -0
- package/lib/response/update-mac-order-response.d.ts +26 -0
- package/lib/response/update-mac-order-response.js +15 -0
- package/lib/response/update-mac-order-response.js.map +1 -0
- package/package.json +29 -0
package/lib/client.js
ADDED
|
@@ -0,0 +1,1307 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* OCI Managed Services for Mac API
|
|
4
|
+
* Use the OCI Managed Services for Mac API to create and manage orders for dedicated, partially-managed Mac servers hosted in an OCI Data Center. For more information, see the user guide documentation for the [OCI Managed Services for Mac]()
|
|
5
|
+
* OpenAPI spec version: 20250320
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
12
|
+
* 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.
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
34
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
36
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
37
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
38
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
39
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.MacOrderClient = exports.MacOrderApiKeys = exports.MacDeviceClient = exports.MacDeviceApiKeys = void 0;
|
|
44
|
+
const common = require("oci-common");
|
|
45
|
+
const model = __importStar(require("./model"));
|
|
46
|
+
const macdevice_waiter_1 = require("./macdevice-waiter");
|
|
47
|
+
const macorder_waiter_1 = require("./macorder-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 MacDeviceApiKeys;
|
|
54
|
+
(function (MacDeviceApiKeys) {
|
|
55
|
+
})(MacDeviceApiKeys = exports.MacDeviceApiKeys || (exports.MacDeviceApiKeys = {}));
|
|
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 MacDeviceClient {
|
|
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 = "MacDevice";
|
|
68
|
+
this._regionId = "";
|
|
69
|
+
this._lastSetRegionOrRegionId = "";
|
|
70
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
71
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
72
|
+
: null;
|
|
73
|
+
this._authProvider = params.authenticationDetailsProvider;
|
|
74
|
+
if (clientConfiguration) {
|
|
75
|
+
this._clientConfiguration = clientConfiguration;
|
|
76
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
77
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
78
|
+
: null;
|
|
79
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
80
|
+
? clientConfiguration.httpOptions
|
|
81
|
+
: undefined;
|
|
82
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
83
|
+
? clientConfiguration.bodyDuplexMode
|
|
84
|
+
: undefined;
|
|
85
|
+
}
|
|
86
|
+
if (!oci_common_1.developerToolConfiguration.isServiceEnabled("mngdmac")) {
|
|
87
|
+
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 : ";
|
|
88
|
+
throw errmsg.concat("mngdmac");
|
|
89
|
+
}
|
|
90
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
91
|
+
const specCircuitBreakerEnabled = true;
|
|
92
|
+
if (!this._circuitBreaker &&
|
|
93
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
94
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
95
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
96
|
+
}
|
|
97
|
+
this._httpClient =
|
|
98
|
+
params.httpClient ||
|
|
99
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
100
|
+
if (params.authenticationDetailsProvider &&
|
|
101
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
102
|
+
const provider = params.authenticationDetailsProvider;
|
|
103
|
+
if (provider.getRegion()) {
|
|
104
|
+
this.region = provider.getRegion();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
110
|
+
*/
|
|
111
|
+
get endpoint() {
|
|
112
|
+
return this._endpoint;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
116
|
+
* @param endpoint The endpoint of the service.
|
|
117
|
+
*/
|
|
118
|
+
set endpoint(endpoint) {
|
|
119
|
+
this._endpoint = endpoint;
|
|
120
|
+
this._endpoint = this._endpoint + "/20250320";
|
|
121
|
+
if (this.logger)
|
|
122
|
+
this.logger.info(`MacDeviceClient endpoint set to ${this._endpoint}`);
|
|
123
|
+
}
|
|
124
|
+
get logger() {
|
|
125
|
+
return common.LOG.logger;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
129
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
130
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
131
|
+
*/
|
|
132
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
133
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
134
|
+
if (this.logger)
|
|
135
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
136
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
137
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(MacDeviceClient.serviceEndpointTemplate, this._region, MacDeviceClient.endpointServiceName);
|
|
138
|
+
}
|
|
139
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
140
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(MacDeviceClient.serviceEndpointTemplate, this._regionId, MacDeviceClient.endpointServiceName);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
145
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
146
|
+
* @param region The region of the service.
|
|
147
|
+
*/
|
|
148
|
+
set region(region) {
|
|
149
|
+
this._region = region;
|
|
150
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(MacDeviceClient.serviceEndpointTemplate, region, MacDeviceClient.endpointServiceName);
|
|
151
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
155
|
+
*
|
|
156
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
157
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
158
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
159
|
+
* @param regionId The public region ID.
|
|
160
|
+
*/
|
|
161
|
+
set regionId(regionId) {
|
|
162
|
+
this._regionId = regionId;
|
|
163
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(MacDeviceClient.serviceEndpointTemplate, regionId, MacDeviceClient.endpointServiceName);
|
|
164
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Creates a new MacDeviceWaiter for resources for this service.
|
|
168
|
+
*
|
|
169
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
170
|
+
* @return The service waiters.
|
|
171
|
+
*/
|
|
172
|
+
createWaiters(config) {
|
|
173
|
+
this._waiters = new macdevice_waiter_1.MacDeviceWaiter(this, config);
|
|
174
|
+
return this._waiters;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Gets the waiters available for resources for this service.
|
|
178
|
+
*
|
|
179
|
+
* @return The service waiters.
|
|
180
|
+
*/
|
|
181
|
+
getWaiters() {
|
|
182
|
+
if (this._waiters) {
|
|
183
|
+
return this._waiters;
|
|
184
|
+
}
|
|
185
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
189
|
+
*/
|
|
190
|
+
shutdownCircuitBreaker() {
|
|
191
|
+
if (this._circuitBreaker) {
|
|
192
|
+
this._circuitBreaker.shutdown();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Close the provider if possible which in turn shuts down any associated circuit breaker
|
|
197
|
+
*/
|
|
198
|
+
closeProvider() {
|
|
199
|
+
if (this._authProvider) {
|
|
200
|
+
if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
|
|
201
|
+
(this._authProvider).closeProvider();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Close the client once it is no longer needed
|
|
206
|
+
*/
|
|
207
|
+
close() {
|
|
208
|
+
this.shutdownCircuitBreaker();
|
|
209
|
+
this.closeProvider();
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Gets information about a MacDevice.
|
|
213
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
214
|
+
* @param GetMacDeviceRequest
|
|
215
|
+
* @return GetMacDeviceResponse
|
|
216
|
+
* @throws OciError when an error occurs
|
|
217
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/GetMacDevice.ts.html |here} to see how to use GetMacDevice API.
|
|
218
|
+
*/
|
|
219
|
+
getMacDevice(getMacDeviceRequest) {
|
|
220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
if (this.logger)
|
|
222
|
+
this.logger.debug("Calling operation MacDeviceClient#getMacDevice.");
|
|
223
|
+
const operationName = "getMacDevice";
|
|
224
|
+
const apiReferenceLink = "";
|
|
225
|
+
const pathParams = {
|
|
226
|
+
"{macDeviceId}": getMacDeviceRequest.macDeviceId,
|
|
227
|
+
"{macOrderId}": getMacDeviceRequest.macOrderId
|
|
228
|
+
};
|
|
229
|
+
const queryParams = {};
|
|
230
|
+
let headerParams = {
|
|
231
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
232
|
+
"opc-request-id": getMacDeviceRequest.opcRequestId
|
|
233
|
+
};
|
|
234
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
235
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getMacDeviceRequest.retryConfiguration, specRetryConfiguration);
|
|
236
|
+
if (this.logger)
|
|
237
|
+
retrier.logger = this.logger;
|
|
238
|
+
const request = yield oci_common_1.composeRequest({
|
|
239
|
+
baseEndpoint: this._endpoint,
|
|
240
|
+
defaultHeaders: this._defaultHeaders,
|
|
241
|
+
path: "/macOrders/{macOrderId}/macDevices/{macDeviceId}",
|
|
242
|
+
method: "GET",
|
|
243
|
+
pathParams: pathParams,
|
|
244
|
+
headerParams: headerParams,
|
|
245
|
+
queryParams: queryParams
|
|
246
|
+
});
|
|
247
|
+
try {
|
|
248
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
249
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
250
|
+
responseObject: {},
|
|
251
|
+
body: yield response.json(),
|
|
252
|
+
bodyKey: "macDevice",
|
|
253
|
+
bodyModel: model.MacDevice,
|
|
254
|
+
type: "model.MacDevice",
|
|
255
|
+
responseHeaders: [
|
|
256
|
+
{
|
|
257
|
+
value: response.headers.get("etag"),
|
|
258
|
+
key: "etag",
|
|
259
|
+
dataType: "string"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
value: response.headers.get("opc-request-id"),
|
|
263
|
+
key: "opcRequestId",
|
|
264
|
+
dataType: "string"
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
});
|
|
268
|
+
return sdkResponse;
|
|
269
|
+
}
|
|
270
|
+
catch (err) {
|
|
271
|
+
throw err;
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Gets a list of MacDevices assigned to this order.
|
|
277
|
+
*
|
|
278
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
279
|
+
* @param ListMacDevicesRequest
|
|
280
|
+
* @return ListMacDevicesResponse
|
|
281
|
+
* @throws OciError when an error occurs
|
|
282
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/ListMacDevices.ts.html |here} to see how to use ListMacDevices API.
|
|
283
|
+
*/
|
|
284
|
+
listMacDevices(listMacDevicesRequest) {
|
|
285
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
286
|
+
if (this.logger)
|
|
287
|
+
this.logger.debug("Calling operation MacDeviceClient#listMacDevices.");
|
|
288
|
+
const operationName = "listMacDevices";
|
|
289
|
+
const apiReferenceLink = "";
|
|
290
|
+
const pathParams = {
|
|
291
|
+
"{macOrderId}": listMacDevicesRequest.macOrderId
|
|
292
|
+
};
|
|
293
|
+
const queryParams = {
|
|
294
|
+
"compartmentId": listMacDevicesRequest.compartmentId,
|
|
295
|
+
"id": listMacDevicesRequest.id,
|
|
296
|
+
"serialNumber": listMacDevicesRequest.serialNumber,
|
|
297
|
+
"lifecycleState": listMacDevicesRequest.lifecycleState,
|
|
298
|
+
"limit": listMacDevicesRequest.limit,
|
|
299
|
+
"page": listMacDevicesRequest.page,
|
|
300
|
+
"sortOrder": listMacDevicesRequest.sortOrder,
|
|
301
|
+
"sortBy": listMacDevicesRequest.sortBy
|
|
302
|
+
};
|
|
303
|
+
let headerParams = {
|
|
304
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
305
|
+
"opc-request-id": listMacDevicesRequest.opcRequestId
|
|
306
|
+
};
|
|
307
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
308
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listMacDevicesRequest.retryConfiguration, specRetryConfiguration);
|
|
309
|
+
if (this.logger)
|
|
310
|
+
retrier.logger = this.logger;
|
|
311
|
+
const request = yield oci_common_1.composeRequest({
|
|
312
|
+
baseEndpoint: this._endpoint,
|
|
313
|
+
defaultHeaders: this._defaultHeaders,
|
|
314
|
+
path: "/macOrders/{macOrderId}/macDevices",
|
|
315
|
+
method: "GET",
|
|
316
|
+
pathParams: pathParams,
|
|
317
|
+
headerParams: headerParams,
|
|
318
|
+
queryParams: queryParams
|
|
319
|
+
});
|
|
320
|
+
try {
|
|
321
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
322
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
323
|
+
responseObject: {},
|
|
324
|
+
body: yield response.json(),
|
|
325
|
+
bodyKey: "macDeviceCollection",
|
|
326
|
+
bodyModel: model.MacDeviceCollection,
|
|
327
|
+
type: "model.MacDeviceCollection",
|
|
328
|
+
responseHeaders: [
|
|
329
|
+
{
|
|
330
|
+
value: response.headers.get("opc-request-id"),
|
|
331
|
+
key: "opcRequestId",
|
|
332
|
+
dataType: "string"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
value: response.headers.get("opc-next-page"),
|
|
336
|
+
key: "opcNextPage",
|
|
337
|
+
dataType: "string"
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
});
|
|
341
|
+
return sdkResponse;
|
|
342
|
+
}
|
|
343
|
+
catch (err) {
|
|
344
|
+
throw err;
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Terminates a MacDevice.
|
|
350
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
351
|
+
* @param TerminateMacDeviceRequest
|
|
352
|
+
* @return TerminateMacDeviceResponse
|
|
353
|
+
* @throws OciError when an error occurs
|
|
354
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/TerminateMacDevice.ts.html |here} to see how to use TerminateMacDevice API.
|
|
355
|
+
*/
|
|
356
|
+
terminateMacDevice(terminateMacDeviceRequest) {
|
|
357
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
358
|
+
if (this.logger)
|
|
359
|
+
this.logger.debug("Calling operation MacDeviceClient#terminateMacDevice.");
|
|
360
|
+
const operationName = "terminateMacDevice";
|
|
361
|
+
const apiReferenceLink = "";
|
|
362
|
+
const pathParams = {
|
|
363
|
+
"{macDeviceId}": terminateMacDeviceRequest.macDeviceId,
|
|
364
|
+
"{macOrderId}": terminateMacDeviceRequest.macOrderId
|
|
365
|
+
};
|
|
366
|
+
const queryParams = {};
|
|
367
|
+
let headerParams = {
|
|
368
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
369
|
+
"if-match": terminateMacDeviceRequest.ifMatch,
|
|
370
|
+
"opc-request-id": terminateMacDeviceRequest.opcRequestId,
|
|
371
|
+
"opc-retry-token": terminateMacDeviceRequest.opcRetryToken
|
|
372
|
+
};
|
|
373
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
374
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, terminateMacDeviceRequest.retryConfiguration, specRetryConfiguration);
|
|
375
|
+
if (this.logger)
|
|
376
|
+
retrier.logger = this.logger;
|
|
377
|
+
const request = yield oci_common_1.composeRequest({
|
|
378
|
+
baseEndpoint: this._endpoint,
|
|
379
|
+
defaultHeaders: this._defaultHeaders,
|
|
380
|
+
path: "/macOrders/{macOrderId}/macDevices/{macDeviceId}/actions/terminate",
|
|
381
|
+
method: "POST",
|
|
382
|
+
pathParams: pathParams,
|
|
383
|
+
headerParams: headerParams,
|
|
384
|
+
queryParams: queryParams
|
|
385
|
+
});
|
|
386
|
+
try {
|
|
387
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
388
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
389
|
+
responseObject: {},
|
|
390
|
+
responseHeaders: [
|
|
391
|
+
{
|
|
392
|
+
value: response.headers.get("opc-work-request-id"),
|
|
393
|
+
key: "opcWorkRequestId",
|
|
394
|
+
dataType: "string"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
value: response.headers.get("opc-request-id"),
|
|
398
|
+
key: "opcRequestId",
|
|
399
|
+
dataType: "string"
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
});
|
|
403
|
+
return sdkResponse;
|
|
404
|
+
}
|
|
405
|
+
catch (err) {
|
|
406
|
+
throw err;
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
exports.MacDeviceClient = MacDeviceClient;
|
|
412
|
+
MacDeviceClient.serviceEndpointTemplate = "https://mngdmac.{region}.oci.{secondLevelDomain}";
|
|
413
|
+
MacDeviceClient.endpointServiceName = "";
|
|
414
|
+
var MacOrderApiKeys;
|
|
415
|
+
(function (MacOrderApiKeys) {
|
|
416
|
+
})(MacOrderApiKeys = exports.MacOrderApiKeys || (exports.MacOrderApiKeys = {}));
|
|
417
|
+
/**
|
|
418
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
419
|
+
*/
|
|
420
|
+
class MacOrderClient {
|
|
421
|
+
constructor(params, clientConfiguration) {
|
|
422
|
+
this["_realmSpecificEndpointTemplateEnabled"] = undefined;
|
|
423
|
+
this["_endpoint"] = "";
|
|
424
|
+
this["_defaultHeaders"] = {};
|
|
425
|
+
this._circuitBreaker = null;
|
|
426
|
+
this._httpOptions = undefined;
|
|
427
|
+
this._bodyDuplexMode = undefined;
|
|
428
|
+
this.targetService = "MacOrder";
|
|
429
|
+
this._regionId = "";
|
|
430
|
+
this._lastSetRegionOrRegionId = "";
|
|
431
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
432
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
433
|
+
: null;
|
|
434
|
+
this._authProvider = params.authenticationDetailsProvider;
|
|
435
|
+
if (clientConfiguration) {
|
|
436
|
+
this._clientConfiguration = clientConfiguration;
|
|
437
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
438
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
439
|
+
: null;
|
|
440
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
441
|
+
? clientConfiguration.httpOptions
|
|
442
|
+
: undefined;
|
|
443
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
444
|
+
? clientConfiguration.bodyDuplexMode
|
|
445
|
+
: undefined;
|
|
446
|
+
}
|
|
447
|
+
if (!oci_common_1.developerToolConfiguration.isServiceEnabled("mngdmac")) {
|
|
448
|
+
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 : ";
|
|
449
|
+
throw errmsg.concat("mngdmac");
|
|
450
|
+
}
|
|
451
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
452
|
+
const specCircuitBreakerEnabled = true;
|
|
453
|
+
if (!this._circuitBreaker &&
|
|
454
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
455
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
456
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
457
|
+
}
|
|
458
|
+
this._httpClient =
|
|
459
|
+
params.httpClient ||
|
|
460
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
461
|
+
if (params.authenticationDetailsProvider &&
|
|
462
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
463
|
+
const provider = params.authenticationDetailsProvider;
|
|
464
|
+
if (provider.getRegion()) {
|
|
465
|
+
this.region = provider.getRegion();
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
471
|
+
*/
|
|
472
|
+
get endpoint() {
|
|
473
|
+
return this._endpoint;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
477
|
+
* @param endpoint The endpoint of the service.
|
|
478
|
+
*/
|
|
479
|
+
set endpoint(endpoint) {
|
|
480
|
+
this._endpoint = endpoint;
|
|
481
|
+
this._endpoint = this._endpoint + "/20250320";
|
|
482
|
+
if (this.logger)
|
|
483
|
+
this.logger.info(`MacOrderClient endpoint set to ${this._endpoint}`);
|
|
484
|
+
}
|
|
485
|
+
get logger() {
|
|
486
|
+
return common.LOG.logger;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
490
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
491
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
492
|
+
*/
|
|
493
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
494
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
495
|
+
if (this.logger)
|
|
496
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
497
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
498
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(MacOrderClient.serviceEndpointTemplate, this._region, MacOrderClient.endpointServiceName);
|
|
499
|
+
}
|
|
500
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
501
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(MacOrderClient.serviceEndpointTemplate, this._regionId, MacOrderClient.endpointServiceName);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
506
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
507
|
+
* @param region The region of the service.
|
|
508
|
+
*/
|
|
509
|
+
set region(region) {
|
|
510
|
+
this._region = region;
|
|
511
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(MacOrderClient.serviceEndpointTemplate, region, MacOrderClient.endpointServiceName);
|
|
512
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
516
|
+
*
|
|
517
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
518
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
519
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
520
|
+
* @param regionId The public region ID.
|
|
521
|
+
*/
|
|
522
|
+
set regionId(regionId) {
|
|
523
|
+
this._regionId = regionId;
|
|
524
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(MacOrderClient.serviceEndpointTemplate, regionId, MacOrderClient.endpointServiceName);
|
|
525
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Creates a new MacOrderWaiter for resources for this service.
|
|
529
|
+
*
|
|
530
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
531
|
+
* @return The service waiters.
|
|
532
|
+
*/
|
|
533
|
+
createWaiters(config) {
|
|
534
|
+
this._waiters = new macorder_waiter_1.MacOrderWaiter(this, config);
|
|
535
|
+
return this._waiters;
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Gets the waiters available for resources for this service.
|
|
539
|
+
*
|
|
540
|
+
* @return The service waiters.
|
|
541
|
+
*/
|
|
542
|
+
getWaiters() {
|
|
543
|
+
if (this._waiters) {
|
|
544
|
+
return this._waiters;
|
|
545
|
+
}
|
|
546
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
550
|
+
*/
|
|
551
|
+
shutdownCircuitBreaker() {
|
|
552
|
+
if (this._circuitBreaker) {
|
|
553
|
+
this._circuitBreaker.shutdown();
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Close the provider if possible which in turn shuts down any associated circuit breaker
|
|
558
|
+
*/
|
|
559
|
+
closeProvider() {
|
|
560
|
+
if (this._authProvider) {
|
|
561
|
+
if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
|
|
562
|
+
(this._authProvider).closeProvider();
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Close the client once it is no longer needed
|
|
567
|
+
*/
|
|
568
|
+
close() {
|
|
569
|
+
this.shutdownCircuitBreaker();
|
|
570
|
+
this.closeProvider();
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Cancels a MacOrder.
|
|
574
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
575
|
+
* @param CancelMacOrderRequest
|
|
576
|
+
* @return CancelMacOrderResponse
|
|
577
|
+
* @throws OciError when an error occurs
|
|
578
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/CancelMacOrder.ts.html |here} to see how to use CancelMacOrder API.
|
|
579
|
+
*/
|
|
580
|
+
cancelMacOrder(cancelMacOrderRequest) {
|
|
581
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
582
|
+
if (this.logger)
|
|
583
|
+
this.logger.debug("Calling operation MacOrderClient#cancelMacOrder.");
|
|
584
|
+
const operationName = "cancelMacOrder";
|
|
585
|
+
const apiReferenceLink = "";
|
|
586
|
+
const pathParams = {
|
|
587
|
+
"{macOrderId}": cancelMacOrderRequest.macOrderId
|
|
588
|
+
};
|
|
589
|
+
const queryParams = {};
|
|
590
|
+
let headerParams = {
|
|
591
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
592
|
+
"if-match": cancelMacOrderRequest.ifMatch,
|
|
593
|
+
"opc-request-id": cancelMacOrderRequest.opcRequestId,
|
|
594
|
+
"opc-retry-token": cancelMacOrderRequest.opcRetryToken
|
|
595
|
+
};
|
|
596
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
597
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelMacOrderRequest.retryConfiguration, specRetryConfiguration);
|
|
598
|
+
if (this.logger)
|
|
599
|
+
retrier.logger = this.logger;
|
|
600
|
+
const request = yield oci_common_1.composeRequest({
|
|
601
|
+
baseEndpoint: this._endpoint,
|
|
602
|
+
defaultHeaders: this._defaultHeaders,
|
|
603
|
+
path: "/macOrders/{macOrderId}/actions/cancel",
|
|
604
|
+
method: "POST",
|
|
605
|
+
bodyContent: common.ObjectSerializer.serialize(cancelMacOrderRequest.cancelMacOrderDetails, "CancelMacOrderDetails", model.CancelMacOrderDetails.getJsonObj),
|
|
606
|
+
pathParams: pathParams,
|
|
607
|
+
headerParams: headerParams,
|
|
608
|
+
queryParams: queryParams
|
|
609
|
+
});
|
|
610
|
+
try {
|
|
611
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
612
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
613
|
+
responseObject: {},
|
|
614
|
+
responseHeaders: [
|
|
615
|
+
{
|
|
616
|
+
value: response.headers.get("opc-work-request-id"),
|
|
617
|
+
key: "opcWorkRequestId",
|
|
618
|
+
dataType: "string"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
value: response.headers.get("opc-request-id"),
|
|
622
|
+
key: "opcRequestId",
|
|
623
|
+
dataType: "string"
|
|
624
|
+
}
|
|
625
|
+
]
|
|
626
|
+
});
|
|
627
|
+
return sdkResponse;
|
|
628
|
+
}
|
|
629
|
+
catch (err) {
|
|
630
|
+
throw err;
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Cancels a work request.
|
|
636
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
637
|
+
* @param CancelWorkRequestRequest
|
|
638
|
+
* @return CancelWorkRequestResponse
|
|
639
|
+
* @throws OciError when an error occurs
|
|
640
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/CancelWorkRequest.ts.html |here} to see how to use CancelWorkRequest API.
|
|
641
|
+
*/
|
|
642
|
+
cancelWorkRequest(cancelWorkRequestRequest) {
|
|
643
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
644
|
+
if (this.logger)
|
|
645
|
+
this.logger.debug("Calling operation MacOrderClient#cancelWorkRequest.");
|
|
646
|
+
const operationName = "cancelWorkRequest";
|
|
647
|
+
const apiReferenceLink = "";
|
|
648
|
+
const pathParams = {
|
|
649
|
+
"{workRequestId}": cancelWorkRequestRequest.workRequestId
|
|
650
|
+
};
|
|
651
|
+
const queryParams = {};
|
|
652
|
+
let headerParams = {
|
|
653
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
654
|
+
"if-match": cancelWorkRequestRequest.ifMatch,
|
|
655
|
+
"opc-request-id": cancelWorkRequestRequest.opcRequestId
|
|
656
|
+
};
|
|
657
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
658
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
659
|
+
if (this.logger)
|
|
660
|
+
retrier.logger = this.logger;
|
|
661
|
+
const request = yield oci_common_1.composeRequest({
|
|
662
|
+
baseEndpoint: this._endpoint,
|
|
663
|
+
defaultHeaders: this._defaultHeaders,
|
|
664
|
+
path: "/workRequests/{workRequestId}",
|
|
665
|
+
method: "DELETE",
|
|
666
|
+
pathParams: pathParams,
|
|
667
|
+
headerParams: headerParams,
|
|
668
|
+
queryParams: queryParams
|
|
669
|
+
});
|
|
670
|
+
try {
|
|
671
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
672
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
673
|
+
responseObject: {},
|
|
674
|
+
responseHeaders: [
|
|
675
|
+
{
|
|
676
|
+
value: response.headers.get("opc-request-id"),
|
|
677
|
+
key: "opcRequestId",
|
|
678
|
+
dataType: "string"
|
|
679
|
+
}
|
|
680
|
+
]
|
|
681
|
+
});
|
|
682
|
+
return sdkResponse;
|
|
683
|
+
}
|
|
684
|
+
catch (err) {
|
|
685
|
+
throw err;
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Moves a MacOrder into a different compartment within the same tenancy. For information about moving resources between
|
|
691
|
+
* compartments, see [Moving Resources to a Different Compartment](https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
|
|
692
|
+
*
|
|
693
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
694
|
+
* @param ChangeMacOrderCompartmentRequest
|
|
695
|
+
* @return ChangeMacOrderCompartmentResponse
|
|
696
|
+
* @throws OciError when an error occurs
|
|
697
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/ChangeMacOrderCompartment.ts.html |here} to see how to use ChangeMacOrderCompartment API.
|
|
698
|
+
*/
|
|
699
|
+
changeMacOrderCompartment(changeMacOrderCompartmentRequest) {
|
|
700
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
701
|
+
if (this.logger)
|
|
702
|
+
this.logger.debug("Calling operation MacOrderClient#changeMacOrderCompartment.");
|
|
703
|
+
const operationName = "changeMacOrderCompartment";
|
|
704
|
+
const apiReferenceLink = "";
|
|
705
|
+
const pathParams = {
|
|
706
|
+
"{macOrderId}": changeMacOrderCompartmentRequest.macOrderId
|
|
707
|
+
};
|
|
708
|
+
const queryParams = {};
|
|
709
|
+
let headerParams = {
|
|
710
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
711
|
+
"if-match": changeMacOrderCompartmentRequest.ifMatch,
|
|
712
|
+
"opc-request-id": changeMacOrderCompartmentRequest.opcRequestId
|
|
713
|
+
};
|
|
714
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
715
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeMacOrderCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
716
|
+
if (this.logger)
|
|
717
|
+
retrier.logger = this.logger;
|
|
718
|
+
const request = yield oci_common_1.composeRequest({
|
|
719
|
+
baseEndpoint: this._endpoint,
|
|
720
|
+
defaultHeaders: this._defaultHeaders,
|
|
721
|
+
path: "/macOrders/{macOrderId}/actions/changeCompartment",
|
|
722
|
+
method: "POST",
|
|
723
|
+
bodyContent: common.ObjectSerializer.serialize(changeMacOrderCompartmentRequest.changeMacOrderCompartmentDetails, "ChangeMacOrderCompartmentDetails", model.ChangeMacOrderCompartmentDetails.getJsonObj),
|
|
724
|
+
pathParams: pathParams,
|
|
725
|
+
headerParams: headerParams,
|
|
726
|
+
queryParams: queryParams
|
|
727
|
+
});
|
|
728
|
+
try {
|
|
729
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
730
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
731
|
+
responseObject: {},
|
|
732
|
+
responseHeaders: [
|
|
733
|
+
{
|
|
734
|
+
value: response.headers.get("opc-work-request-id"),
|
|
735
|
+
key: "opcWorkRequestId",
|
|
736
|
+
dataType: "string"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
value: response.headers.get("opc-request-id"),
|
|
740
|
+
key: "opcRequestId",
|
|
741
|
+
dataType: "string"
|
|
742
|
+
}
|
|
743
|
+
]
|
|
744
|
+
});
|
|
745
|
+
return sdkResponse;
|
|
746
|
+
}
|
|
747
|
+
catch (err) {
|
|
748
|
+
throw err;
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Creates a MacOrder.
|
|
754
|
+
*
|
|
755
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
756
|
+
* @param CreateMacOrderRequest
|
|
757
|
+
* @return CreateMacOrderResponse
|
|
758
|
+
* @throws OciError when an error occurs
|
|
759
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/CreateMacOrder.ts.html |here} to see how to use CreateMacOrder API.
|
|
760
|
+
*/
|
|
761
|
+
createMacOrder(createMacOrderRequest) {
|
|
762
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
763
|
+
if (this.logger)
|
|
764
|
+
this.logger.debug("Calling operation MacOrderClient#createMacOrder.");
|
|
765
|
+
const operationName = "createMacOrder";
|
|
766
|
+
const apiReferenceLink = "";
|
|
767
|
+
const pathParams = {};
|
|
768
|
+
const queryParams = {};
|
|
769
|
+
let headerParams = {
|
|
770
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
771
|
+
"opc-retry-token": createMacOrderRequest.opcRetryToken,
|
|
772
|
+
"opc-request-id": createMacOrderRequest.opcRequestId
|
|
773
|
+
};
|
|
774
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
775
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createMacOrderRequest.retryConfiguration, specRetryConfiguration);
|
|
776
|
+
if (this.logger)
|
|
777
|
+
retrier.logger = this.logger;
|
|
778
|
+
const request = yield oci_common_1.composeRequest({
|
|
779
|
+
baseEndpoint: this._endpoint,
|
|
780
|
+
defaultHeaders: this._defaultHeaders,
|
|
781
|
+
path: "/macOrders",
|
|
782
|
+
method: "POST",
|
|
783
|
+
bodyContent: common.ObjectSerializer.serialize(createMacOrderRequest.createMacOrderDetails, "CreateMacOrderDetails", model.CreateMacOrderDetails.getJsonObj),
|
|
784
|
+
pathParams: pathParams,
|
|
785
|
+
headerParams: headerParams,
|
|
786
|
+
queryParams: queryParams
|
|
787
|
+
});
|
|
788
|
+
try {
|
|
789
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
790
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
791
|
+
responseObject: {},
|
|
792
|
+
body: yield response.json(),
|
|
793
|
+
bodyKey: "macOrder",
|
|
794
|
+
bodyModel: model.MacOrder,
|
|
795
|
+
type: "model.MacOrder",
|
|
796
|
+
responseHeaders: [
|
|
797
|
+
{
|
|
798
|
+
value: response.headers.get("location"),
|
|
799
|
+
key: "location",
|
|
800
|
+
dataType: "string"
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
value: response.headers.get("content-location"),
|
|
804
|
+
key: "contentLocation",
|
|
805
|
+
dataType: "string"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
value: response.headers.get("etag"),
|
|
809
|
+
key: "etag",
|
|
810
|
+
dataType: "string"
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
value: response.headers.get("opc-work-request-id"),
|
|
814
|
+
key: "opcWorkRequestId",
|
|
815
|
+
dataType: "string"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
value: response.headers.get("opc-request-id"),
|
|
819
|
+
key: "opcRequestId",
|
|
820
|
+
dataType: "string"
|
|
821
|
+
}
|
|
822
|
+
]
|
|
823
|
+
});
|
|
824
|
+
return sdkResponse;
|
|
825
|
+
}
|
|
826
|
+
catch (err) {
|
|
827
|
+
throw err;
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Gets information about a MacOrder.
|
|
833
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
834
|
+
* @param GetMacOrderRequest
|
|
835
|
+
* @return GetMacOrderResponse
|
|
836
|
+
* @throws OciError when an error occurs
|
|
837
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/GetMacOrder.ts.html |here} to see how to use GetMacOrder API.
|
|
838
|
+
*/
|
|
839
|
+
getMacOrder(getMacOrderRequest) {
|
|
840
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
841
|
+
if (this.logger)
|
|
842
|
+
this.logger.debug("Calling operation MacOrderClient#getMacOrder.");
|
|
843
|
+
const operationName = "getMacOrder";
|
|
844
|
+
const apiReferenceLink = "";
|
|
845
|
+
const pathParams = {
|
|
846
|
+
"{macOrderId}": getMacOrderRequest.macOrderId
|
|
847
|
+
};
|
|
848
|
+
const queryParams = {};
|
|
849
|
+
let headerParams = {
|
|
850
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
851
|
+
"opc-request-id": getMacOrderRequest.opcRequestId
|
|
852
|
+
};
|
|
853
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
854
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getMacOrderRequest.retryConfiguration, specRetryConfiguration);
|
|
855
|
+
if (this.logger)
|
|
856
|
+
retrier.logger = this.logger;
|
|
857
|
+
const request = yield oci_common_1.composeRequest({
|
|
858
|
+
baseEndpoint: this._endpoint,
|
|
859
|
+
defaultHeaders: this._defaultHeaders,
|
|
860
|
+
path: "/macOrders/{macOrderId}",
|
|
861
|
+
method: "GET",
|
|
862
|
+
pathParams: pathParams,
|
|
863
|
+
headerParams: headerParams,
|
|
864
|
+
queryParams: queryParams
|
|
865
|
+
});
|
|
866
|
+
try {
|
|
867
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
868
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
869
|
+
responseObject: {},
|
|
870
|
+
body: yield response.json(),
|
|
871
|
+
bodyKey: "macOrder",
|
|
872
|
+
bodyModel: model.MacOrder,
|
|
873
|
+
type: "model.MacOrder",
|
|
874
|
+
responseHeaders: [
|
|
875
|
+
{
|
|
876
|
+
value: response.headers.get("etag"),
|
|
877
|
+
key: "etag",
|
|
878
|
+
dataType: "string"
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
value: response.headers.get("opc-request-id"),
|
|
882
|
+
key: "opcRequestId",
|
|
883
|
+
dataType: "string"
|
|
884
|
+
}
|
|
885
|
+
]
|
|
886
|
+
});
|
|
887
|
+
return sdkResponse;
|
|
888
|
+
}
|
|
889
|
+
catch (err) {
|
|
890
|
+
throw err;
|
|
891
|
+
}
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* Gets the details of a work request.
|
|
896
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
897
|
+
* @param GetWorkRequestRequest
|
|
898
|
+
* @return GetWorkRequestResponse
|
|
899
|
+
* @throws OciError when an error occurs
|
|
900
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
|
|
901
|
+
*/
|
|
902
|
+
getWorkRequest(getWorkRequestRequest) {
|
|
903
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
904
|
+
if (this.logger)
|
|
905
|
+
this.logger.debug("Calling operation MacOrderClient#getWorkRequest.");
|
|
906
|
+
const operationName = "getWorkRequest";
|
|
907
|
+
const apiReferenceLink = "";
|
|
908
|
+
const pathParams = {
|
|
909
|
+
"{workRequestId}": getWorkRequestRequest.workRequestId
|
|
910
|
+
};
|
|
911
|
+
const queryParams = {};
|
|
912
|
+
let headerParams = {
|
|
913
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
914
|
+
"opc-request-id": getWorkRequestRequest.opcRequestId
|
|
915
|
+
};
|
|
916
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
917
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
918
|
+
if (this.logger)
|
|
919
|
+
retrier.logger = this.logger;
|
|
920
|
+
const request = yield oci_common_1.composeRequest({
|
|
921
|
+
baseEndpoint: this._endpoint,
|
|
922
|
+
defaultHeaders: this._defaultHeaders,
|
|
923
|
+
path: "/workRequests/{workRequestId}",
|
|
924
|
+
method: "GET",
|
|
925
|
+
pathParams: pathParams,
|
|
926
|
+
headerParams: headerParams,
|
|
927
|
+
queryParams: queryParams
|
|
928
|
+
});
|
|
929
|
+
try {
|
|
930
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
931
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
932
|
+
responseObject: {},
|
|
933
|
+
body: yield response.json(),
|
|
934
|
+
bodyKey: "workRequest",
|
|
935
|
+
bodyModel: model.WorkRequest,
|
|
936
|
+
type: "model.WorkRequest",
|
|
937
|
+
responseHeaders: [
|
|
938
|
+
{
|
|
939
|
+
value: response.headers.get("etag"),
|
|
940
|
+
key: "etag",
|
|
941
|
+
dataType: "string"
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
value: response.headers.get("opc-request-id"),
|
|
945
|
+
key: "opcRequestId",
|
|
946
|
+
dataType: "string"
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
value: response.headers.get("retry-after"),
|
|
950
|
+
key: "retryAfter",
|
|
951
|
+
dataType: "number"
|
|
952
|
+
}
|
|
953
|
+
]
|
|
954
|
+
});
|
|
955
|
+
return sdkResponse;
|
|
956
|
+
}
|
|
957
|
+
catch (err) {
|
|
958
|
+
throw err;
|
|
959
|
+
}
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* Gets a list of MacOrders.
|
|
964
|
+
*
|
|
965
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
966
|
+
* @param ListMacOrdersRequest
|
|
967
|
+
* @return ListMacOrdersResponse
|
|
968
|
+
* @throws OciError when an error occurs
|
|
969
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/ListMacOrders.ts.html |here} to see how to use ListMacOrders API.
|
|
970
|
+
*/
|
|
971
|
+
listMacOrders(listMacOrdersRequest) {
|
|
972
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
973
|
+
if (this.logger)
|
|
974
|
+
this.logger.debug("Calling operation MacOrderClient#listMacOrders.");
|
|
975
|
+
const operationName = "listMacOrders";
|
|
976
|
+
const apiReferenceLink = "";
|
|
977
|
+
const pathParams = {};
|
|
978
|
+
const queryParams = {
|
|
979
|
+
"compartmentId": listMacOrdersRequest.compartmentId,
|
|
980
|
+
"lifecycleState": listMacOrdersRequest.lifecycleState,
|
|
981
|
+
"displayName": listMacOrdersRequest.displayName,
|
|
982
|
+
"id": listMacOrdersRequest.id,
|
|
983
|
+
"limit": listMacOrdersRequest.limit,
|
|
984
|
+
"page": listMacOrdersRequest.page,
|
|
985
|
+
"sortOrder": listMacOrdersRequest.sortOrder,
|
|
986
|
+
"sortBy": listMacOrdersRequest.sortBy
|
|
987
|
+
};
|
|
988
|
+
let headerParams = {
|
|
989
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
990
|
+
"opc-request-id": listMacOrdersRequest.opcRequestId
|
|
991
|
+
};
|
|
992
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
993
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listMacOrdersRequest.retryConfiguration, specRetryConfiguration);
|
|
994
|
+
if (this.logger)
|
|
995
|
+
retrier.logger = this.logger;
|
|
996
|
+
const request = yield oci_common_1.composeRequest({
|
|
997
|
+
baseEndpoint: this._endpoint,
|
|
998
|
+
defaultHeaders: this._defaultHeaders,
|
|
999
|
+
path: "/macOrders",
|
|
1000
|
+
method: "GET",
|
|
1001
|
+
pathParams: pathParams,
|
|
1002
|
+
headerParams: headerParams,
|
|
1003
|
+
queryParams: queryParams
|
|
1004
|
+
});
|
|
1005
|
+
try {
|
|
1006
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1007
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1008
|
+
responseObject: {},
|
|
1009
|
+
body: yield response.json(),
|
|
1010
|
+
bodyKey: "macOrderCollection",
|
|
1011
|
+
bodyModel: model.MacOrderCollection,
|
|
1012
|
+
type: "model.MacOrderCollection",
|
|
1013
|
+
responseHeaders: [
|
|
1014
|
+
{
|
|
1015
|
+
value: response.headers.get("opc-request-id"),
|
|
1016
|
+
key: "opcRequestId",
|
|
1017
|
+
dataType: "string"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
value: response.headers.get("opc-next-page"),
|
|
1021
|
+
key: "opcNextPage",
|
|
1022
|
+
dataType: "string"
|
|
1023
|
+
}
|
|
1024
|
+
]
|
|
1025
|
+
});
|
|
1026
|
+
return sdkResponse;
|
|
1027
|
+
}
|
|
1028
|
+
catch (err) {
|
|
1029
|
+
throw err;
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Lists the errors for a work request.
|
|
1035
|
+
*
|
|
1036
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1037
|
+
* @param ListWorkRequestErrorsRequest
|
|
1038
|
+
* @return ListWorkRequestErrorsResponse
|
|
1039
|
+
* @throws OciError when an error occurs
|
|
1040
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
|
|
1041
|
+
*/
|
|
1042
|
+
listWorkRequestErrors(listWorkRequestErrorsRequest) {
|
|
1043
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1044
|
+
if (this.logger)
|
|
1045
|
+
this.logger.debug("Calling operation MacOrderClient#listWorkRequestErrors.");
|
|
1046
|
+
const operationName = "listWorkRequestErrors";
|
|
1047
|
+
const apiReferenceLink = "";
|
|
1048
|
+
const pathParams = {
|
|
1049
|
+
"{workRequestId}": listWorkRequestErrorsRequest.workRequestId
|
|
1050
|
+
};
|
|
1051
|
+
const queryParams = {
|
|
1052
|
+
"page": listWorkRequestErrorsRequest.page,
|
|
1053
|
+
"limit": listWorkRequestErrorsRequest.limit,
|
|
1054
|
+
"sortBy": listWorkRequestErrorsRequest.sortBy,
|
|
1055
|
+
"sortOrder": listWorkRequestErrorsRequest.sortOrder
|
|
1056
|
+
};
|
|
1057
|
+
let headerParams = {
|
|
1058
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1059
|
+
"opc-request-id": listWorkRequestErrorsRequest.opcRequestId
|
|
1060
|
+
};
|
|
1061
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1062
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
|
|
1063
|
+
if (this.logger)
|
|
1064
|
+
retrier.logger = this.logger;
|
|
1065
|
+
const request = yield oci_common_1.composeRequest({
|
|
1066
|
+
baseEndpoint: this._endpoint,
|
|
1067
|
+
defaultHeaders: this._defaultHeaders,
|
|
1068
|
+
path: "/workRequests/{workRequestId}/errors",
|
|
1069
|
+
method: "GET",
|
|
1070
|
+
pathParams: pathParams,
|
|
1071
|
+
headerParams: headerParams,
|
|
1072
|
+
queryParams: queryParams
|
|
1073
|
+
});
|
|
1074
|
+
try {
|
|
1075
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1076
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1077
|
+
responseObject: {},
|
|
1078
|
+
body: yield response.json(),
|
|
1079
|
+
bodyKey: "workRequestErrorCollection",
|
|
1080
|
+
bodyModel: model.WorkRequestErrorCollection,
|
|
1081
|
+
type: "model.WorkRequestErrorCollection",
|
|
1082
|
+
responseHeaders: [
|
|
1083
|
+
{
|
|
1084
|
+
value: response.headers.get("opc-next-page"),
|
|
1085
|
+
key: "opcNextPage",
|
|
1086
|
+
dataType: "string"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
value: response.headers.get("opc-request-id"),
|
|
1090
|
+
key: "opcRequestId",
|
|
1091
|
+
dataType: "string"
|
|
1092
|
+
}
|
|
1093
|
+
]
|
|
1094
|
+
});
|
|
1095
|
+
return sdkResponse;
|
|
1096
|
+
}
|
|
1097
|
+
catch (err) {
|
|
1098
|
+
throw err;
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* Lists the logs for a work request.
|
|
1104
|
+
*
|
|
1105
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1106
|
+
* @param ListWorkRequestLogsRequest
|
|
1107
|
+
* @return ListWorkRequestLogsResponse
|
|
1108
|
+
* @throws OciError when an error occurs
|
|
1109
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
|
|
1110
|
+
*/
|
|
1111
|
+
listWorkRequestLogs(listWorkRequestLogsRequest) {
|
|
1112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1113
|
+
if (this.logger)
|
|
1114
|
+
this.logger.debug("Calling operation MacOrderClient#listWorkRequestLogs.");
|
|
1115
|
+
const operationName = "listWorkRequestLogs";
|
|
1116
|
+
const apiReferenceLink = "";
|
|
1117
|
+
const pathParams = {
|
|
1118
|
+
"{workRequestId}": listWorkRequestLogsRequest.workRequestId
|
|
1119
|
+
};
|
|
1120
|
+
const queryParams = {
|
|
1121
|
+
"page": listWorkRequestLogsRequest.page,
|
|
1122
|
+
"limit": listWorkRequestLogsRequest.limit,
|
|
1123
|
+
"sortBy": listWorkRequestLogsRequest.sortBy,
|
|
1124
|
+
"sortOrder": listWorkRequestLogsRequest.sortOrder
|
|
1125
|
+
};
|
|
1126
|
+
let headerParams = {
|
|
1127
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1128
|
+
"opc-request-id": listWorkRequestLogsRequest.opcRequestId
|
|
1129
|
+
};
|
|
1130
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1131
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
|
|
1132
|
+
if (this.logger)
|
|
1133
|
+
retrier.logger = this.logger;
|
|
1134
|
+
const request = yield oci_common_1.composeRequest({
|
|
1135
|
+
baseEndpoint: this._endpoint,
|
|
1136
|
+
defaultHeaders: this._defaultHeaders,
|
|
1137
|
+
path: "/workRequests/{workRequestId}/logs",
|
|
1138
|
+
method: "GET",
|
|
1139
|
+
pathParams: pathParams,
|
|
1140
|
+
headerParams: headerParams,
|
|
1141
|
+
queryParams: queryParams
|
|
1142
|
+
});
|
|
1143
|
+
try {
|
|
1144
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1145
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1146
|
+
responseObject: {},
|
|
1147
|
+
body: yield response.json(),
|
|
1148
|
+
bodyKey: "workRequestLogEntryCollection",
|
|
1149
|
+
bodyModel: model.WorkRequestLogEntryCollection,
|
|
1150
|
+
type: "model.WorkRequestLogEntryCollection",
|
|
1151
|
+
responseHeaders: [
|
|
1152
|
+
{
|
|
1153
|
+
value: response.headers.get("opc-next-page"),
|
|
1154
|
+
key: "opcNextPage",
|
|
1155
|
+
dataType: "string"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
value: response.headers.get("opc-request-id"),
|
|
1159
|
+
key: "opcRequestId",
|
|
1160
|
+
dataType: "string"
|
|
1161
|
+
}
|
|
1162
|
+
]
|
|
1163
|
+
});
|
|
1164
|
+
return sdkResponse;
|
|
1165
|
+
}
|
|
1166
|
+
catch (err) {
|
|
1167
|
+
throw err;
|
|
1168
|
+
}
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Lists the work requests in a compartment.
|
|
1173
|
+
*
|
|
1174
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1175
|
+
* @param ListWorkRequestsRequest
|
|
1176
|
+
* @return ListWorkRequestsResponse
|
|
1177
|
+
* @throws OciError when an error occurs
|
|
1178
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
|
|
1179
|
+
*/
|
|
1180
|
+
listWorkRequests(listWorkRequestsRequest) {
|
|
1181
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1182
|
+
if (this.logger)
|
|
1183
|
+
this.logger.debug("Calling operation MacOrderClient#listWorkRequests.");
|
|
1184
|
+
const operationName = "listWorkRequests";
|
|
1185
|
+
const apiReferenceLink = "";
|
|
1186
|
+
const pathParams = {};
|
|
1187
|
+
const queryParams = {
|
|
1188
|
+
"compartmentId": listWorkRequestsRequest.compartmentId,
|
|
1189
|
+
"workRequestId": listWorkRequestsRequest.workRequestId,
|
|
1190
|
+
"status": listWorkRequestsRequest.status,
|
|
1191
|
+
"resourceId": listWorkRequestsRequest.resourceId,
|
|
1192
|
+
"page": listWorkRequestsRequest.page,
|
|
1193
|
+
"limit": listWorkRequestsRequest.limit,
|
|
1194
|
+
"sortOrder": listWorkRequestsRequest.sortOrder,
|
|
1195
|
+
"sortBy": listWorkRequestsRequest.sortBy
|
|
1196
|
+
};
|
|
1197
|
+
let headerParams = {
|
|
1198
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1199
|
+
"opc-request-id": listWorkRequestsRequest.opcRequestId
|
|
1200
|
+
};
|
|
1201
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1202
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
|
|
1203
|
+
if (this.logger)
|
|
1204
|
+
retrier.logger = this.logger;
|
|
1205
|
+
const request = yield oci_common_1.composeRequest({
|
|
1206
|
+
baseEndpoint: this._endpoint,
|
|
1207
|
+
defaultHeaders: this._defaultHeaders,
|
|
1208
|
+
path: "/workRequests",
|
|
1209
|
+
method: "GET",
|
|
1210
|
+
pathParams: pathParams,
|
|
1211
|
+
headerParams: headerParams,
|
|
1212
|
+
queryParams: queryParams
|
|
1213
|
+
});
|
|
1214
|
+
try {
|
|
1215
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1216
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1217
|
+
responseObject: {},
|
|
1218
|
+
body: yield response.json(),
|
|
1219
|
+
bodyKey: "workRequestSummaryCollection",
|
|
1220
|
+
bodyModel: model.WorkRequestSummaryCollection,
|
|
1221
|
+
type: "model.WorkRequestSummaryCollection",
|
|
1222
|
+
responseHeaders: [
|
|
1223
|
+
{
|
|
1224
|
+
value: response.headers.get("opc-request-id"),
|
|
1225
|
+
key: "opcRequestId",
|
|
1226
|
+
dataType: "string"
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
value: response.headers.get("opc-next-page"),
|
|
1230
|
+
key: "opcNextPage",
|
|
1231
|
+
dataType: "string"
|
|
1232
|
+
}
|
|
1233
|
+
]
|
|
1234
|
+
});
|
|
1235
|
+
return sdkResponse;
|
|
1236
|
+
}
|
|
1237
|
+
catch (err) {
|
|
1238
|
+
throw err;
|
|
1239
|
+
}
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* Updates a MacOrder.
|
|
1244
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1245
|
+
* @param UpdateMacOrderRequest
|
|
1246
|
+
* @return UpdateMacOrderResponse
|
|
1247
|
+
* @throws OciError when an error occurs
|
|
1248
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mngdmac/UpdateMacOrder.ts.html |here} to see how to use UpdateMacOrder API.
|
|
1249
|
+
*/
|
|
1250
|
+
updateMacOrder(updateMacOrderRequest) {
|
|
1251
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1252
|
+
if (this.logger)
|
|
1253
|
+
this.logger.debug("Calling operation MacOrderClient#updateMacOrder.");
|
|
1254
|
+
const operationName = "updateMacOrder";
|
|
1255
|
+
const apiReferenceLink = "";
|
|
1256
|
+
const pathParams = {
|
|
1257
|
+
"{macOrderId}": updateMacOrderRequest.macOrderId
|
|
1258
|
+
};
|
|
1259
|
+
const queryParams = {};
|
|
1260
|
+
let headerParams = {
|
|
1261
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1262
|
+
"if-match": updateMacOrderRequest.ifMatch,
|
|
1263
|
+
"opc-request-id": updateMacOrderRequest.opcRequestId
|
|
1264
|
+
};
|
|
1265
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1266
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateMacOrderRequest.retryConfiguration, specRetryConfiguration);
|
|
1267
|
+
if (this.logger)
|
|
1268
|
+
retrier.logger = this.logger;
|
|
1269
|
+
const request = yield oci_common_1.composeRequest({
|
|
1270
|
+
baseEndpoint: this._endpoint,
|
|
1271
|
+
defaultHeaders: this._defaultHeaders,
|
|
1272
|
+
path: "/macOrders/{macOrderId}",
|
|
1273
|
+
method: "PUT",
|
|
1274
|
+
bodyContent: common.ObjectSerializer.serialize(updateMacOrderRequest.updateMacOrderDetails, "UpdateMacOrderDetails", model.UpdateMacOrderDetails.getJsonObj),
|
|
1275
|
+
pathParams: pathParams,
|
|
1276
|
+
headerParams: headerParams,
|
|
1277
|
+
queryParams: queryParams
|
|
1278
|
+
});
|
|
1279
|
+
try {
|
|
1280
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1281
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1282
|
+
responseObject: {},
|
|
1283
|
+
responseHeaders: [
|
|
1284
|
+
{
|
|
1285
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1286
|
+
key: "opcWorkRequestId",
|
|
1287
|
+
dataType: "string"
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
value: response.headers.get("opc-request-id"),
|
|
1291
|
+
key: "opcRequestId",
|
|
1292
|
+
dataType: "string"
|
|
1293
|
+
}
|
|
1294
|
+
]
|
|
1295
|
+
});
|
|
1296
|
+
return sdkResponse;
|
|
1297
|
+
}
|
|
1298
|
+
catch (err) {
|
|
1299
|
+
throw err;
|
|
1300
|
+
}
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
exports.MacOrderClient = MacOrderClient;
|
|
1305
|
+
MacOrderClient.serviceEndpointTemplate = "https://mngdmac.{region}.oci.{secondLevelDomain}";
|
|
1306
|
+
MacOrderClient.endpointServiceName = "";
|
|
1307
|
+
//# sourceMappingURL=client.js.map
|