oci-accessgovernancecp 2.60.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.
Files changed (110) hide show
  1. package/LICENSE.txt +89 -0
  2. package/NOTICE.txt +1 -0
  3. package/README.md +22 -0
  4. package/THIRD_PARTY_LICENSES.txt +576 -0
  5. package/index.d.ts +22 -0
  6. package/index.js +45 -0
  7. package/index.js.map +1 -0
  8. package/lib/accessgovernancecp-waiter.d.ts +29 -0
  9. package/lib/accessgovernancecp-waiter.js +65 -0
  10. package/lib/accessgovernancecp-waiter.js.map +1 -0
  11. package/lib/client.d.ts +157 -0
  12. package/lib/client.js +705 -0
  13. package/lib/client.js.map +1 -0
  14. package/lib/model/change-governance-instance-compartment-details.d.ts +25 -0
  15. package/lib/model/change-governance-instance-compartment-details.js +29 -0
  16. package/lib/model/change-governance-instance-compartment-details.js.map +1 -0
  17. package/lib/model/create-governance-instance-details.d.ts +75 -0
  18. package/lib/model/create-governance-instance-details.js +29 -0
  19. package/lib/model/create-governance-instance-details.js.map +1 -0
  20. package/lib/model/governance-instance-collection.d.ts +26 -0
  21. package/lib/model/governance-instance-collection.js +61 -0
  22. package/lib/model/governance-instance-collection.js.map +1 -0
  23. package/lib/model/governance-instance-configuration.d.ts +23 -0
  24. package/lib/model/governance-instance-configuration.js +55 -0
  25. package/lib/model/governance-instance-configuration.js.map +1 -0
  26. package/lib/model/governance-instance-summary.d.ts +86 -0
  27. package/lib/model/governance-instance-summary.js +29 -0
  28. package/lib/model/governance-instance-summary.js.map +1 -0
  29. package/lib/model/governance-instance.d.ts +90 -0
  30. package/lib/model/governance-instance.js +29 -0
  31. package/lib/model/governance-instance.js.map +1 -0
  32. package/lib/model/index.d.ts +38 -0
  33. package/lib/model/index.js +61 -0
  34. package/lib/model/index.js.map +1 -0
  35. package/lib/model/instance-lifecycle-state.d.ts +31 -0
  36. package/lib/model/instance-lifecycle-state.js +42 -0
  37. package/lib/model/instance-lifecycle-state.js.map +1 -0
  38. package/lib/model/license-type.d.ts +31 -0
  39. package/lib/model/license-type.js +42 -0
  40. package/lib/model/license-type.js.map +1 -0
  41. package/lib/model/sender-config.d.ts +41 -0
  42. package/lib/model/sender-config.js +29 -0
  43. package/lib/model/sender-config.js.map +1 -0
  44. package/lib/model/sort-order.d.ts +23 -0
  45. package/lib/model/sort-order.js +34 -0
  46. package/lib/model/sort-order.js.map +1 -0
  47. package/lib/model/update-governance-instance-configuration-details.d.ts +23 -0
  48. package/lib/model/update-governance-instance-configuration-details.js +57 -0
  49. package/lib/model/update-governance-instance-configuration-details.js.map +1 -0
  50. package/lib/model/update-governance-instance-details.d.ts +52 -0
  51. package/lib/model/update-governance-instance-details.js +29 -0
  52. package/lib/model/update-governance-instance-details.js.map +1 -0
  53. package/lib/model/update-sender-config.d.ts +37 -0
  54. package/lib/model/update-sender-config.js +29 -0
  55. package/lib/model/update-sender-config.js.map +1 -0
  56. package/lib/request/change-governance-instance-compartment-request.d.ts +49 -0
  57. package/lib/request/change-governance-instance-compartment-request.js +15 -0
  58. package/lib/request/change-governance-instance-compartment-request.js.map +1 -0
  59. package/lib/request/create-governance-instance-request.d.ts +36 -0
  60. package/lib/request/create-governance-instance-request.js +15 -0
  61. package/lib/request/create-governance-instance-request.js.map +1 -0
  62. package/lib/request/delete-governance-instance-request.d.ts +44 -0
  63. package/lib/request/delete-governance-instance-request.js +15 -0
  64. package/lib/request/delete-governance-instance-request.js.map +1 -0
  65. package/lib/request/get-governance-instance-configuration-request.d.ts +26 -0
  66. package/lib/request/get-governance-instance-configuration-request.js +15 -0
  67. package/lib/request/get-governance-instance-configuration-request.js.map +1 -0
  68. package/lib/request/get-governance-instance-request.d.ts +26 -0
  69. package/lib/request/get-governance-instance-request.js +15 -0
  70. package/lib/request/get-governance-instance-request.js.map +1 -0
  71. package/lib/request/index.d.ts +28 -0
  72. package/lib/request/index.js +37 -0
  73. package/lib/request/index.js.map +1 -0
  74. package/lib/request/list-governance-instances-request.d.ts +64 -0
  75. package/lib/request/list-governance-instances-request.js +26 -0
  76. package/lib/request/list-governance-instances-request.js.map +1 -0
  77. package/lib/request/update-governance-instance-configuration-request.d.ts +40 -0
  78. package/lib/request/update-governance-instance-configuration-request.js +15 -0
  79. package/lib/request/update-governance-instance-configuration-request.js.map +1 -0
  80. package/lib/request/update-governance-instance-request.d.ts +40 -0
  81. package/lib/request/update-governance-instance-request.js +15 -0
  82. package/lib/request/update-governance-instance-request.js.map +1 -0
  83. package/lib/response/change-governance-instance-compartment-response.d.ts +20 -0
  84. package/lib/response/change-governance-instance-compartment-response.js +15 -0
  85. package/lib/response/change-governance-instance-compartment-response.js.map +1 -0
  86. package/lib/response/create-governance-instance-response.d.ts +35 -0
  87. package/lib/response/create-governance-instance-response.js +15 -0
  88. package/lib/response/create-governance-instance-response.js.map +1 -0
  89. package/lib/response/delete-governance-instance-response.d.ts +25 -0
  90. package/lib/response/delete-governance-instance-response.js +15 -0
  91. package/lib/response/delete-governance-instance-response.js.map +1 -0
  92. package/lib/response/get-governance-instance-configuration-response.d.ts +30 -0
  93. package/lib/response/get-governance-instance-configuration-response.js +15 -0
  94. package/lib/response/get-governance-instance-configuration-response.js.map +1 -0
  95. package/lib/response/get-governance-instance-response.d.ts +30 -0
  96. package/lib/response/get-governance-instance-response.js +15 -0
  97. package/lib/response/get-governance-instance-response.js.map +1 -0
  98. package/lib/response/index.d.ts +28 -0
  99. package/lib/response/index.js +15 -0
  100. package/lib/response/index.js.map +1 -0
  101. package/lib/response/list-governance-instances-response.d.ts +32 -0
  102. package/lib/response/list-governance-instances-response.js +15 -0
  103. package/lib/response/list-governance-instances-response.js.map +1 -0
  104. package/lib/response/update-governance-instance-configuration-response.d.ts +35 -0
  105. package/lib/response/update-governance-instance-configuration-response.js +15 -0
  106. package/lib/response/update-governance-instance-configuration-response.js.map +1 -0
  107. package/lib/response/update-governance-instance-response.d.ts +35 -0
  108. package/lib/response/update-governance-instance-response.js +15 -0
  109. package/lib/response/update-governance-instance-response.js.map +1 -0
  110. package/package.json +29 -0
package/lib/client.js ADDED
@@ -0,0 +1,705 @@
1
+ "use strict";
2
+ /**
3
+ * Access Governance APIs
4
+ * Use the Oracle Access Governance API to create, view, and manage GovernanceInstances.
5
+ * OpenAPI spec version: 20220518
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OracleSDKGenerator.
9
+ * Do not edit the class manually.
10
+ *
11
+ * Copyright (c) 2020, 2023, 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.AccessGovernanceCPClient = exports.AccessGovernanceCPApiKeys = void 0;
44
+ const common = require("oci-common");
45
+ const model = __importStar(require("./model"));
46
+ const accessgovernancecp_waiter_1 = require("./accessgovernancecp-waiter");
47
+ const oci_common_1 = require("oci-common");
48
+ // ===============================================
49
+ // This file is autogenerated - Please do not edit
50
+ // ===============================================
51
+ var AccessGovernanceCPApiKeys;
52
+ (function (AccessGovernanceCPApiKeys) {
53
+ })(AccessGovernanceCPApiKeys = exports.AccessGovernanceCPApiKeys || (exports.AccessGovernanceCPApiKeys = {}));
54
+ /**
55
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
56
+ */
57
+ class AccessGovernanceCPClient {
58
+ constructor(params, clientConfiguration) {
59
+ this["_realmSpecificEndpointTemplateEnabled"] = false;
60
+ this["_endpoint"] = "";
61
+ this["_defaultHeaders"] = {};
62
+ this._circuitBreaker = null;
63
+ this._httpOptions = undefined;
64
+ this.targetService = "AccessGovernanceCP";
65
+ this._regionId = "";
66
+ this._lastSetRegionOrRegionId = "";
67
+ const requestSigner = params.authenticationDetailsProvider
68
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
69
+ : null;
70
+ if (clientConfiguration) {
71
+ this._clientConfiguration = clientConfiguration;
72
+ this._circuitBreaker = clientConfiguration.circuitBreaker
73
+ ? clientConfiguration.circuitBreaker.circuit
74
+ : null;
75
+ this._httpOptions = clientConfiguration.httpOptions
76
+ ? clientConfiguration.httpOptions
77
+ : undefined;
78
+ }
79
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
80
+ const specCircuitBreakerEnabled = true;
81
+ if (!this._circuitBreaker &&
82
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
83
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
84
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
85
+ }
86
+ this._httpClient =
87
+ params.httpClient ||
88
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
89
+ if (params.authenticationDetailsProvider &&
90
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
91
+ const provider = params.authenticationDetailsProvider;
92
+ if (provider.getRegion()) {
93
+ this.region = provider.getRegion();
94
+ }
95
+ }
96
+ }
97
+ /**
98
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
99
+ */
100
+ get endpoint() {
101
+ return this._endpoint;
102
+ }
103
+ /**
104
+ * Sets the endpoint to call (ex, https://www.example.com).
105
+ * @param endpoint The endpoint of the service.
106
+ */
107
+ set endpoint(endpoint) {
108
+ this._endpoint = endpoint;
109
+ this._endpoint = this._endpoint + "/20220518";
110
+ if (this.logger)
111
+ this.logger.info(`AccessGovernanceCPClient endpoint set to ${this._endpoint}`);
112
+ }
113
+ get logger() {
114
+ return common.LOG.logger;
115
+ }
116
+ /**
117
+ * Determines whether realm specific endpoint should be used or not.
118
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
119
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
120
+ */
121
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
122
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
123
+ if (this.logger)
124
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
125
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
126
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(AccessGovernanceCPClient.serviceEndpointTemplate, this._region, AccessGovernanceCPClient.endpointServiceName);
127
+ }
128
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
129
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(AccessGovernanceCPClient.serviceEndpointTemplate, this._regionId, AccessGovernanceCPClient.endpointServiceName);
130
+ }
131
+ }
132
+ /**
133
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
134
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
135
+ * @param region The region of the service.
136
+ */
137
+ set region(region) {
138
+ this._region = region;
139
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(AccessGovernanceCPClient.serviceEndpointTemplate, region, AccessGovernanceCPClient.endpointServiceName);
140
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
141
+ }
142
+ /**
143
+ * Sets the regionId to call (ex, 'us-phoenix-1').
144
+ *
145
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
146
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
147
+ * and then call {@link #endpoint(String) endpoint}.
148
+ * @param regionId The public region ID.
149
+ */
150
+ set regionId(regionId) {
151
+ this._regionId = regionId;
152
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(AccessGovernanceCPClient.serviceEndpointTemplate, regionId, AccessGovernanceCPClient.endpointServiceName);
153
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
154
+ }
155
+ /**
156
+ * Creates a new AccessGovernanceCPWaiter for resources for this service.
157
+ *
158
+ * @param config The waiter configuration for termination and delay strategy
159
+ * @return The service waiters.
160
+ */
161
+ createWaiters(config) {
162
+ this._waiters = new accessgovernancecp_waiter_1.AccessGovernanceCPWaiter(this, config);
163
+ return this._waiters;
164
+ }
165
+ /**
166
+ * Gets the waiters available for resources for this service.
167
+ *
168
+ * @return The service waiters.
169
+ */
170
+ getWaiters() {
171
+ if (this._waiters) {
172
+ return this._waiters;
173
+ }
174
+ throw Error("Waiters do not exist. Please create waiters.");
175
+ }
176
+ /**
177
+ * Moves a GovernanceInstance resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
178
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
179
+ * @param ChangeGovernanceInstanceCompartmentRequest
180
+ * @return ChangeGovernanceInstanceCompartmentResponse
181
+ * @throws OciError when an error occurs
182
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.60.0/accessgovernancecp/ChangeGovernanceInstanceCompartment.ts.html |here} to see how to use ChangeGovernanceInstanceCompartment API.
183
+ */
184
+ changeGovernanceInstanceCompartment(changeGovernanceInstanceCompartmentRequest) {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ if (this.logger)
187
+ this.logger.debug("Calling operation AccessGovernanceCPClient#changeGovernanceInstanceCompartment.");
188
+ const operationName = "changeGovernanceInstanceCompartment";
189
+ const apiReferenceLink = "";
190
+ const pathParams = {
191
+ "{governanceInstanceId}": changeGovernanceInstanceCompartmentRequest.governanceInstanceId
192
+ };
193
+ const queryParams = {};
194
+ let headerParams = {
195
+ "Content-Type": common.Constants.APPLICATION_JSON,
196
+ "if-match": changeGovernanceInstanceCompartmentRequest.ifMatch,
197
+ "opc-request-id": changeGovernanceInstanceCompartmentRequest.opcRequestId,
198
+ "opc-retry-token": changeGovernanceInstanceCompartmentRequest.opcRetryToken
199
+ };
200
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
201
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeGovernanceInstanceCompartmentRequest.retryConfiguration, specRetryConfiguration);
202
+ if (this.logger)
203
+ retrier.logger = this.logger;
204
+ const request = yield oci_common_1.composeRequest({
205
+ baseEndpoint: this._endpoint,
206
+ defaultHeaders: this._defaultHeaders,
207
+ path: "/governanceInstances/{governanceInstanceId}/actions/changeCompartment",
208
+ method: "POST",
209
+ bodyContent: common.ObjectSerializer.serialize(changeGovernanceInstanceCompartmentRequest.changeGovernanceInstanceCompartmentDetails, "ChangeGovernanceInstanceCompartmentDetails", model.ChangeGovernanceInstanceCompartmentDetails.getJsonObj),
210
+ pathParams: pathParams,
211
+ headerParams: headerParams,
212
+ queryParams: queryParams
213
+ });
214
+ try {
215
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
216
+ const sdkResponse = oci_common_1.composeResponse({
217
+ responseObject: {},
218
+ responseHeaders: [
219
+ {
220
+ value: response.headers.get("opc-request-id"),
221
+ key: "opcRequestId",
222
+ dataType: "string"
223
+ }
224
+ ]
225
+ });
226
+ return sdkResponse;
227
+ }
228
+ catch (err) {
229
+ throw err;
230
+ }
231
+ });
232
+ }
233
+ /**
234
+ * Creates a new GovernanceInstance.
235
+ *
236
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
237
+ * @param CreateGovernanceInstanceRequest
238
+ * @return CreateGovernanceInstanceResponse
239
+ * @throws OciError when an error occurs
240
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.60.0/accessgovernancecp/CreateGovernanceInstance.ts.html |here} to see how to use CreateGovernanceInstance API.
241
+ */
242
+ createGovernanceInstance(createGovernanceInstanceRequest) {
243
+ return __awaiter(this, void 0, void 0, function* () {
244
+ if (this.logger)
245
+ this.logger.debug("Calling operation AccessGovernanceCPClient#createGovernanceInstance.");
246
+ const operationName = "createGovernanceInstance";
247
+ const apiReferenceLink = "";
248
+ const pathParams = {};
249
+ const queryParams = {};
250
+ let headerParams = {
251
+ "Content-Type": common.Constants.APPLICATION_JSON,
252
+ "opc-retry-token": createGovernanceInstanceRequest.opcRetryToken,
253
+ "opc-request-id": createGovernanceInstanceRequest.opcRequestId
254
+ };
255
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
256
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createGovernanceInstanceRequest.retryConfiguration, specRetryConfiguration);
257
+ if (this.logger)
258
+ retrier.logger = this.logger;
259
+ const request = yield oci_common_1.composeRequest({
260
+ baseEndpoint: this._endpoint,
261
+ defaultHeaders: this._defaultHeaders,
262
+ path: "/governanceInstances",
263
+ method: "POST",
264
+ bodyContent: common.ObjectSerializer.serialize(createGovernanceInstanceRequest.createGovernanceInstanceDetails, "CreateGovernanceInstanceDetails", model.CreateGovernanceInstanceDetails.getJsonObj),
265
+ pathParams: pathParams,
266
+ headerParams: headerParams,
267
+ queryParams: queryParams
268
+ });
269
+ try {
270
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
271
+ const sdkResponse = oci_common_1.composeResponse({
272
+ responseObject: {},
273
+ body: yield response.json(),
274
+ bodyKey: "governanceInstance",
275
+ bodyModel: model.GovernanceInstance,
276
+ type: "model.GovernanceInstance",
277
+ responseHeaders: [
278
+ {
279
+ value: response.headers.get("etag"),
280
+ key: "etag",
281
+ dataType: "string"
282
+ },
283
+ {
284
+ value: response.headers.get("opc-work-request-id"),
285
+ key: "opcWorkRequestId",
286
+ dataType: "string"
287
+ },
288
+ {
289
+ value: response.headers.get("opc-request-id"),
290
+ key: "opcRequestId",
291
+ dataType: "string"
292
+ }
293
+ ]
294
+ });
295
+ return sdkResponse;
296
+ }
297
+ catch (err) {
298
+ throw err;
299
+ }
300
+ });
301
+ }
302
+ /**
303
+ * Deletes an existing GovernanceInstance.
304
+ *
305
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
306
+ * @param DeleteGovernanceInstanceRequest
307
+ * @return DeleteGovernanceInstanceResponse
308
+ * @throws OciError when an error occurs
309
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.60.0/accessgovernancecp/DeleteGovernanceInstance.ts.html |here} to see how to use DeleteGovernanceInstance API.
310
+ */
311
+ deleteGovernanceInstance(deleteGovernanceInstanceRequest) {
312
+ return __awaiter(this, void 0, void 0, function* () {
313
+ if (this.logger)
314
+ this.logger.debug("Calling operation AccessGovernanceCPClient#deleteGovernanceInstance.");
315
+ const operationName = "deleteGovernanceInstance";
316
+ const apiReferenceLink = "";
317
+ const pathParams = {
318
+ "{governanceInstanceId}": deleteGovernanceInstanceRequest.governanceInstanceId
319
+ };
320
+ const queryParams = {};
321
+ let headerParams = {
322
+ "Content-Type": common.Constants.APPLICATION_JSON,
323
+ "if-match": deleteGovernanceInstanceRequest.ifMatch,
324
+ "opc-retry-token": deleteGovernanceInstanceRequest.opcRetryToken,
325
+ "opc-request-id": deleteGovernanceInstanceRequest.opcRequestId
326
+ };
327
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
328
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteGovernanceInstanceRequest.retryConfiguration, specRetryConfiguration);
329
+ if (this.logger)
330
+ retrier.logger = this.logger;
331
+ const request = yield oci_common_1.composeRequest({
332
+ baseEndpoint: this._endpoint,
333
+ defaultHeaders: this._defaultHeaders,
334
+ path: "/governanceInstances/{governanceInstanceId}",
335
+ method: "DELETE",
336
+ pathParams: pathParams,
337
+ headerParams: headerParams,
338
+ queryParams: queryParams
339
+ });
340
+ try {
341
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
342
+ const sdkResponse = oci_common_1.composeResponse({
343
+ responseObject: {},
344
+ responseHeaders: [
345
+ {
346
+ value: response.headers.get("opc-work-request-id"),
347
+ key: "opcWorkRequestId",
348
+ dataType: "string"
349
+ },
350
+ {
351
+ value: response.headers.get("opc-request-id"),
352
+ key: "opcRequestId",
353
+ dataType: "string"
354
+ }
355
+ ]
356
+ });
357
+ return sdkResponse;
358
+ }
359
+ catch (err) {
360
+ throw err;
361
+ }
362
+ });
363
+ }
364
+ /**
365
+ * Gets a GovernanceInstance by OCID.
366
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
367
+ * @param GetGovernanceInstanceRequest
368
+ * @return GetGovernanceInstanceResponse
369
+ * @throws OciError when an error occurs
370
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.60.0/accessgovernancecp/GetGovernanceInstance.ts.html |here} to see how to use GetGovernanceInstance API.
371
+ */
372
+ getGovernanceInstance(getGovernanceInstanceRequest) {
373
+ return __awaiter(this, void 0, void 0, function* () {
374
+ if (this.logger)
375
+ this.logger.debug("Calling operation AccessGovernanceCPClient#getGovernanceInstance.");
376
+ const operationName = "getGovernanceInstance";
377
+ const apiReferenceLink = "";
378
+ const pathParams = {
379
+ "{governanceInstanceId}": getGovernanceInstanceRequest.governanceInstanceId
380
+ };
381
+ const queryParams = {};
382
+ let headerParams = {
383
+ "Content-Type": common.Constants.APPLICATION_JSON,
384
+ "opc-request-id": getGovernanceInstanceRequest.opcRequestId
385
+ };
386
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
387
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getGovernanceInstanceRequest.retryConfiguration, specRetryConfiguration);
388
+ if (this.logger)
389
+ retrier.logger = this.logger;
390
+ const request = yield oci_common_1.composeRequest({
391
+ baseEndpoint: this._endpoint,
392
+ defaultHeaders: this._defaultHeaders,
393
+ path: "/governanceInstances/{governanceInstanceId}",
394
+ method: "GET",
395
+ pathParams: pathParams,
396
+ headerParams: headerParams,
397
+ queryParams: queryParams
398
+ });
399
+ try {
400
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
401
+ const sdkResponse = oci_common_1.composeResponse({
402
+ responseObject: {},
403
+ body: yield response.json(),
404
+ bodyKey: "governanceInstance",
405
+ bodyModel: model.GovernanceInstance,
406
+ type: "model.GovernanceInstance",
407
+ responseHeaders: [
408
+ {
409
+ value: response.headers.get("etag"),
410
+ key: "etag",
411
+ dataType: "string"
412
+ },
413
+ {
414
+ value: response.headers.get("opc-request-id"),
415
+ key: "opcRequestId",
416
+ dataType: "string"
417
+ }
418
+ ]
419
+ });
420
+ return sdkResponse;
421
+ }
422
+ catch (err) {
423
+ throw err;
424
+ }
425
+ });
426
+ }
427
+ /**
428
+ * Gets the tenancy-wide configuration for GovernanceInstances
429
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
430
+ * @param GetGovernanceInstanceConfigurationRequest
431
+ * @return GetGovernanceInstanceConfigurationResponse
432
+ * @throws OciError when an error occurs
433
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.60.0/accessgovernancecp/GetGovernanceInstanceConfiguration.ts.html |here} to see how to use GetGovernanceInstanceConfiguration API.
434
+ */
435
+ getGovernanceInstanceConfiguration(getGovernanceInstanceConfigurationRequest) {
436
+ return __awaiter(this, void 0, void 0, function* () {
437
+ if (this.logger)
438
+ this.logger.debug("Calling operation AccessGovernanceCPClient#getGovernanceInstanceConfiguration.");
439
+ const operationName = "getGovernanceInstanceConfiguration";
440
+ const apiReferenceLink = "";
441
+ const pathParams = {};
442
+ const queryParams = {
443
+ "compartmentId": getGovernanceInstanceConfigurationRequest.compartmentId
444
+ };
445
+ let headerParams = {
446
+ "Content-Type": common.Constants.APPLICATION_JSON,
447
+ "opc-request-id": getGovernanceInstanceConfigurationRequest.opcRequestId
448
+ };
449
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
450
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getGovernanceInstanceConfigurationRequest.retryConfiguration, specRetryConfiguration);
451
+ if (this.logger)
452
+ retrier.logger = this.logger;
453
+ const request = yield oci_common_1.composeRequest({
454
+ baseEndpoint: this._endpoint,
455
+ defaultHeaders: this._defaultHeaders,
456
+ path: "/governanceInstances/configuration",
457
+ method: "GET",
458
+ pathParams: pathParams,
459
+ headerParams: headerParams,
460
+ queryParams: queryParams
461
+ });
462
+ try {
463
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
464
+ const sdkResponse = oci_common_1.composeResponse({
465
+ responseObject: {},
466
+ body: yield response.json(),
467
+ bodyKey: "governanceInstanceConfiguration",
468
+ bodyModel: model.GovernanceInstanceConfiguration,
469
+ type: "model.GovernanceInstanceConfiguration",
470
+ responseHeaders: [
471
+ {
472
+ value: response.headers.get("etag"),
473
+ key: "etag",
474
+ dataType: "string"
475
+ },
476
+ {
477
+ value: response.headers.get("opc-request-id"),
478
+ key: "opcRequestId",
479
+ dataType: "string"
480
+ }
481
+ ]
482
+ });
483
+ return sdkResponse;
484
+ }
485
+ catch (err) {
486
+ throw err;
487
+ }
488
+ });
489
+ }
490
+ /**
491
+ * Returns a list of Governance Instances.
492
+ *
493
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
494
+ * @param ListGovernanceInstancesRequest
495
+ * @return ListGovernanceInstancesResponse
496
+ * @throws OciError when an error occurs
497
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.60.0/accessgovernancecp/ListGovernanceInstances.ts.html |here} to see how to use ListGovernanceInstances API.
498
+ */
499
+ listGovernanceInstances(listGovernanceInstancesRequest) {
500
+ return __awaiter(this, void 0, void 0, function* () {
501
+ if (this.logger)
502
+ this.logger.debug("Calling operation AccessGovernanceCPClient#listGovernanceInstances.");
503
+ const operationName = "listGovernanceInstances";
504
+ const apiReferenceLink = "";
505
+ const pathParams = {};
506
+ const queryParams = {
507
+ "compartmentId": listGovernanceInstancesRequest.compartmentId,
508
+ "lifecycleState": listGovernanceInstancesRequest.lifecycleState,
509
+ "displayName": listGovernanceInstancesRequest.displayName,
510
+ "id": listGovernanceInstancesRequest.id,
511
+ "limit": listGovernanceInstancesRequest.limit,
512
+ "page": listGovernanceInstancesRequest.page,
513
+ "sortOrder": listGovernanceInstancesRequest.sortOrder,
514
+ "sortBy": listGovernanceInstancesRequest.sortBy
515
+ };
516
+ let headerParams = {
517
+ "Content-Type": common.Constants.APPLICATION_JSON,
518
+ "opc-request-id": listGovernanceInstancesRequest.opcRequestId
519
+ };
520
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
521
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listGovernanceInstancesRequest.retryConfiguration, specRetryConfiguration);
522
+ if (this.logger)
523
+ retrier.logger = this.logger;
524
+ const request = yield oci_common_1.composeRequest({
525
+ baseEndpoint: this._endpoint,
526
+ defaultHeaders: this._defaultHeaders,
527
+ path: "/governanceInstances",
528
+ method: "GET",
529
+ pathParams: pathParams,
530
+ headerParams: headerParams,
531
+ queryParams: queryParams
532
+ });
533
+ try {
534
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
535
+ const sdkResponse = oci_common_1.composeResponse({
536
+ responseObject: {},
537
+ body: yield response.json(),
538
+ bodyKey: "governanceInstanceCollection",
539
+ bodyModel: model.GovernanceInstanceCollection,
540
+ type: "model.GovernanceInstanceCollection",
541
+ responseHeaders: [
542
+ {
543
+ value: response.headers.get("opc-request-id"),
544
+ key: "opcRequestId",
545
+ dataType: "string"
546
+ },
547
+ {
548
+ value: response.headers.get("opc-next-page"),
549
+ key: "opcNextPage",
550
+ dataType: "string"
551
+ }
552
+ ]
553
+ });
554
+ return sdkResponse;
555
+ }
556
+ catch (err) {
557
+ throw err;
558
+ }
559
+ });
560
+ }
561
+ /**
562
+ * Updates the GovernanceInstance.
563
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
564
+ * @param UpdateGovernanceInstanceRequest
565
+ * @return UpdateGovernanceInstanceResponse
566
+ * @throws OciError when an error occurs
567
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.60.0/accessgovernancecp/UpdateGovernanceInstance.ts.html |here} to see how to use UpdateGovernanceInstance API.
568
+ */
569
+ updateGovernanceInstance(updateGovernanceInstanceRequest) {
570
+ return __awaiter(this, void 0, void 0, function* () {
571
+ if (this.logger)
572
+ this.logger.debug("Calling operation AccessGovernanceCPClient#updateGovernanceInstance.");
573
+ const operationName = "updateGovernanceInstance";
574
+ const apiReferenceLink = "";
575
+ const pathParams = {
576
+ "{governanceInstanceId}": updateGovernanceInstanceRequest.governanceInstanceId
577
+ };
578
+ const queryParams = {};
579
+ let headerParams = {
580
+ "Content-Type": common.Constants.APPLICATION_JSON,
581
+ "if-match": updateGovernanceInstanceRequest.ifMatch,
582
+ "opc-request-id": updateGovernanceInstanceRequest.opcRequestId
583
+ };
584
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
585
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateGovernanceInstanceRequest.retryConfiguration, specRetryConfiguration);
586
+ if (this.logger)
587
+ retrier.logger = this.logger;
588
+ const request = yield oci_common_1.composeRequest({
589
+ baseEndpoint: this._endpoint,
590
+ defaultHeaders: this._defaultHeaders,
591
+ path: "/governanceInstances/{governanceInstanceId}",
592
+ method: "PUT",
593
+ bodyContent: common.ObjectSerializer.serialize(updateGovernanceInstanceRequest.updateGovernanceInstanceDetails, "UpdateGovernanceInstanceDetails", model.UpdateGovernanceInstanceDetails.getJsonObj),
594
+ pathParams: pathParams,
595
+ headerParams: headerParams,
596
+ queryParams: queryParams
597
+ });
598
+ try {
599
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
600
+ const sdkResponse = oci_common_1.composeResponse({
601
+ responseObject: {},
602
+ body: yield response.json(),
603
+ bodyKey: "governanceInstance",
604
+ bodyModel: model.GovernanceInstance,
605
+ type: "model.GovernanceInstance",
606
+ responseHeaders: [
607
+ {
608
+ value: response.headers.get("etag"),
609
+ key: "etag",
610
+ dataType: "string"
611
+ },
612
+ {
613
+ value: response.headers.get("opc-work-request-id"),
614
+ key: "opcWorkRequestId",
615
+ dataType: "string"
616
+ },
617
+ {
618
+ value: response.headers.get("opc-request-id"),
619
+ key: "opcRequestId",
620
+ dataType: "string"
621
+ }
622
+ ]
623
+ });
624
+ return sdkResponse;
625
+ }
626
+ catch (err) {
627
+ throw err;
628
+ }
629
+ });
630
+ }
631
+ /**
632
+ * Updates the tenancy-wide configuration for GovernanceInstances
633
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
634
+ * @param UpdateGovernanceInstanceConfigurationRequest
635
+ * @return UpdateGovernanceInstanceConfigurationResponse
636
+ * @throws OciError when an error occurs
637
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.60.0/accessgovernancecp/UpdateGovernanceInstanceConfiguration.ts.html |here} to see how to use UpdateGovernanceInstanceConfiguration API.
638
+ */
639
+ updateGovernanceInstanceConfiguration(updateGovernanceInstanceConfigurationRequest) {
640
+ return __awaiter(this, void 0, void 0, function* () {
641
+ if (this.logger)
642
+ this.logger.debug("Calling operation AccessGovernanceCPClient#updateGovernanceInstanceConfiguration.");
643
+ const operationName = "updateGovernanceInstanceConfiguration";
644
+ const apiReferenceLink = "";
645
+ const pathParams = {};
646
+ const queryParams = {
647
+ "compartmentId": updateGovernanceInstanceConfigurationRequest.compartmentId
648
+ };
649
+ let headerParams = {
650
+ "Content-Type": common.Constants.APPLICATION_JSON,
651
+ "if-match": updateGovernanceInstanceConfigurationRequest.ifMatch,
652
+ "opc-request-id": updateGovernanceInstanceConfigurationRequest.opcRequestId
653
+ };
654
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
655
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateGovernanceInstanceConfigurationRequest.retryConfiguration, specRetryConfiguration);
656
+ if (this.logger)
657
+ retrier.logger = this.logger;
658
+ const request = yield oci_common_1.composeRequest({
659
+ baseEndpoint: this._endpoint,
660
+ defaultHeaders: this._defaultHeaders,
661
+ path: "/governanceInstances/configuration",
662
+ method: "PUT",
663
+ bodyContent: common.ObjectSerializer.serialize(updateGovernanceInstanceConfigurationRequest.updateGovernanceInstanceConfigurationDetails, "UpdateGovernanceInstanceConfigurationDetails", model.UpdateGovernanceInstanceConfigurationDetails.getJsonObj),
664
+ pathParams: pathParams,
665
+ headerParams: headerParams,
666
+ queryParams: queryParams
667
+ });
668
+ try {
669
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
670
+ const sdkResponse = oci_common_1.composeResponse({
671
+ responseObject: {},
672
+ body: yield response.json(),
673
+ bodyKey: "governanceInstanceConfiguration",
674
+ bodyModel: model.GovernanceInstanceConfiguration,
675
+ type: "model.GovernanceInstanceConfiguration",
676
+ responseHeaders: [
677
+ {
678
+ value: response.headers.get("etag"),
679
+ key: "etag",
680
+ dataType: "string"
681
+ },
682
+ {
683
+ value: response.headers.get("opc-work-request-id"),
684
+ key: "opcWorkRequestId",
685
+ dataType: "string"
686
+ },
687
+ {
688
+ value: response.headers.get("opc-request-id"),
689
+ key: "opcRequestId",
690
+ dataType: "string"
691
+ }
692
+ ]
693
+ });
694
+ return sdkResponse;
695
+ }
696
+ catch (err) {
697
+ throw err;
698
+ }
699
+ });
700
+ }
701
+ }
702
+ exports.AccessGovernanceCPClient = AccessGovernanceCPClient;
703
+ AccessGovernanceCPClient.serviceEndpointTemplate = "https://cp-prod.access-governance.{region}.oci.{secondLevelDomain}";
704
+ AccessGovernanceCPClient.endpointServiceName = "";
705
+ //# sourceMappingURL=client.js.map