oci-zpr 2.95.1
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 +22 -0
- package/index.js +45 -0
- package/index.js.map +1 -0
- package/lib/client.d.ts +240 -0
- package/lib/client.js +1247 -0
- package/lib/client.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/configuration.d.ts +113 -0
- package/lib/model/configuration.js +53 -0
- package/lib/model/configuration.js.map +1 -0
- package/lib/model/create-configuration-details.d.ts +52 -0
- package/lib/model/create-configuration-details.js +29 -0
- package/lib/model/create-configuration-details.js.map +1 -0
- package/lib/model/create-zpr-policy-details.d.ts +60 -0
- package/lib/model/create-zpr-policy-details.js +29 -0
- package/lib/model/create-zpr-policy-details.js.map +1 -0
- package/lib/model/index.d.ts +52 -0
- package/lib/model/index.js +75 -0
- package/lib/model/index.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/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-zpr-policy-details.d.ts +51 -0
- package/lib/model/update-zpr-policy-details.js +29 -0
- package/lib/model/update-zpr-policy-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-status.d.ts +34 -0
- package/lib/model/work-request-status.js +45 -0
- package/lib/model/work-request-status.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/model/zpr-policy-collection.d.ts +26 -0
- package/lib/model/zpr-policy-collection.js +61 -0
- package/lib/model/zpr-policy-collection.js.map +1 -0
- package/lib/model/zpr-policy-summary.d.ts +98 -0
- package/lib/model/zpr-policy-summary.js +29 -0
- package/lib/model/zpr-policy-summary.js.map +1 -0
- package/lib/model/zpr-policy.d.ts +117 -0
- package/lib/model/zpr-policy.js +44 -0
- package/lib/model/zpr-policy.js.map +1 -0
- package/lib/request/create-configuration-request.d.ts +46 -0
- package/lib/request/create-configuration-request.js +15 -0
- package/lib/request/create-configuration-request.js.map +1 -0
- package/lib/request/create-zpr-policy-request.d.ts +46 -0
- package/lib/request/create-zpr-policy-request.js +15 -0
- package/lib/request/create-zpr-policy-request.js.map +1 -0
- package/lib/request/delete-zpr-policy-request.d.ts +44 -0
- package/lib/request/delete-zpr-policy-request.js +15 -0
- package/lib/request/delete-zpr-policy-request.js.map +1 -0
- package/lib/request/get-configuration-request.d.ts +30 -0
- package/lib/request/get-configuration-request.js +15 -0
- package/lib/request/get-configuration-request.js.map +1 -0
- package/lib/request/get-zpr-configuration-work-request-request.d.ts +30 -0
- package/lib/request/get-zpr-configuration-work-request-request.js +15 -0
- package/lib/request/get-zpr-configuration-work-request-request.js.map +1 -0
- package/lib/request/get-zpr-policy-request.d.ts +30 -0
- package/lib/request/get-zpr-policy-request.js +15 -0
- package/lib/request/get-zpr-policy-request.js.map +1 -0
- package/lib/request/get-zpr-policy-work-request-request.d.ts +30 -0
- package/lib/request/get-zpr-policy-work-request-request.js +15 -0
- package/lib/request/get-zpr-policy-work-request-request.js.map +1 -0
- package/lib/request/index.d.ts +42 -0
- package/lib/request/index.js +49 -0
- package/lib/request/index.js.map +1 -0
- package/lib/request/list-zpr-configuration-work-request-errors-request.d.ts +59 -0
- package/lib/request/list-zpr-configuration-work-request-errors-request.js +23 -0
- package/lib/request/list-zpr-configuration-work-request-errors-request.js.map +1 -0
- package/lib/request/list-zpr-configuration-work-request-logs-request.d.ts +59 -0
- package/lib/request/list-zpr-configuration-work-request-logs-request.js +23 -0
- package/lib/request/list-zpr-configuration-work-request-logs-request.js.map +1 -0
- package/lib/request/list-zpr-configuration-work-requests-request.d.ts +71 -0
- package/lib/request/list-zpr-configuration-work-requests-request.js +23 -0
- package/lib/request/list-zpr-configuration-work-requests-request.js.map +1 -0
- package/lib/request/list-zpr-policies-request.d.ts +75 -0
- package/lib/request/list-zpr-policies-request.js +24 -0
- package/lib/request/list-zpr-policies-request.js.map +1 -0
- package/lib/request/list-zpr-policy-work-request-errors-request.d.ts +59 -0
- package/lib/request/list-zpr-policy-work-request-errors-request.js +23 -0
- package/lib/request/list-zpr-policy-work-request-errors-request.js.map +1 -0
- package/lib/request/list-zpr-policy-work-request-logs-request.d.ts +59 -0
- package/lib/request/list-zpr-policy-work-request-logs-request.js +23 -0
- package/lib/request/list-zpr-policy-work-request-logs-request.js.map +1 -0
- package/lib/request/list-zpr-policy-work-requests-request.d.ts +71 -0
- package/lib/request/list-zpr-policy-work-requests-request.js +23 -0
- package/lib/request/list-zpr-policy-work-requests-request.js.map +1 -0
- package/lib/request/update-zpr-policy-request.d.ts +58 -0
- package/lib/request/update-zpr-policy-request.js +15 -0
- package/lib/request/update-zpr-policy-request.js.map +1 -0
- package/lib/response/create-configuration-response.d.ts +25 -0
- package/lib/response/create-configuration-response.js +15 -0
- package/lib/response/create-configuration-response.js.map +1 -0
- package/lib/response/create-zpr-policy-response.d.ts +38 -0
- package/lib/response/create-zpr-policy-response.js +15 -0
- package/lib/response/create-zpr-policy-response.js.map +1 -0
- package/lib/response/delete-zpr-policy-response.d.ts +25 -0
- package/lib/response/delete-zpr-policy-response.js +15 -0
- package/lib/response/delete-zpr-policy-response.js.map +1 -0
- package/lib/response/get-configuration-response.d.ts +30 -0
- package/lib/response/get-configuration-response.js +15 -0
- package/lib/response/get-configuration-response.js.map +1 -0
- package/lib/response/get-zpr-configuration-work-request-response.d.ts +34 -0
- package/lib/response/get-zpr-configuration-work-request-response.js +15 -0
- package/lib/response/get-zpr-configuration-work-request-response.js.map +1 -0
- package/lib/response/get-zpr-policy-response.d.ts +30 -0
- package/lib/response/get-zpr-policy-response.js +15 -0
- package/lib/response/get-zpr-policy-response.js.map +1 -0
- package/lib/response/get-zpr-policy-work-request-response.d.ts +34 -0
- package/lib/response/get-zpr-policy-work-request-response.js +15 -0
- package/lib/response/get-zpr-policy-work-request-response.js.map +1 -0
- package/lib/response/index.d.ts +42 -0
- package/lib/response/index.js +15 -0
- package/lib/response/index.js.map +1 -0
- package/lib/response/list-zpr-configuration-work-request-errors-response.d.ts +31 -0
- package/lib/response/list-zpr-configuration-work-request-errors-response.js +15 -0
- package/lib/response/list-zpr-configuration-work-request-errors-response.js.map +1 -0
- package/lib/response/list-zpr-configuration-work-request-logs-response.d.ts +31 -0
- package/lib/response/list-zpr-configuration-work-request-logs-response.js +15 -0
- package/lib/response/list-zpr-configuration-work-request-logs-response.js.map +1 -0
- package/lib/response/list-zpr-configuration-work-requests-response.d.ts +31 -0
- package/lib/response/list-zpr-configuration-work-requests-response.js +15 -0
- package/lib/response/list-zpr-configuration-work-requests-response.js.map +1 -0
- package/lib/response/list-zpr-policies-response.d.ts +31 -0
- package/lib/response/list-zpr-policies-response.js +15 -0
- package/lib/response/list-zpr-policies-response.js.map +1 -0
- package/lib/response/list-zpr-policy-work-request-errors-response.d.ts +31 -0
- package/lib/response/list-zpr-policy-work-request-errors-response.js +15 -0
- package/lib/response/list-zpr-policy-work-request-errors-response.js.map +1 -0
- package/lib/response/list-zpr-policy-work-request-logs-response.d.ts +31 -0
- package/lib/response/list-zpr-policy-work-request-logs-response.js +15 -0
- package/lib/response/list-zpr-policy-work-request-logs-response.js.map +1 -0
- package/lib/response/list-zpr-policy-work-requests-response.d.ts +31 -0
- package/lib/response/list-zpr-policy-work-requests-response.js +15 -0
- package/lib/response/list-zpr-policy-work-requests-response.js.map +1 -0
- package/lib/response/update-zpr-policy-response.d.ts +25 -0
- package/lib/response/update-zpr-policy-response.js +15 -0
- package/lib/response/update-zpr-policy-response.js.map +1 -0
- package/lib/zpr-waiter.d.ts +37 -0
- package/lib/zpr-waiter.js +77 -0
- package/lib/zpr-waiter.js.map +1 -0
- package/package.json +29 -0
package/lib/client.js
ADDED
|
@@ -0,0 +1,1247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Zero Trust Packet Routing Control Plane API
|
|
4
|
+
* Use the Zero Trust Packet Routing Control Plane API to manage ZPR configuration and policy. See the [Zero Trust Packet Routing](/iaas/Content/zero-trust-packet-routing/home.htm) documentation for more information.
|
|
5
|
+
* OpenAPI spec version: 20240301
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2020, 2024, 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.ZprClient = exports.ZprApiKeys = void 0;
|
|
44
|
+
const common = require("oci-common");
|
|
45
|
+
const model = __importStar(require("./model"));
|
|
46
|
+
const zpr_waiter_1 = require("./zpr-waiter");
|
|
47
|
+
const oci_common_1 = require("oci-common");
|
|
48
|
+
const Breaker = require("opossum");
|
|
49
|
+
// ===============================================
|
|
50
|
+
// This file is autogenerated - Please do not edit
|
|
51
|
+
// ===============================================
|
|
52
|
+
var ZprApiKeys;
|
|
53
|
+
(function (ZprApiKeys) {
|
|
54
|
+
})(ZprApiKeys = exports.ZprApiKeys || (exports.ZprApiKeys = {}));
|
|
55
|
+
/**
|
|
56
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
57
|
+
*/
|
|
58
|
+
class ZprClient {
|
|
59
|
+
constructor(params, clientConfiguration) {
|
|
60
|
+
this["_realmSpecificEndpointTemplateEnabled"] = undefined;
|
|
61
|
+
this["_endpoint"] = "";
|
|
62
|
+
this["_defaultHeaders"] = {};
|
|
63
|
+
this._circuitBreaker = null;
|
|
64
|
+
this._httpOptions = undefined;
|
|
65
|
+
this._bodyDuplexMode = undefined;
|
|
66
|
+
this.targetService = "Zpr";
|
|
67
|
+
this._regionId = "";
|
|
68
|
+
this._lastSetRegionOrRegionId = "";
|
|
69
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
70
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
71
|
+
: null;
|
|
72
|
+
if (clientConfiguration) {
|
|
73
|
+
this._clientConfiguration = clientConfiguration;
|
|
74
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
75
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
76
|
+
: null;
|
|
77
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
78
|
+
? clientConfiguration.httpOptions
|
|
79
|
+
: undefined;
|
|
80
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
81
|
+
? clientConfiguration.bodyDuplexMode
|
|
82
|
+
: undefined;
|
|
83
|
+
}
|
|
84
|
+
if (!oci_common_1.developerToolConfiguration.isServiceEnabled("zpr")) {
|
|
85
|
+
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 : ";
|
|
86
|
+
throw errmsg.concat("zpr");
|
|
87
|
+
}
|
|
88
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
89
|
+
const specCircuitBreakerEnabled = true;
|
|
90
|
+
if (!this._circuitBreaker &&
|
|
91
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
92
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
93
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
94
|
+
}
|
|
95
|
+
this._httpClient =
|
|
96
|
+
params.httpClient ||
|
|
97
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
98
|
+
if (params.authenticationDetailsProvider &&
|
|
99
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
100
|
+
const provider = params.authenticationDetailsProvider;
|
|
101
|
+
if (provider.getRegion()) {
|
|
102
|
+
this.region = provider.getRegion();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
108
|
+
*/
|
|
109
|
+
get endpoint() {
|
|
110
|
+
return this._endpoint;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
114
|
+
* @param endpoint The endpoint of the service.
|
|
115
|
+
*/
|
|
116
|
+
set endpoint(endpoint) {
|
|
117
|
+
this._endpoint = endpoint;
|
|
118
|
+
this._endpoint = this._endpoint + "/20240301";
|
|
119
|
+
if (this.logger)
|
|
120
|
+
this.logger.info(`ZprClient endpoint set to ${this._endpoint}`);
|
|
121
|
+
}
|
|
122
|
+
get logger() {
|
|
123
|
+
return common.LOG.logger;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
127
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
128
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
129
|
+
*/
|
|
130
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
131
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
132
|
+
if (this.logger)
|
|
133
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
134
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
135
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ZprClient.serviceEndpointTemplate, this._region, ZprClient.endpointServiceName);
|
|
136
|
+
}
|
|
137
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
138
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ZprClient.serviceEndpointTemplate, this._regionId, ZprClient.endpointServiceName);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
143
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
144
|
+
* @param region The region of the service.
|
|
145
|
+
*/
|
|
146
|
+
set region(region) {
|
|
147
|
+
this._region = region;
|
|
148
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ZprClient.serviceEndpointTemplate, region, ZprClient.endpointServiceName);
|
|
149
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
153
|
+
*
|
|
154
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
155
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
156
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
157
|
+
* @param regionId The public region ID.
|
|
158
|
+
*/
|
|
159
|
+
set regionId(regionId) {
|
|
160
|
+
this._regionId = regionId;
|
|
161
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ZprClient.serviceEndpointTemplate, regionId, ZprClient.endpointServiceName);
|
|
162
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Creates a new ZprWaiter for resources for this service.
|
|
166
|
+
*
|
|
167
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
168
|
+
* @return The service waiters.
|
|
169
|
+
*/
|
|
170
|
+
createWaiters(config) {
|
|
171
|
+
this._waiters = new zpr_waiter_1.ZprWaiter(this, config);
|
|
172
|
+
return this._waiters;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Gets the waiters available for resources for this service.
|
|
176
|
+
*
|
|
177
|
+
* @return The service waiters.
|
|
178
|
+
*/
|
|
179
|
+
getWaiters() {
|
|
180
|
+
if (this._waiters) {
|
|
181
|
+
return this._waiters;
|
|
182
|
+
}
|
|
183
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
187
|
+
*/
|
|
188
|
+
shutdownCircuitBreaker() {
|
|
189
|
+
if (this._circuitBreaker) {
|
|
190
|
+
this._circuitBreaker.shutdown();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Close the client once it is no longer needed
|
|
195
|
+
*/
|
|
196
|
+
close() {
|
|
197
|
+
this.shutdownCircuitBreaker();
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Initiates the process to onboard ZPR
|
|
201
|
+
* in a root compartment (the root compartment is the tenancy). It creates an object of ZPR configuration as part of onboarding.
|
|
202
|
+
*
|
|
203
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
204
|
+
* @param CreateConfigurationRequest
|
|
205
|
+
* @return CreateConfigurationResponse
|
|
206
|
+
* @throws OciError when an error occurs
|
|
207
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/CreateConfiguration.ts.html |here} to see how to use CreateConfiguration API.
|
|
208
|
+
*/
|
|
209
|
+
createConfiguration(createConfigurationRequest) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
if (this.logger)
|
|
212
|
+
this.logger.debug("Calling operation ZprClient#createConfiguration.");
|
|
213
|
+
const operationName = "createConfiguration";
|
|
214
|
+
const apiReferenceLink = "";
|
|
215
|
+
const pathParams = {};
|
|
216
|
+
const queryParams = {};
|
|
217
|
+
let headerParams = {
|
|
218
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
219
|
+
"opc-request-id": createConfigurationRequest.opcRequestId,
|
|
220
|
+
"opc-retry-token": createConfigurationRequest.opcRetryToken,
|
|
221
|
+
"opc-dry-run": createConfigurationRequest.opcDryRun
|
|
222
|
+
};
|
|
223
|
+
const requiredParams = new Set([]);
|
|
224
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
225
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
226
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createConfigurationRequest.retryConfiguration, specRetryConfiguration);
|
|
227
|
+
if (this.logger)
|
|
228
|
+
retrier.logger = this.logger;
|
|
229
|
+
const request = yield oci_common_1.composeRequest({
|
|
230
|
+
baseEndpoint: endpoint,
|
|
231
|
+
defaultHeaders: this._defaultHeaders,
|
|
232
|
+
path: "/configuration",
|
|
233
|
+
method: "POST",
|
|
234
|
+
bodyContent: common.ObjectSerializer.serialize(createConfigurationRequest.createConfigurationDetails, "CreateConfigurationDetails", model.CreateConfigurationDetails.getJsonObj),
|
|
235
|
+
pathParams: pathParams,
|
|
236
|
+
headerParams: headerParams,
|
|
237
|
+
queryParams: queryParams
|
|
238
|
+
});
|
|
239
|
+
try {
|
|
240
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
241
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
242
|
+
responseObject: {},
|
|
243
|
+
responseHeaders: [
|
|
244
|
+
{
|
|
245
|
+
value: response.headers.get("opc-request-id"),
|
|
246
|
+
key: "opcRequestId",
|
|
247
|
+
dataType: "string"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
value: response.headers.get("opc-work-request-id"),
|
|
251
|
+
key: "opcWorkRequestId",
|
|
252
|
+
dataType: "string"
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
});
|
|
256
|
+
return sdkResponse;
|
|
257
|
+
}
|
|
258
|
+
catch (err) {
|
|
259
|
+
throw err;
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Creates a ZprPolicy.
|
|
265
|
+
*
|
|
266
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
267
|
+
* @param CreateZprPolicyRequest
|
|
268
|
+
* @return CreateZprPolicyResponse
|
|
269
|
+
* @throws OciError when an error occurs
|
|
270
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/CreateZprPolicy.ts.html |here} to see how to use CreateZprPolicy API.
|
|
271
|
+
*/
|
|
272
|
+
createZprPolicy(createZprPolicyRequest) {
|
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
274
|
+
if (this.logger)
|
|
275
|
+
this.logger.debug("Calling operation ZprClient#createZprPolicy.");
|
|
276
|
+
const operationName = "createZprPolicy";
|
|
277
|
+
const apiReferenceLink = "";
|
|
278
|
+
const pathParams = {};
|
|
279
|
+
const queryParams = {};
|
|
280
|
+
let headerParams = {
|
|
281
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
282
|
+
"opc-retry-token": createZprPolicyRequest.opcRetryToken,
|
|
283
|
+
"opc-request-id": createZprPolicyRequest.opcRequestId,
|
|
284
|
+
"opc-dry-run": createZprPolicyRequest.opcDryRun
|
|
285
|
+
};
|
|
286
|
+
const requiredParams = new Set([]);
|
|
287
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
288
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
289
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createZprPolicyRequest.retryConfiguration, specRetryConfiguration);
|
|
290
|
+
if (this.logger)
|
|
291
|
+
retrier.logger = this.logger;
|
|
292
|
+
const request = yield oci_common_1.composeRequest({
|
|
293
|
+
baseEndpoint: endpoint,
|
|
294
|
+
defaultHeaders: this._defaultHeaders,
|
|
295
|
+
path: "/zprPolicies",
|
|
296
|
+
method: "POST",
|
|
297
|
+
bodyContent: common.ObjectSerializer.serialize(createZprPolicyRequest.createZprPolicyDetails, "CreateZprPolicyDetails", model.CreateZprPolicyDetails.getJsonObj),
|
|
298
|
+
pathParams: pathParams,
|
|
299
|
+
headerParams: headerParams,
|
|
300
|
+
queryParams: queryParams
|
|
301
|
+
});
|
|
302
|
+
try {
|
|
303
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
304
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
305
|
+
responseObject: {},
|
|
306
|
+
body: yield response.json(),
|
|
307
|
+
bodyKey: "zprPolicy",
|
|
308
|
+
bodyModel: model.ZprPolicy,
|
|
309
|
+
type: "model.ZprPolicy",
|
|
310
|
+
responseHeaders: [
|
|
311
|
+
{
|
|
312
|
+
value: response.headers.get("location"),
|
|
313
|
+
key: "location",
|
|
314
|
+
dataType: "string"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
value: response.headers.get("content-location"),
|
|
318
|
+
key: "contentLocation",
|
|
319
|
+
dataType: "string"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
value: response.headers.get("opc-request-id"),
|
|
323
|
+
key: "opcRequestId",
|
|
324
|
+
dataType: "string"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
value: response.headers.get("opc-work-request-id"),
|
|
328
|
+
key: "opcWorkRequestId",
|
|
329
|
+
dataType: "string"
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
});
|
|
333
|
+
return sdkResponse;
|
|
334
|
+
}
|
|
335
|
+
catch (err) {
|
|
336
|
+
throw err;
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Deletes a ZprPolicy.
|
|
342
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
343
|
+
* @param DeleteZprPolicyRequest
|
|
344
|
+
* @return DeleteZprPolicyResponse
|
|
345
|
+
* @throws OciError when an error occurs
|
|
346
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/DeleteZprPolicy.ts.html |here} to see how to use DeleteZprPolicy API.
|
|
347
|
+
*/
|
|
348
|
+
deleteZprPolicy(deleteZprPolicyRequest) {
|
|
349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
350
|
+
if (this.logger)
|
|
351
|
+
this.logger.debug("Calling operation ZprClient#deleteZprPolicy.");
|
|
352
|
+
const operationName = "deleteZprPolicy";
|
|
353
|
+
const apiReferenceLink = "";
|
|
354
|
+
const pathParams = {
|
|
355
|
+
"{zprPolicyId}": deleteZprPolicyRequest.zprPolicyId
|
|
356
|
+
};
|
|
357
|
+
const queryParams = {};
|
|
358
|
+
let headerParams = {
|
|
359
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
360
|
+
"if-match": deleteZprPolicyRequest.ifMatch,
|
|
361
|
+
"opc-request-id": deleteZprPolicyRequest.opcRequestId,
|
|
362
|
+
"opc-dry-run": deleteZprPolicyRequest.opcDryRun
|
|
363
|
+
};
|
|
364
|
+
const requiredParams = new Set(["zprPolicyId"]);
|
|
365
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
366
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
367
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteZprPolicyRequest.retryConfiguration, specRetryConfiguration);
|
|
368
|
+
if (this.logger)
|
|
369
|
+
retrier.logger = this.logger;
|
|
370
|
+
const request = yield oci_common_1.composeRequest({
|
|
371
|
+
baseEndpoint: endpoint,
|
|
372
|
+
defaultHeaders: this._defaultHeaders,
|
|
373
|
+
path: "/zprPolicies/{zprPolicyId}",
|
|
374
|
+
method: "DELETE",
|
|
375
|
+
pathParams: pathParams,
|
|
376
|
+
headerParams: headerParams,
|
|
377
|
+
queryParams: queryParams
|
|
378
|
+
});
|
|
379
|
+
try {
|
|
380
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
381
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
382
|
+
responseObject: {},
|
|
383
|
+
responseHeaders: [
|
|
384
|
+
{
|
|
385
|
+
value: response.headers.get("opc-request-id"),
|
|
386
|
+
key: "opcRequestId",
|
|
387
|
+
dataType: "string"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
value: response.headers.get("opc-work-request-id"),
|
|
391
|
+
key: "opcWorkRequestId",
|
|
392
|
+
dataType: "string"
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
});
|
|
396
|
+
return sdkResponse;
|
|
397
|
+
}
|
|
398
|
+
catch (err) {
|
|
399
|
+
throw err;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Retrieves the ZPR configuration details for the root compartment (the root compartment is the tenancy).
|
|
405
|
+
* Returns ZPR configuration for root compartment (the root compartment is the tenancy).
|
|
406
|
+
*
|
|
407
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
408
|
+
* @param GetConfigurationRequest
|
|
409
|
+
* @return GetConfigurationResponse
|
|
410
|
+
* @throws OciError when an error occurs
|
|
411
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/GetConfiguration.ts.html |here} to see how to use GetConfiguration API.
|
|
412
|
+
*/
|
|
413
|
+
getConfiguration(getConfigurationRequest) {
|
|
414
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
415
|
+
if (this.logger)
|
|
416
|
+
this.logger.debug("Calling operation ZprClient#getConfiguration.");
|
|
417
|
+
const operationName = "getConfiguration";
|
|
418
|
+
const apiReferenceLink = "";
|
|
419
|
+
const pathParams = {};
|
|
420
|
+
const queryParams = {
|
|
421
|
+
"compartmentId": getConfigurationRequest.compartmentId
|
|
422
|
+
};
|
|
423
|
+
let headerParams = {
|
|
424
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
425
|
+
"opc-request-id": getConfigurationRequest.opcRequestId
|
|
426
|
+
};
|
|
427
|
+
const requiredParams = new Set([]);
|
|
428
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
429
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
430
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getConfigurationRequest.retryConfiguration, specRetryConfiguration);
|
|
431
|
+
if (this.logger)
|
|
432
|
+
retrier.logger = this.logger;
|
|
433
|
+
const request = yield oci_common_1.composeRequest({
|
|
434
|
+
baseEndpoint: endpoint,
|
|
435
|
+
defaultHeaders: this._defaultHeaders,
|
|
436
|
+
path: "/configuration",
|
|
437
|
+
method: "GET",
|
|
438
|
+
pathParams: pathParams,
|
|
439
|
+
headerParams: headerParams,
|
|
440
|
+
queryParams: queryParams
|
|
441
|
+
});
|
|
442
|
+
try {
|
|
443
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
444
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
445
|
+
responseObject: {},
|
|
446
|
+
body: yield response.json(),
|
|
447
|
+
bodyKey: "configuration",
|
|
448
|
+
bodyModel: model.Configuration,
|
|
449
|
+
type: "model.Configuration",
|
|
450
|
+
responseHeaders: [
|
|
451
|
+
{
|
|
452
|
+
value: response.headers.get("etag"),
|
|
453
|
+
key: "etag",
|
|
454
|
+
dataType: "string"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
value: response.headers.get("opc-request-id"),
|
|
458
|
+
key: "opcRequestId",
|
|
459
|
+
dataType: "string"
|
|
460
|
+
}
|
|
461
|
+
]
|
|
462
|
+
});
|
|
463
|
+
return sdkResponse;
|
|
464
|
+
}
|
|
465
|
+
catch (err) {
|
|
466
|
+
throw err;
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Gets the details of a work request.
|
|
472
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
473
|
+
* @param GetZprConfigurationWorkRequestRequest
|
|
474
|
+
* @return GetZprConfigurationWorkRequestResponse
|
|
475
|
+
* @throws OciError when an error occurs
|
|
476
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/GetZprConfigurationWorkRequest.ts.html |here} to see how to use GetZprConfigurationWorkRequest API.
|
|
477
|
+
*/
|
|
478
|
+
getZprConfigurationWorkRequest(getZprConfigurationWorkRequestRequest) {
|
|
479
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
480
|
+
if (this.logger)
|
|
481
|
+
this.logger.debug("Calling operation ZprClient#getZprConfigurationWorkRequest.");
|
|
482
|
+
const operationName = "getZprConfigurationWorkRequest";
|
|
483
|
+
const apiReferenceLink = "";
|
|
484
|
+
const pathParams = {
|
|
485
|
+
"{workRequestId}": getZprConfigurationWorkRequestRequest.workRequestId
|
|
486
|
+
};
|
|
487
|
+
const queryParams = {};
|
|
488
|
+
let headerParams = {
|
|
489
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
490
|
+
"opc-request-id": getZprConfigurationWorkRequestRequest.opcRequestId
|
|
491
|
+
};
|
|
492
|
+
const requiredParams = new Set(["workRequestId"]);
|
|
493
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
494
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
495
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getZprConfigurationWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
496
|
+
if (this.logger)
|
|
497
|
+
retrier.logger = this.logger;
|
|
498
|
+
const request = yield oci_common_1.composeRequest({
|
|
499
|
+
baseEndpoint: endpoint,
|
|
500
|
+
defaultHeaders: this._defaultHeaders,
|
|
501
|
+
path: "/zprConfigurationWorkRequests/{workRequestId}",
|
|
502
|
+
method: "GET",
|
|
503
|
+
pathParams: pathParams,
|
|
504
|
+
headerParams: headerParams,
|
|
505
|
+
queryParams: queryParams
|
|
506
|
+
});
|
|
507
|
+
try {
|
|
508
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
509
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
510
|
+
responseObject: {},
|
|
511
|
+
body: yield response.json(),
|
|
512
|
+
bodyKey: "workRequest",
|
|
513
|
+
bodyModel: model.WorkRequest,
|
|
514
|
+
type: "model.WorkRequest",
|
|
515
|
+
responseHeaders: [
|
|
516
|
+
{
|
|
517
|
+
value: response.headers.get("etag"),
|
|
518
|
+
key: "etag",
|
|
519
|
+
dataType: "string"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
value: response.headers.get("opc-request-id"),
|
|
523
|
+
key: "opcRequestId",
|
|
524
|
+
dataType: "string"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
value: response.headers.get("retry-after"),
|
|
528
|
+
key: "retryAfter",
|
|
529
|
+
dataType: "number"
|
|
530
|
+
}
|
|
531
|
+
]
|
|
532
|
+
});
|
|
533
|
+
return sdkResponse;
|
|
534
|
+
}
|
|
535
|
+
catch (err) {
|
|
536
|
+
throw err;
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Gets information about a ZprPolicy.
|
|
542
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
543
|
+
* @param GetZprPolicyRequest
|
|
544
|
+
* @return GetZprPolicyResponse
|
|
545
|
+
* @throws OciError when an error occurs
|
|
546
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/GetZprPolicy.ts.html |here} to see how to use GetZprPolicy API.
|
|
547
|
+
*/
|
|
548
|
+
getZprPolicy(getZprPolicyRequest) {
|
|
549
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
550
|
+
if (this.logger)
|
|
551
|
+
this.logger.debug("Calling operation ZprClient#getZprPolicy.");
|
|
552
|
+
const operationName = "getZprPolicy";
|
|
553
|
+
const apiReferenceLink = "";
|
|
554
|
+
const pathParams = {
|
|
555
|
+
"{zprPolicyId}": getZprPolicyRequest.zprPolicyId
|
|
556
|
+
};
|
|
557
|
+
const queryParams = {};
|
|
558
|
+
let headerParams = {
|
|
559
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
560
|
+
"opc-request-id": getZprPolicyRequest.opcRequestId
|
|
561
|
+
};
|
|
562
|
+
const requiredParams = new Set(["zprPolicyId"]);
|
|
563
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
564
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
565
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getZprPolicyRequest.retryConfiguration, specRetryConfiguration);
|
|
566
|
+
if (this.logger)
|
|
567
|
+
retrier.logger = this.logger;
|
|
568
|
+
const request = yield oci_common_1.composeRequest({
|
|
569
|
+
baseEndpoint: endpoint,
|
|
570
|
+
defaultHeaders: this._defaultHeaders,
|
|
571
|
+
path: "/zprPolicies/{zprPolicyId}",
|
|
572
|
+
method: "GET",
|
|
573
|
+
pathParams: pathParams,
|
|
574
|
+
headerParams: headerParams,
|
|
575
|
+
queryParams: queryParams
|
|
576
|
+
});
|
|
577
|
+
try {
|
|
578
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
579
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
580
|
+
responseObject: {},
|
|
581
|
+
body: yield response.json(),
|
|
582
|
+
bodyKey: "zprPolicy",
|
|
583
|
+
bodyModel: model.ZprPolicy,
|
|
584
|
+
type: "model.ZprPolicy",
|
|
585
|
+
responseHeaders: [
|
|
586
|
+
{
|
|
587
|
+
value: response.headers.get("etag"),
|
|
588
|
+
key: "etag",
|
|
589
|
+
dataType: "string"
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
value: response.headers.get("opc-request-id"),
|
|
593
|
+
key: "opcRequestId",
|
|
594
|
+
dataType: "string"
|
|
595
|
+
}
|
|
596
|
+
]
|
|
597
|
+
});
|
|
598
|
+
return sdkResponse;
|
|
599
|
+
}
|
|
600
|
+
catch (err) {
|
|
601
|
+
throw err;
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Gets the details of a work request.
|
|
607
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
608
|
+
* @param GetZprPolicyWorkRequestRequest
|
|
609
|
+
* @return GetZprPolicyWorkRequestResponse
|
|
610
|
+
* @throws OciError when an error occurs
|
|
611
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/GetZprPolicyWorkRequest.ts.html |here} to see how to use GetZprPolicyWorkRequest API.
|
|
612
|
+
*/
|
|
613
|
+
getZprPolicyWorkRequest(getZprPolicyWorkRequestRequest) {
|
|
614
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
615
|
+
if (this.logger)
|
|
616
|
+
this.logger.debug("Calling operation ZprClient#getZprPolicyWorkRequest.");
|
|
617
|
+
const operationName = "getZprPolicyWorkRequest";
|
|
618
|
+
const apiReferenceLink = "";
|
|
619
|
+
const pathParams = {
|
|
620
|
+
"{workRequestId}": getZprPolicyWorkRequestRequest.workRequestId
|
|
621
|
+
};
|
|
622
|
+
const queryParams = {};
|
|
623
|
+
let headerParams = {
|
|
624
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
625
|
+
"opc-request-id": getZprPolicyWorkRequestRequest.opcRequestId
|
|
626
|
+
};
|
|
627
|
+
const requiredParams = new Set(["workRequestId"]);
|
|
628
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
629
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
630
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getZprPolicyWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
631
|
+
if (this.logger)
|
|
632
|
+
retrier.logger = this.logger;
|
|
633
|
+
const request = yield oci_common_1.composeRequest({
|
|
634
|
+
baseEndpoint: endpoint,
|
|
635
|
+
defaultHeaders: this._defaultHeaders,
|
|
636
|
+
path: "/zprPolicyWorkRequests/{workRequestId}",
|
|
637
|
+
method: "GET",
|
|
638
|
+
pathParams: pathParams,
|
|
639
|
+
headerParams: headerParams,
|
|
640
|
+
queryParams: queryParams
|
|
641
|
+
});
|
|
642
|
+
try {
|
|
643
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
644
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
645
|
+
responseObject: {},
|
|
646
|
+
body: yield response.json(),
|
|
647
|
+
bodyKey: "workRequest",
|
|
648
|
+
bodyModel: model.WorkRequest,
|
|
649
|
+
type: "model.WorkRequest",
|
|
650
|
+
responseHeaders: [
|
|
651
|
+
{
|
|
652
|
+
value: response.headers.get("etag"),
|
|
653
|
+
key: "etag",
|
|
654
|
+
dataType: "string"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
value: response.headers.get("opc-request-id"),
|
|
658
|
+
key: "opcRequestId",
|
|
659
|
+
dataType: "string"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
value: response.headers.get("retry-after"),
|
|
663
|
+
key: "retryAfter",
|
|
664
|
+
dataType: "number"
|
|
665
|
+
}
|
|
666
|
+
]
|
|
667
|
+
});
|
|
668
|
+
return sdkResponse;
|
|
669
|
+
}
|
|
670
|
+
catch (err) {
|
|
671
|
+
throw err;
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Lists the errors for a work request.
|
|
677
|
+
*
|
|
678
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
679
|
+
* @param ListZprConfigurationWorkRequestErrorsRequest
|
|
680
|
+
* @return ListZprConfigurationWorkRequestErrorsResponse
|
|
681
|
+
* @throws OciError when an error occurs
|
|
682
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/ListZprConfigurationWorkRequestErrors.ts.html |here} to see how to use ListZprConfigurationWorkRequestErrors API.
|
|
683
|
+
*/
|
|
684
|
+
listZprConfigurationWorkRequestErrors(listZprConfigurationWorkRequestErrorsRequest) {
|
|
685
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
686
|
+
if (this.logger)
|
|
687
|
+
this.logger.debug("Calling operation ZprClient#listZprConfigurationWorkRequestErrors.");
|
|
688
|
+
const operationName = "listZprConfigurationWorkRequestErrors";
|
|
689
|
+
const apiReferenceLink = "";
|
|
690
|
+
const pathParams = {
|
|
691
|
+
"{workRequestId}": listZprConfigurationWorkRequestErrorsRequest.workRequestId
|
|
692
|
+
};
|
|
693
|
+
const queryParams = {
|
|
694
|
+
"page": listZprConfigurationWorkRequestErrorsRequest.page,
|
|
695
|
+
"limit": listZprConfigurationWorkRequestErrorsRequest.limit,
|
|
696
|
+
"sortBy": listZprConfigurationWorkRequestErrorsRequest.sortBy,
|
|
697
|
+
"sortOrder": listZprConfigurationWorkRequestErrorsRequest.sortOrder
|
|
698
|
+
};
|
|
699
|
+
let headerParams = {
|
|
700
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
701
|
+
"opc-request-id": listZprConfigurationWorkRequestErrorsRequest.opcRequestId
|
|
702
|
+
};
|
|
703
|
+
const requiredParams = new Set(["workRequestId"]);
|
|
704
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
705
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
706
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listZprConfigurationWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
|
|
707
|
+
if (this.logger)
|
|
708
|
+
retrier.logger = this.logger;
|
|
709
|
+
const request = yield oci_common_1.composeRequest({
|
|
710
|
+
baseEndpoint: endpoint,
|
|
711
|
+
defaultHeaders: this._defaultHeaders,
|
|
712
|
+
path: "/zprConfigurationWorkRequests/{workRequestId}/errors",
|
|
713
|
+
method: "GET",
|
|
714
|
+
pathParams: pathParams,
|
|
715
|
+
headerParams: headerParams,
|
|
716
|
+
queryParams: queryParams
|
|
717
|
+
});
|
|
718
|
+
try {
|
|
719
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
720
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
721
|
+
responseObject: {},
|
|
722
|
+
body: yield response.json(),
|
|
723
|
+
bodyKey: "workRequestErrorCollection",
|
|
724
|
+
bodyModel: model.WorkRequestErrorCollection,
|
|
725
|
+
type: "model.WorkRequestErrorCollection",
|
|
726
|
+
responseHeaders: [
|
|
727
|
+
{
|
|
728
|
+
value: response.headers.get("opc-next-page"),
|
|
729
|
+
key: "opcNextPage",
|
|
730
|
+
dataType: "string"
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
value: response.headers.get("opc-request-id"),
|
|
734
|
+
key: "opcRequestId",
|
|
735
|
+
dataType: "string"
|
|
736
|
+
}
|
|
737
|
+
]
|
|
738
|
+
});
|
|
739
|
+
return sdkResponse;
|
|
740
|
+
}
|
|
741
|
+
catch (err) {
|
|
742
|
+
throw err;
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Lists the logs for a work request.
|
|
748
|
+
*
|
|
749
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
750
|
+
* @param ListZprConfigurationWorkRequestLogsRequest
|
|
751
|
+
* @return ListZprConfigurationWorkRequestLogsResponse
|
|
752
|
+
* @throws OciError when an error occurs
|
|
753
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/ListZprConfigurationWorkRequestLogs.ts.html |here} to see how to use ListZprConfigurationWorkRequestLogs API.
|
|
754
|
+
*/
|
|
755
|
+
listZprConfigurationWorkRequestLogs(listZprConfigurationWorkRequestLogsRequest) {
|
|
756
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
757
|
+
if (this.logger)
|
|
758
|
+
this.logger.debug("Calling operation ZprClient#listZprConfigurationWorkRequestLogs.");
|
|
759
|
+
const operationName = "listZprConfigurationWorkRequestLogs";
|
|
760
|
+
const apiReferenceLink = "";
|
|
761
|
+
const pathParams = {
|
|
762
|
+
"{workRequestId}": listZprConfigurationWorkRequestLogsRequest.workRequestId
|
|
763
|
+
};
|
|
764
|
+
const queryParams = {
|
|
765
|
+
"page": listZprConfigurationWorkRequestLogsRequest.page,
|
|
766
|
+
"limit": listZprConfigurationWorkRequestLogsRequest.limit,
|
|
767
|
+
"sortBy": listZprConfigurationWorkRequestLogsRequest.sortBy,
|
|
768
|
+
"sortOrder": listZprConfigurationWorkRequestLogsRequest.sortOrder
|
|
769
|
+
};
|
|
770
|
+
let headerParams = {
|
|
771
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
772
|
+
"opc-request-id": listZprConfigurationWorkRequestLogsRequest.opcRequestId
|
|
773
|
+
};
|
|
774
|
+
const requiredParams = new Set(["workRequestId"]);
|
|
775
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
776
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
777
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listZprConfigurationWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
|
|
778
|
+
if (this.logger)
|
|
779
|
+
retrier.logger = this.logger;
|
|
780
|
+
const request = yield oci_common_1.composeRequest({
|
|
781
|
+
baseEndpoint: endpoint,
|
|
782
|
+
defaultHeaders: this._defaultHeaders,
|
|
783
|
+
path: "/zprConfigurationWorkRequests/{workRequestId}/logs",
|
|
784
|
+
method: "GET",
|
|
785
|
+
pathParams: pathParams,
|
|
786
|
+
headerParams: headerParams,
|
|
787
|
+
queryParams: queryParams
|
|
788
|
+
});
|
|
789
|
+
try {
|
|
790
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
791
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
792
|
+
responseObject: {},
|
|
793
|
+
body: yield response.json(),
|
|
794
|
+
bodyKey: "workRequestLogEntryCollection",
|
|
795
|
+
bodyModel: model.WorkRequestLogEntryCollection,
|
|
796
|
+
type: "model.WorkRequestLogEntryCollection",
|
|
797
|
+
responseHeaders: [
|
|
798
|
+
{
|
|
799
|
+
value: response.headers.get("opc-next-page"),
|
|
800
|
+
key: "opcNextPage",
|
|
801
|
+
dataType: "string"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
value: response.headers.get("opc-request-id"),
|
|
805
|
+
key: "opcRequestId",
|
|
806
|
+
dataType: "string"
|
|
807
|
+
}
|
|
808
|
+
]
|
|
809
|
+
});
|
|
810
|
+
return sdkResponse;
|
|
811
|
+
}
|
|
812
|
+
catch (err) {
|
|
813
|
+
throw err;
|
|
814
|
+
}
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Lists the work requests in a compartment.
|
|
819
|
+
*
|
|
820
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
821
|
+
* @param ListZprConfigurationWorkRequestsRequest
|
|
822
|
+
* @return ListZprConfigurationWorkRequestsResponse
|
|
823
|
+
* @throws OciError when an error occurs
|
|
824
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/ListZprConfigurationWorkRequests.ts.html |here} to see how to use ListZprConfigurationWorkRequests API.
|
|
825
|
+
*/
|
|
826
|
+
listZprConfigurationWorkRequests(listZprConfigurationWorkRequestsRequest) {
|
|
827
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
828
|
+
if (this.logger)
|
|
829
|
+
this.logger.debug("Calling operation ZprClient#listZprConfigurationWorkRequests.");
|
|
830
|
+
const operationName = "listZprConfigurationWorkRequests";
|
|
831
|
+
const apiReferenceLink = "";
|
|
832
|
+
const pathParams = {};
|
|
833
|
+
const queryParams = {
|
|
834
|
+
"compartmentId": listZprConfigurationWorkRequestsRequest.compartmentId,
|
|
835
|
+
"workRequestId": listZprConfigurationWorkRequestsRequest.workRequestId,
|
|
836
|
+
"status": listZprConfigurationWorkRequestsRequest.status,
|
|
837
|
+
"resourceId": listZprConfigurationWorkRequestsRequest.resourceId,
|
|
838
|
+
"page": listZprConfigurationWorkRequestsRequest.page,
|
|
839
|
+
"limit": listZprConfigurationWorkRequestsRequest.limit,
|
|
840
|
+
"sortOrder": listZprConfigurationWorkRequestsRequest.sortOrder,
|
|
841
|
+
"sortBy": listZprConfigurationWorkRequestsRequest.sortBy
|
|
842
|
+
};
|
|
843
|
+
let headerParams = {
|
|
844
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
845
|
+
"opc-request-id": listZprConfigurationWorkRequestsRequest.opcRequestId
|
|
846
|
+
};
|
|
847
|
+
const requiredParams = new Set([]);
|
|
848
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
849
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
850
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listZprConfigurationWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
|
|
851
|
+
if (this.logger)
|
|
852
|
+
retrier.logger = this.logger;
|
|
853
|
+
const request = yield oci_common_1.composeRequest({
|
|
854
|
+
baseEndpoint: endpoint,
|
|
855
|
+
defaultHeaders: this._defaultHeaders,
|
|
856
|
+
path: "/zprConfigurationWorkRequests",
|
|
857
|
+
method: "GET",
|
|
858
|
+
pathParams: pathParams,
|
|
859
|
+
headerParams: headerParams,
|
|
860
|
+
queryParams: queryParams
|
|
861
|
+
});
|
|
862
|
+
try {
|
|
863
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
864
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
865
|
+
responseObject: {},
|
|
866
|
+
body: yield response.json(),
|
|
867
|
+
bodyKey: "workRequestSummaryCollection",
|
|
868
|
+
bodyModel: model.WorkRequestSummaryCollection,
|
|
869
|
+
type: "model.WorkRequestSummaryCollection",
|
|
870
|
+
responseHeaders: [
|
|
871
|
+
{
|
|
872
|
+
value: response.headers.get("opc-request-id"),
|
|
873
|
+
key: "opcRequestId",
|
|
874
|
+
dataType: "string"
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
value: response.headers.get("opc-next-page"),
|
|
878
|
+
key: "opcNextPage",
|
|
879
|
+
dataType: "string"
|
|
880
|
+
}
|
|
881
|
+
]
|
|
882
|
+
});
|
|
883
|
+
return sdkResponse;
|
|
884
|
+
}
|
|
885
|
+
catch (err) {
|
|
886
|
+
throw err;
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* Gets a list of ZprPolicies.
|
|
892
|
+
*
|
|
893
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
894
|
+
* @param ListZprPoliciesRequest
|
|
895
|
+
* @return ListZprPoliciesResponse
|
|
896
|
+
* @throws OciError when an error occurs
|
|
897
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/ListZprPolicies.ts.html |here} to see how to use ListZprPolicies API.
|
|
898
|
+
*/
|
|
899
|
+
listZprPolicies(listZprPoliciesRequest) {
|
|
900
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
901
|
+
if (this.logger)
|
|
902
|
+
this.logger.debug("Calling operation ZprClient#listZprPolicies.");
|
|
903
|
+
const operationName = "listZprPolicies";
|
|
904
|
+
const apiReferenceLink = "";
|
|
905
|
+
const pathParams = {};
|
|
906
|
+
const queryParams = {
|
|
907
|
+
"compartmentId": listZprPoliciesRequest.compartmentId,
|
|
908
|
+
"lifecycleState": listZprPoliciesRequest.lifecycleState,
|
|
909
|
+
"name": listZprPoliciesRequest.name,
|
|
910
|
+
"id": listZprPoliciesRequest.id,
|
|
911
|
+
"limit": listZprPoliciesRequest.limit,
|
|
912
|
+
"page": listZprPoliciesRequest.page,
|
|
913
|
+
"sortOrder": listZprPoliciesRequest.sortOrder,
|
|
914
|
+
"sortBy": listZprPoliciesRequest.sortBy
|
|
915
|
+
};
|
|
916
|
+
let headerParams = {
|
|
917
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
918
|
+
"opc-request-id": listZprPoliciesRequest.opcRequestId
|
|
919
|
+
};
|
|
920
|
+
const requiredParams = new Set([]);
|
|
921
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
922
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
923
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listZprPoliciesRequest.retryConfiguration, specRetryConfiguration);
|
|
924
|
+
if (this.logger)
|
|
925
|
+
retrier.logger = this.logger;
|
|
926
|
+
const request = yield oci_common_1.composeRequest({
|
|
927
|
+
baseEndpoint: endpoint,
|
|
928
|
+
defaultHeaders: this._defaultHeaders,
|
|
929
|
+
path: "/zprPolicies",
|
|
930
|
+
method: "GET",
|
|
931
|
+
pathParams: pathParams,
|
|
932
|
+
headerParams: headerParams,
|
|
933
|
+
queryParams: queryParams
|
|
934
|
+
});
|
|
935
|
+
try {
|
|
936
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
937
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
938
|
+
responseObject: {},
|
|
939
|
+
body: yield response.json(),
|
|
940
|
+
bodyKey: "zprPolicyCollection",
|
|
941
|
+
bodyModel: model.ZprPolicyCollection,
|
|
942
|
+
type: "model.ZprPolicyCollection",
|
|
943
|
+
responseHeaders: [
|
|
944
|
+
{
|
|
945
|
+
value: response.headers.get("opc-request-id"),
|
|
946
|
+
key: "opcRequestId",
|
|
947
|
+
dataType: "string"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
value: response.headers.get("opc-next-page"),
|
|
951
|
+
key: "opcNextPage",
|
|
952
|
+
dataType: "string"
|
|
953
|
+
}
|
|
954
|
+
]
|
|
955
|
+
});
|
|
956
|
+
return sdkResponse;
|
|
957
|
+
}
|
|
958
|
+
catch (err) {
|
|
959
|
+
throw err;
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* Lists the errors for a work request.
|
|
965
|
+
*
|
|
966
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
967
|
+
* @param ListZprPolicyWorkRequestErrorsRequest
|
|
968
|
+
* @return ListZprPolicyWorkRequestErrorsResponse
|
|
969
|
+
* @throws OciError when an error occurs
|
|
970
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/ListZprPolicyWorkRequestErrors.ts.html |here} to see how to use ListZprPolicyWorkRequestErrors API.
|
|
971
|
+
*/
|
|
972
|
+
listZprPolicyWorkRequestErrors(listZprPolicyWorkRequestErrorsRequest) {
|
|
973
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
974
|
+
if (this.logger)
|
|
975
|
+
this.logger.debug("Calling operation ZprClient#listZprPolicyWorkRequestErrors.");
|
|
976
|
+
const operationName = "listZprPolicyWorkRequestErrors";
|
|
977
|
+
const apiReferenceLink = "";
|
|
978
|
+
const pathParams = {
|
|
979
|
+
"{workRequestId}": listZprPolicyWorkRequestErrorsRequest.workRequestId
|
|
980
|
+
};
|
|
981
|
+
const queryParams = {
|
|
982
|
+
"page": listZprPolicyWorkRequestErrorsRequest.page,
|
|
983
|
+
"limit": listZprPolicyWorkRequestErrorsRequest.limit,
|
|
984
|
+
"sortBy": listZprPolicyWorkRequestErrorsRequest.sortBy,
|
|
985
|
+
"sortOrder": listZprPolicyWorkRequestErrorsRequest.sortOrder
|
|
986
|
+
};
|
|
987
|
+
let headerParams = {
|
|
988
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
989
|
+
"opc-request-id": listZprPolicyWorkRequestErrorsRequest.opcRequestId
|
|
990
|
+
};
|
|
991
|
+
const requiredParams = new Set(["workRequestId"]);
|
|
992
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
993
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
994
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listZprPolicyWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
|
|
995
|
+
if (this.logger)
|
|
996
|
+
retrier.logger = this.logger;
|
|
997
|
+
const request = yield oci_common_1.composeRequest({
|
|
998
|
+
baseEndpoint: endpoint,
|
|
999
|
+
defaultHeaders: this._defaultHeaders,
|
|
1000
|
+
path: "/zprPolicyWorkRequests/{workRequestId}/errors",
|
|
1001
|
+
method: "GET",
|
|
1002
|
+
pathParams: pathParams,
|
|
1003
|
+
headerParams: headerParams,
|
|
1004
|
+
queryParams: queryParams
|
|
1005
|
+
});
|
|
1006
|
+
try {
|
|
1007
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1008
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1009
|
+
responseObject: {},
|
|
1010
|
+
body: yield response.json(),
|
|
1011
|
+
bodyKey: "workRequestErrorCollection",
|
|
1012
|
+
bodyModel: model.WorkRequestErrorCollection,
|
|
1013
|
+
type: "model.WorkRequestErrorCollection",
|
|
1014
|
+
responseHeaders: [
|
|
1015
|
+
{
|
|
1016
|
+
value: response.headers.get("opc-next-page"),
|
|
1017
|
+
key: "opcNextPage",
|
|
1018
|
+
dataType: "string"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
value: response.headers.get("opc-request-id"),
|
|
1022
|
+
key: "opcRequestId",
|
|
1023
|
+
dataType: "string"
|
|
1024
|
+
}
|
|
1025
|
+
]
|
|
1026
|
+
});
|
|
1027
|
+
return sdkResponse;
|
|
1028
|
+
}
|
|
1029
|
+
catch (err) {
|
|
1030
|
+
throw err;
|
|
1031
|
+
}
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Lists the logs for a work request.
|
|
1036
|
+
*
|
|
1037
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1038
|
+
* @param ListZprPolicyWorkRequestLogsRequest
|
|
1039
|
+
* @return ListZprPolicyWorkRequestLogsResponse
|
|
1040
|
+
* @throws OciError when an error occurs
|
|
1041
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/ListZprPolicyWorkRequestLogs.ts.html |here} to see how to use ListZprPolicyWorkRequestLogs API.
|
|
1042
|
+
*/
|
|
1043
|
+
listZprPolicyWorkRequestLogs(listZprPolicyWorkRequestLogsRequest) {
|
|
1044
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1045
|
+
if (this.logger)
|
|
1046
|
+
this.logger.debug("Calling operation ZprClient#listZprPolicyWorkRequestLogs.");
|
|
1047
|
+
const operationName = "listZprPolicyWorkRequestLogs";
|
|
1048
|
+
const apiReferenceLink = "";
|
|
1049
|
+
const pathParams = {
|
|
1050
|
+
"{workRequestId}": listZprPolicyWorkRequestLogsRequest.workRequestId
|
|
1051
|
+
};
|
|
1052
|
+
const queryParams = {
|
|
1053
|
+
"page": listZprPolicyWorkRequestLogsRequest.page,
|
|
1054
|
+
"limit": listZprPolicyWorkRequestLogsRequest.limit,
|
|
1055
|
+
"sortBy": listZprPolicyWorkRequestLogsRequest.sortBy,
|
|
1056
|
+
"sortOrder": listZprPolicyWorkRequestLogsRequest.sortOrder
|
|
1057
|
+
};
|
|
1058
|
+
let headerParams = {
|
|
1059
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1060
|
+
"opc-request-id": listZprPolicyWorkRequestLogsRequest.opcRequestId
|
|
1061
|
+
};
|
|
1062
|
+
const requiredParams = new Set(["workRequestId"]);
|
|
1063
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
1064
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1065
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listZprPolicyWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
|
|
1066
|
+
if (this.logger)
|
|
1067
|
+
retrier.logger = this.logger;
|
|
1068
|
+
const request = yield oci_common_1.composeRequest({
|
|
1069
|
+
baseEndpoint: endpoint,
|
|
1070
|
+
defaultHeaders: this._defaultHeaders,
|
|
1071
|
+
path: "/zprPolicyWorkRequests/{workRequestId}/logs",
|
|
1072
|
+
method: "GET",
|
|
1073
|
+
pathParams: pathParams,
|
|
1074
|
+
headerParams: headerParams,
|
|
1075
|
+
queryParams: queryParams
|
|
1076
|
+
});
|
|
1077
|
+
try {
|
|
1078
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1079
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1080
|
+
responseObject: {},
|
|
1081
|
+
body: yield response.json(),
|
|
1082
|
+
bodyKey: "workRequestLogEntryCollection",
|
|
1083
|
+
bodyModel: model.WorkRequestLogEntryCollection,
|
|
1084
|
+
type: "model.WorkRequestLogEntryCollection",
|
|
1085
|
+
responseHeaders: [
|
|
1086
|
+
{
|
|
1087
|
+
value: response.headers.get("opc-next-page"),
|
|
1088
|
+
key: "opcNextPage",
|
|
1089
|
+
dataType: "string"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
value: response.headers.get("opc-request-id"),
|
|
1093
|
+
key: "opcRequestId",
|
|
1094
|
+
dataType: "string"
|
|
1095
|
+
}
|
|
1096
|
+
]
|
|
1097
|
+
});
|
|
1098
|
+
return sdkResponse;
|
|
1099
|
+
}
|
|
1100
|
+
catch (err) {
|
|
1101
|
+
throw err;
|
|
1102
|
+
}
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* Lists the work requests in a compartment.
|
|
1107
|
+
*
|
|
1108
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1109
|
+
* @param ListZprPolicyWorkRequestsRequest
|
|
1110
|
+
* @return ListZprPolicyWorkRequestsResponse
|
|
1111
|
+
* @throws OciError when an error occurs
|
|
1112
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/ListZprPolicyWorkRequests.ts.html |here} to see how to use ListZprPolicyWorkRequests API.
|
|
1113
|
+
*/
|
|
1114
|
+
listZprPolicyWorkRequests(listZprPolicyWorkRequestsRequest) {
|
|
1115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1116
|
+
if (this.logger)
|
|
1117
|
+
this.logger.debug("Calling operation ZprClient#listZprPolicyWorkRequests.");
|
|
1118
|
+
const operationName = "listZprPolicyWorkRequests";
|
|
1119
|
+
const apiReferenceLink = "";
|
|
1120
|
+
const pathParams = {};
|
|
1121
|
+
const queryParams = {
|
|
1122
|
+
"compartmentId": listZprPolicyWorkRequestsRequest.compartmentId,
|
|
1123
|
+
"workRequestId": listZprPolicyWorkRequestsRequest.workRequestId,
|
|
1124
|
+
"status": listZprPolicyWorkRequestsRequest.status,
|
|
1125
|
+
"resourceId": listZprPolicyWorkRequestsRequest.resourceId,
|
|
1126
|
+
"page": listZprPolicyWorkRequestsRequest.page,
|
|
1127
|
+
"limit": listZprPolicyWorkRequestsRequest.limit,
|
|
1128
|
+
"sortOrder": listZprPolicyWorkRequestsRequest.sortOrder,
|
|
1129
|
+
"sortBy": listZprPolicyWorkRequestsRequest.sortBy
|
|
1130
|
+
};
|
|
1131
|
+
let headerParams = {
|
|
1132
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1133
|
+
"opc-request-id": listZprPolicyWorkRequestsRequest.opcRequestId
|
|
1134
|
+
};
|
|
1135
|
+
const requiredParams = new Set([]);
|
|
1136
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
1137
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1138
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listZprPolicyWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
|
|
1139
|
+
if (this.logger)
|
|
1140
|
+
retrier.logger = this.logger;
|
|
1141
|
+
const request = yield oci_common_1.composeRequest({
|
|
1142
|
+
baseEndpoint: endpoint,
|
|
1143
|
+
defaultHeaders: this._defaultHeaders,
|
|
1144
|
+
path: "/zprPolicyWorkRequests",
|
|
1145
|
+
method: "GET",
|
|
1146
|
+
pathParams: pathParams,
|
|
1147
|
+
headerParams: headerParams,
|
|
1148
|
+
queryParams: queryParams
|
|
1149
|
+
});
|
|
1150
|
+
try {
|
|
1151
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1152
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1153
|
+
responseObject: {},
|
|
1154
|
+
body: yield response.json(),
|
|
1155
|
+
bodyKey: "workRequestSummaryCollection",
|
|
1156
|
+
bodyModel: model.WorkRequestSummaryCollection,
|
|
1157
|
+
type: "model.WorkRequestSummaryCollection",
|
|
1158
|
+
responseHeaders: [
|
|
1159
|
+
{
|
|
1160
|
+
value: response.headers.get("opc-request-id"),
|
|
1161
|
+
key: "opcRequestId",
|
|
1162
|
+
dataType: "string"
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
value: response.headers.get("opc-next-page"),
|
|
1166
|
+
key: "opcNextPage",
|
|
1167
|
+
dataType: "string"
|
|
1168
|
+
}
|
|
1169
|
+
]
|
|
1170
|
+
});
|
|
1171
|
+
return sdkResponse;
|
|
1172
|
+
}
|
|
1173
|
+
catch (err) {
|
|
1174
|
+
throw err;
|
|
1175
|
+
}
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* Updates a specific ZprPolicy. If updating on statements, the entire list of policy statements is required, which will replace the existing policy statements associated with the policy ID.
|
|
1180
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1181
|
+
* @param UpdateZprPolicyRequest
|
|
1182
|
+
* @return UpdateZprPolicyResponse
|
|
1183
|
+
* @throws OciError when an error occurs
|
|
1184
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/zpr/UpdateZprPolicy.ts.html |here} to see how to use UpdateZprPolicy API.
|
|
1185
|
+
*/
|
|
1186
|
+
updateZprPolicy(updateZprPolicyRequest) {
|
|
1187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1188
|
+
if (this.logger)
|
|
1189
|
+
this.logger.debug("Calling operation ZprClient#updateZprPolicy.");
|
|
1190
|
+
const operationName = "updateZprPolicy";
|
|
1191
|
+
const apiReferenceLink = "";
|
|
1192
|
+
const pathParams = {
|
|
1193
|
+
"{zprPolicyId}": updateZprPolicyRequest.zprPolicyId
|
|
1194
|
+
};
|
|
1195
|
+
const queryParams = {};
|
|
1196
|
+
let headerParams = {
|
|
1197
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1198
|
+
"opc-retry-token": updateZprPolicyRequest.opcRetryToken,
|
|
1199
|
+
"if-match": updateZprPolicyRequest.ifMatch,
|
|
1200
|
+
"opc-request-id": updateZprPolicyRequest.opcRequestId,
|
|
1201
|
+
"opc-dry-run": updateZprPolicyRequest.opcDryRun
|
|
1202
|
+
};
|
|
1203
|
+
const requiredParams = new Set(["zprPolicyId"]);
|
|
1204
|
+
let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
|
|
1205
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1206
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateZprPolicyRequest.retryConfiguration, specRetryConfiguration);
|
|
1207
|
+
if (this.logger)
|
|
1208
|
+
retrier.logger = this.logger;
|
|
1209
|
+
const request = yield oci_common_1.composeRequest({
|
|
1210
|
+
baseEndpoint: endpoint,
|
|
1211
|
+
defaultHeaders: this._defaultHeaders,
|
|
1212
|
+
path: "/zprPolicies/{zprPolicyId}",
|
|
1213
|
+
method: "PUT",
|
|
1214
|
+
bodyContent: common.ObjectSerializer.serialize(updateZprPolicyRequest.updateZprPolicyDetails, "UpdateZprPolicyDetails", model.UpdateZprPolicyDetails.getJsonObj),
|
|
1215
|
+
pathParams: pathParams,
|
|
1216
|
+
headerParams: headerParams,
|
|
1217
|
+
queryParams: queryParams
|
|
1218
|
+
});
|
|
1219
|
+
try {
|
|
1220
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1221
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1222
|
+
responseObject: {},
|
|
1223
|
+
responseHeaders: [
|
|
1224
|
+
{
|
|
1225
|
+
value: response.headers.get("opc-request-id"),
|
|
1226
|
+
key: "opcRequestId",
|
|
1227
|
+
dataType: "string"
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1231
|
+
key: "opcWorkRequestId",
|
|
1232
|
+
dataType: "string"
|
|
1233
|
+
}
|
|
1234
|
+
]
|
|
1235
|
+
});
|
|
1236
|
+
return sdkResponse;
|
|
1237
|
+
}
|
|
1238
|
+
catch (err) {
|
|
1239
|
+
throw err;
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
exports.ZprClient = ZprClient;
|
|
1245
|
+
ZprClient.serviceEndpointTemplate = "https://{service}.{region}.oci.{secondLevelDomain}";
|
|
1246
|
+
ZprClient.endpointServiceName = "${endpoint-template-prefix}";
|
|
1247
|
+
//# sourceMappingURL=client.js.map
|