oci-governancerulescontrolplane 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +89 -0
- package/NOTICE.txt +1 -0
- package/README.md +22 -0
- package/THIRD_PARTY_LICENSES.txt +576 -0
- package/index.d.ts +25 -0
- package/index.js +48 -0
- package/index.js.map +1 -0
- package/lib/client.d.ts +327 -0
- package/lib/client.js +1593 -0
- package/lib/client.js.map +1 -0
- package/lib/governancerule-waiter.d.ts +53 -0
- package/lib/governancerule-waiter.js +101 -0
- package/lib/governancerule-waiter.js.map +1 -0
- package/lib/model/action-type.d.ts +32 -0
- package/lib/model/action-type.js +43 -0
- package/lib/model/action-type.js.map +1 -0
- package/lib/model/allowed-regions-template.d.ts +37 -0
- package/lib/model/allowed-regions-template.js +52 -0
- package/lib/model/allowed-regions-template.js.map +1 -0
- package/lib/model/association.d.ts +23 -0
- package/lib/model/association.js +65 -0
- package/lib/model/association.js.map +1 -0
- package/lib/model/base-tag-definition-validator.d.ts +33 -0
- package/lib/model/base-tag-definition-validator.js +69 -0
- package/lib/model/base-tag-definition-validator.js.map +1 -0
- package/lib/model/create-governance-rule-details.d.ts +71 -0
- package/lib/model/create-governance-rule-details.js +53 -0
- package/lib/model/create-governance-rule-details.js.map +1 -0
- package/lib/model/create-inclusion-criterion-details.d.ts +31 -0
- package/lib/model/create-inclusion-criterion-details.js +55 -0
- package/lib/model/create-inclusion-criterion-details.js.map +1 -0
- package/lib/model/creation-option.d.ts +28 -0
- package/lib/model/creation-option.js +39 -0
- package/lib/model/creation-option.js.map +1 -0
- package/lib/model/default-tag-definition-validator.d.ts +27 -0
- package/lib/model/default-tag-definition-validator.js +54 -0
- package/lib/model/default-tag-definition-validator.js.map +1 -0
- package/lib/model/enforced-governance-rule-collection.d.ts +26 -0
- package/lib/model/enforced-governance-rule-collection.js +61 -0
- package/lib/model/enforced-governance-rule-collection.js.map +1 -0
- package/lib/model/enforced-governance-rule-summary.d.ts +59 -0
- package/lib/model/enforced-governance-rule-summary.js +29 -0
- package/lib/model/enforced-governance-rule-summary.js.map +1 -0
- package/lib/model/enforced-governance-rule.d.ts +60 -0
- package/lib/model/enforced-governance-rule.js +53 -0
- package/lib/model/enforced-governance-rule.js.map +1 -0
- package/lib/model/enum-tag-definition-validator.d.ts +33 -0
- package/lib/model/enum-tag-definition-validator.js +54 -0
- package/lib/model/enum-tag-definition-validator.js.map +1 -0
- package/lib/model/governance-rule-collection.d.ts +26 -0
- package/lib/model/governance-rule-collection.js +61 -0
- package/lib/model/governance-rule-collection.js.map +1 -0
- package/lib/model/governance-rule-lifecycle-state.d.ts +28 -0
- package/lib/model/governance-rule-lifecycle-state.js +39 -0
- package/lib/model/governance-rule-lifecycle-state.js.map +1 -0
- package/lib/model/governance-rule-summary.d.ts +94 -0
- package/lib/model/governance-rule-summary.js +29 -0
- package/lib/model/governance-rule-summary.js.map +1 -0
- package/lib/model/governance-rule-type.d.ts +29 -0
- package/lib/model/governance-rule-type.js +40 -0
- package/lib/model/governance-rule-type.js.map +1 -0
- package/lib/model/governance-rule.d.ts +103 -0
- package/lib/model/governance-rule.js +53 -0
- package/lib/model/governance-rule.js.map +1 -0
- package/lib/model/inclusion-criterion-collection.d.ts +26 -0
- package/lib/model/inclusion-criterion-collection.js +61 -0
- package/lib/model/inclusion-criterion-collection.js.map +1 -0
- package/lib/model/inclusion-criterion-summary.d.ts +53 -0
- package/lib/model/inclusion-criterion-summary.js +55 -0
- package/lib/model/inclusion-criterion-summary.js.map +1 -0
- package/lib/model/inclusion-criterion.d.ts +71 -0
- package/lib/model/inclusion-criterion.js +75 -0
- package/lib/model/inclusion-criterion.js.map +1 -0
- package/lib/model/index.d.ts +96 -0
- package/lib/model/index.js +119 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/operation-status.d.ts +33 -0
- package/lib/model/operation-status.js +44 -0
- package/lib/model/operation-status.js.map +1 -0
- package/lib/model/operation-type.d.ts +42 -0
- package/lib/model/operation-type.js +53 -0
- package/lib/model/operation-type.js.map +1 -0
- package/lib/model/quota-template.d.ts +37 -0
- package/lib/model/quota-template.js +50 -0
- package/lib/model/quota-template.js.map +1 -0
- package/lib/model/sort-order.d.ts +23 -0
- package/lib/model/sort-order.js +34 -0
- package/lib/model/sort-order.js.map +1 -0
- package/lib/model/tag-default.d.ts +46 -0
- package/lib/model/tag-default.js +29 -0
- package/lib/model/tag-default.js.map +1 -0
- package/lib/model/tag-template.d.ts +38 -0
- package/lib/model/tag-template.js +72 -0
- package/lib/model/tag-template.js.map +1 -0
- package/lib/model/tag.d.ts +39 -0
- package/lib/model/tag.js +57 -0
- package/lib/model/tag.js.map +1 -0
- package/lib/model/template.d.ts +23 -0
- package/lib/model/template.js +73 -0
- package/lib/model/template.js.map +1 -0
- package/lib/model/tenancy-association.d.ts +29 -0
- package/lib/model/tenancy-association.js +52 -0
- package/lib/model/tenancy-association.js.map +1 -0
- package/lib/model/tenancy-attachment-collection.d.ts +26 -0
- package/lib/model/tenancy-attachment-collection.js +61 -0
- package/lib/model/tenancy-attachment-collection.js.map +1 -0
- package/lib/model/tenancy-attachment-summary.d.ts +62 -0
- package/lib/model/tenancy-attachment-summary.js +29 -0
- package/lib/model/tenancy-attachment-summary.js.map +1 -0
- package/lib/model/tenancy-attachment.d.ts +75 -0
- package/lib/model/tenancy-attachment.js +43 -0
- package/lib/model/tenancy-attachment.js.map +1 -0
- package/lib/model/update-governance-rule-details.d.ts +53 -0
- package/lib/model/update-governance-rule-details.js +53 -0
- package/lib/model/update-governance-rule-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 +35 -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 +29 -0
- package/lib/model/work-request-log-entry.js +29 -0
- package/lib/model/work-request-log-entry.js.map +1 -0
- package/lib/model/work-request-resource-metadata-key.d.ts +27 -0
- package/lib/model/work-request-resource-metadata-key.js +38 -0
- package/lib/model/work-request-resource-metadata-key.js.map +1 -0
- package/lib/model/work-request-resource.d.ts +48 -0
- package/lib/model/work-request-resource.js +29 -0
- package/lib/model/work-request-resource.js.map +1 -0
- package/lib/model/work-request-summary-collection.d.ts +26 -0
- package/lib/model/work-request-summary-collection.js +61 -0
- package/lib/model/work-request-summary-collection.js.map +1 -0
- package/lib/model/work-request-summary.d.ts +67 -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 +67 -0
- package/lib/model/work-request.js +61 -0
- package/lib/model/work-request.js.map +1 -0
- package/lib/request/cancel-work-request-request.d.ts +35 -0
- package/lib/request/cancel-work-request-request.js +15 -0
- package/lib/request/cancel-work-request-request.js.map +1 -0
- package/lib/request/create-governance-rule-request.d.ts +36 -0
- package/lib/request/create-governance-rule-request.js +15 -0
- package/lib/request/create-governance-rule-request.js.map +1 -0
- package/lib/request/create-inclusion-criterion-request.d.ts +36 -0
- package/lib/request/create-inclusion-criterion-request.js +15 -0
- package/lib/request/create-inclusion-criterion-request.js.map +1 -0
- package/lib/request/delete-governance-rule-request.d.ts +35 -0
- package/lib/request/delete-governance-rule-request.js +15 -0
- package/lib/request/delete-governance-rule-request.js.map +1 -0
- package/lib/request/delete-inclusion-criterion-request.d.ts +35 -0
- package/lib/request/delete-inclusion-criterion-request.js +15 -0
- package/lib/request/delete-inclusion-criterion-request.js.map +1 -0
- package/lib/request/get-enforced-governance-rule-request.d.ts +26 -0
- package/lib/request/get-enforced-governance-rule-request.js +15 -0
- package/lib/request/get-enforced-governance-rule-request.js.map +1 -0
- package/lib/request/get-governance-rule-request.d.ts +26 -0
- package/lib/request/get-governance-rule-request.js +15 -0
- package/lib/request/get-governance-rule-request.js.map +1 -0
- package/lib/request/get-inclusion-criterion-request.d.ts +26 -0
- package/lib/request/get-inclusion-criterion-request.js +15 -0
- package/lib/request/get-inclusion-criterion-request.js.map +1 -0
- package/lib/request/get-tenancy-attachment-request.d.ts +26 -0
- package/lib/request/get-tenancy-attachment-request.js +15 -0
- package/lib/request/get-tenancy-attachment-request.js.map +1 -0
- package/lib/request/get-work-request-request.d.ts +26 -0
- package/lib/request/get-work-request-request.js +15 -0
- package/lib/request/get-work-request-request.js.map +1 -0
- package/lib/request/index.d.ts +52 -0
- package/lib/request/index.js +49 -0
- package/lib/request/index.js.map +1 -0
- package/lib/request/list-enforced-governance-rules-request.d.ts +62 -0
- package/lib/request/list-enforced-governance-rules-request.js +24 -0
- package/lib/request/list-enforced-governance-rules-request.js.map +1 -0
- package/lib/request/list-governance-rules-request.d.ts +66 -0
- package/lib/request/list-governance-rules-request.js +24 -0
- package/lib/request/list-governance-rules-request.js.map +1 -0
- package/lib/request/list-inclusion-criteria-request.d.ts +58 -0
- package/lib/request/list-inclusion-criteria-request.js +24 -0
- package/lib/request/list-inclusion-criteria-request.js.map +1 -0
- package/lib/request/list-tenancy-attachments-request.d.ts +66 -0
- package/lib/request/list-tenancy-attachments-request.js +24 -0
- package/lib/request/list-tenancy-attachments-request.js.map +1 -0
- package/lib/request/list-work-request-errors-request.d.ts +49 -0
- package/lib/request/list-work-request-errors-request.js +23 -0
- package/lib/request/list-work-request-errors-request.js.map +1 -0
- package/lib/request/list-work-request-logs-request.d.ts +49 -0
- package/lib/request/list-work-request-logs-request.js +23 -0
- package/lib/request/list-work-request-logs-request.js.map +1 -0
- package/lib/request/list-work-requests-request.d.ts +61 -0
- package/lib/request/list-work-requests-request.js +23 -0
- package/lib/request/list-work-requests-request.js.map +1 -0
- package/lib/request/retry-governance-rule-request.d.ts +44 -0
- package/lib/request/retry-governance-rule-request.js +15 -0
- package/lib/request/retry-governance-rule-request.js.map +1 -0
- package/lib/request/retry-tenancy-attachment-request.d.ts +44 -0
- package/lib/request/retry-tenancy-attachment-request.js +15 -0
- package/lib/request/retry-tenancy-attachment-request.js.map +1 -0
- package/lib/request/update-governance-rule-request.d.ts +40 -0
- package/lib/request/update-governance-rule-request.js +15 -0
- package/lib/request/update-governance-rule-request.js.map +1 -0
- package/lib/response/cancel-work-request-response.d.ts +20 -0
- package/lib/response/cancel-work-request-response.js +15 -0
- package/lib/response/cancel-work-request-response.js.map +1 -0
- package/lib/response/create-governance-rule-response.d.ts +39 -0
- package/lib/response/create-governance-rule-response.js +15 -0
- package/lib/response/create-governance-rule-response.js.map +1 -0
- package/lib/response/create-inclusion-criterion-response.d.ts +39 -0
- package/lib/response/create-inclusion-criterion-response.js +15 -0
- package/lib/response/create-inclusion-criterion-response.js.map +1 -0
- package/lib/response/delete-governance-rule-response.d.ts +25 -0
- package/lib/response/delete-governance-rule-response.js +15 -0
- package/lib/response/delete-governance-rule-response.js.map +1 -0
- package/lib/response/delete-inclusion-criterion-response.d.ts +25 -0
- package/lib/response/delete-inclusion-criterion-response.js +15 -0
- package/lib/response/delete-inclusion-criterion-response.js.map +1 -0
- package/lib/response/get-enforced-governance-rule-response.d.ts +30 -0
- package/lib/response/get-enforced-governance-rule-response.js +15 -0
- package/lib/response/get-enforced-governance-rule-response.js.map +1 -0
- package/lib/response/get-governance-rule-response.d.ts +30 -0
- package/lib/response/get-governance-rule-response.js +15 -0
- package/lib/response/get-governance-rule-response.js.map +1 -0
- package/lib/response/get-inclusion-criterion-response.d.ts +30 -0
- package/lib/response/get-inclusion-criterion-response.js +15 -0
- package/lib/response/get-inclusion-criterion-response.js.map +1 -0
- package/lib/response/get-tenancy-attachment-response.d.ts +30 -0
- package/lib/response/get-tenancy-attachment-response.js +15 -0
- package/lib/response/get-tenancy-attachment-response.js.map +1 -0
- package/lib/response/get-work-request-response.d.ts +34 -0
- package/lib/response/get-work-request-response.js +15 -0
- package/lib/response/get-work-request-response.js.map +1 -0
- package/lib/response/index.d.ts +52 -0
- package/lib/response/index.js +15 -0
- package/lib/response/index.js.map +1 -0
- package/lib/response/list-enforced-governance-rules-response.d.ts +32 -0
- package/lib/response/list-enforced-governance-rules-response.js +15 -0
- package/lib/response/list-enforced-governance-rules-response.js.map +1 -0
- package/lib/response/list-governance-rules-response.d.ts +32 -0
- package/lib/response/list-governance-rules-response.js +15 -0
- package/lib/response/list-governance-rules-response.js.map +1 -0
- package/lib/response/list-inclusion-criteria-response.d.ts +32 -0
- package/lib/response/list-inclusion-criteria-response.js +15 -0
- package/lib/response/list-inclusion-criteria-response.js.map +1 -0
- package/lib/response/list-tenancy-attachments-response.d.ts +32 -0
- package/lib/response/list-tenancy-attachments-response.js +15 -0
- package/lib/response/list-tenancy-attachments-response.js.map +1 -0
- package/lib/response/list-work-request-errors-response.d.ts +32 -0
- package/lib/response/list-work-request-errors-response.js +15 -0
- package/lib/response/list-work-request-errors-response.js.map +1 -0
- package/lib/response/list-work-request-logs-response.d.ts +32 -0
- package/lib/response/list-work-request-logs-response.js +15 -0
- package/lib/response/list-work-request-logs-response.js.map +1 -0
- package/lib/response/list-work-requests-response.d.ts +32 -0
- package/lib/response/list-work-requests-response.js +15 -0
- package/lib/response/list-work-requests-response.js.map +1 -0
- package/lib/response/retry-governance-rule-response.d.ts +25 -0
- package/lib/response/retry-governance-rule-response.js +15 -0
- package/lib/response/retry-governance-rule-response.js.map +1 -0
- package/lib/response/retry-tenancy-attachment-response.d.ts +25 -0
- package/lib/response/retry-tenancy-attachment-response.js +15 -0
- package/lib/response/retry-tenancy-attachment-response.js.map +1 -0
- package/lib/response/update-governance-rule-response.d.ts +25 -0
- package/lib/response/update-governance-rule-response.js +15 -0
- package/lib/response/update-governance-rule-response.js.map +1 -0
- package/lib/workrequest-waiter.d.ts +27 -0
- package/lib/workrequest-waiter.js +44 -0
- package/lib/workrequest-waiter.js.map +1 -0
- package/package.json +29 -0
package/lib/client.js
ADDED
|
@@ -0,0 +1,1593 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* GovernanceRulesControlPlane API
|
|
4
|
+
* A description of the GovernanceRulesControlPlane API
|
|
5
|
+
* OpenAPI spec version: 20220504
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2020, 2022, 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.WorkRequestClient = exports.WorkRequestApiKeys = exports.GovernanceRuleClient = exports.GovernanceRuleApiKeys = void 0;
|
|
44
|
+
const common = require("oci-common");
|
|
45
|
+
const model = __importStar(require("./model"));
|
|
46
|
+
const governancerule_waiter_1 = require("./governancerule-waiter");
|
|
47
|
+
const workrequest_waiter_1 = require("./workrequest-waiter");
|
|
48
|
+
const oci_common_1 = require("oci-common");
|
|
49
|
+
// ===============================================
|
|
50
|
+
// This file is autogenerated - Please do not edit
|
|
51
|
+
// ===============================================
|
|
52
|
+
var GovernanceRuleApiKeys;
|
|
53
|
+
(function (GovernanceRuleApiKeys) {
|
|
54
|
+
})(GovernanceRuleApiKeys = exports.GovernanceRuleApiKeys || (exports.GovernanceRuleApiKeys = {}));
|
|
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 GovernanceRuleClient {
|
|
59
|
+
constructor(params, clientConfiguration) {
|
|
60
|
+
this["_endpoint"] = "";
|
|
61
|
+
this["_defaultHeaders"] = {};
|
|
62
|
+
this._circuitBreaker = null;
|
|
63
|
+
this._httpOptions = undefined;
|
|
64
|
+
this.targetService = "GovernanceRule";
|
|
65
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
66
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
67
|
+
: null;
|
|
68
|
+
if (clientConfiguration) {
|
|
69
|
+
this._clientConfiguration = clientConfiguration;
|
|
70
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
71
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
72
|
+
: null;
|
|
73
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
74
|
+
? clientConfiguration.httpOptions
|
|
75
|
+
: undefined;
|
|
76
|
+
}
|
|
77
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
78
|
+
const specCircuitBreakerEnabled = true;
|
|
79
|
+
if (!this._circuitBreaker &&
|
|
80
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
81
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
82
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
83
|
+
}
|
|
84
|
+
this._httpClient =
|
|
85
|
+
params.httpClient ||
|
|
86
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
|
|
87
|
+
if (params.authenticationDetailsProvider &&
|
|
88
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
89
|
+
const provider = params.authenticationDetailsProvider;
|
|
90
|
+
if (provider.getRegion()) {
|
|
91
|
+
this.region = provider.getRegion();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
97
|
+
*/
|
|
98
|
+
get endpoint() {
|
|
99
|
+
return this._endpoint;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
103
|
+
* @param endpoint The endpoint of the service.
|
|
104
|
+
*/
|
|
105
|
+
set endpoint(endpoint) {
|
|
106
|
+
this._endpoint = endpoint;
|
|
107
|
+
this._endpoint = this._endpoint + "/20220504";
|
|
108
|
+
if (this.logger)
|
|
109
|
+
this.logger.info(`GovernanceRuleClient endpoint set to ${this._endpoint}`);
|
|
110
|
+
}
|
|
111
|
+
get logger() {
|
|
112
|
+
return common.LOG.logger;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
116
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
117
|
+
* @param region The region of the service.
|
|
118
|
+
*/
|
|
119
|
+
set region(region) {
|
|
120
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(GovernanceRuleClient.serviceEndpointTemplate, region, GovernanceRuleClient.endpointServiceName);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
124
|
+
*
|
|
125
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
126
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
127
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
128
|
+
* @param regionId The public region ID.
|
|
129
|
+
*/
|
|
130
|
+
set regionId(regionId) {
|
|
131
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(GovernanceRuleClient.serviceEndpointTemplate, regionId, GovernanceRuleClient.endpointServiceName);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Creates a new GovernanceRuleWaiter for resources for this service.
|
|
135
|
+
*
|
|
136
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
137
|
+
* @return The service waiters.
|
|
138
|
+
*/
|
|
139
|
+
createWaiters(config) {
|
|
140
|
+
this._waiters = new governancerule_waiter_1.GovernanceRuleWaiter(this, config);
|
|
141
|
+
return this._waiters;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Gets the waiters available for resources for this service.
|
|
145
|
+
*
|
|
146
|
+
* @return The service waiters.
|
|
147
|
+
*/
|
|
148
|
+
getWaiters() {
|
|
149
|
+
if (this._waiters) {
|
|
150
|
+
return this._waiters;
|
|
151
|
+
}
|
|
152
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Create governance rule in the root compartment only. Either relatedResourceId or template must be supplied.
|
|
156
|
+
*
|
|
157
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
158
|
+
* @param CreateGovernanceRuleRequest
|
|
159
|
+
* @return CreateGovernanceRuleResponse
|
|
160
|
+
* @throws OciError when an error occurs
|
|
161
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/CreateGovernanceRule.ts.html |here} to see how to use CreateGovernanceRule API.
|
|
162
|
+
*/
|
|
163
|
+
createGovernanceRule(createGovernanceRuleRequest) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
if (this.logger)
|
|
166
|
+
this.logger.debug("Calling operation GovernanceRuleClient#createGovernanceRule.");
|
|
167
|
+
const operationName = "createGovernanceRule";
|
|
168
|
+
const apiReferenceLink = "";
|
|
169
|
+
const pathParams = {};
|
|
170
|
+
const queryParams = {};
|
|
171
|
+
let headerParams = {
|
|
172
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
173
|
+
"opc-retry-token": createGovernanceRuleRequest.opcRetryToken,
|
|
174
|
+
"opc-request-id": createGovernanceRuleRequest.opcRequestId
|
|
175
|
+
};
|
|
176
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
177
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createGovernanceRuleRequest.retryConfiguration, specRetryConfiguration);
|
|
178
|
+
if (this.logger)
|
|
179
|
+
retrier.logger = this.logger;
|
|
180
|
+
const request = yield oci_common_1.composeRequest({
|
|
181
|
+
baseEndpoint: this._endpoint,
|
|
182
|
+
defaultHeaders: this._defaultHeaders,
|
|
183
|
+
path: "/governanceRules",
|
|
184
|
+
method: "POST",
|
|
185
|
+
bodyContent: common.ObjectSerializer.serialize(createGovernanceRuleRequest.createGovernanceRuleDetails, "CreateGovernanceRuleDetails", model.CreateGovernanceRuleDetails.getJsonObj),
|
|
186
|
+
pathParams: pathParams,
|
|
187
|
+
headerParams: headerParams,
|
|
188
|
+
queryParams: queryParams
|
|
189
|
+
});
|
|
190
|
+
try {
|
|
191
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
192
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
193
|
+
responseObject: {},
|
|
194
|
+
body: yield response.json(),
|
|
195
|
+
bodyKey: "governanceRule",
|
|
196
|
+
bodyModel: model.GovernanceRule,
|
|
197
|
+
type: "model.GovernanceRule",
|
|
198
|
+
responseHeaders: [
|
|
199
|
+
{
|
|
200
|
+
value: response.headers.get("etag"),
|
|
201
|
+
key: "etag",
|
|
202
|
+
dataType: "string"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
value: response.headers.get("opc-work-request-id"),
|
|
206
|
+
key: "opcWorkRequestId",
|
|
207
|
+
dataType: "string"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
value: response.headers.get("opc-request-id"),
|
|
211
|
+
key: "opcRequestId",
|
|
212
|
+
dataType: "string"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
value: response.headers.get("location"),
|
|
216
|
+
key: "location",
|
|
217
|
+
dataType: "string"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
});
|
|
221
|
+
return sdkResponse;
|
|
222
|
+
}
|
|
223
|
+
catch (err) {
|
|
224
|
+
throw err;
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Create inclusion criterion of type tenancy or tag for the governance rule.
|
|
230
|
+
*
|
|
231
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
232
|
+
* @param CreateInclusionCriterionRequest
|
|
233
|
+
* @return CreateInclusionCriterionResponse
|
|
234
|
+
* @throws OciError when an error occurs
|
|
235
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/CreateInclusionCriterion.ts.html |here} to see how to use CreateInclusionCriterion API.
|
|
236
|
+
*/
|
|
237
|
+
createInclusionCriterion(createInclusionCriterionRequest) {
|
|
238
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
239
|
+
if (this.logger)
|
|
240
|
+
this.logger.debug("Calling operation GovernanceRuleClient#createInclusionCriterion.");
|
|
241
|
+
const operationName = "createInclusionCriterion";
|
|
242
|
+
const apiReferenceLink = "";
|
|
243
|
+
const pathParams = {};
|
|
244
|
+
const queryParams = {};
|
|
245
|
+
let headerParams = {
|
|
246
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
247
|
+
"opc-retry-token": createInclusionCriterionRequest.opcRetryToken,
|
|
248
|
+
"opc-request-id": createInclusionCriterionRequest.opcRequestId
|
|
249
|
+
};
|
|
250
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
251
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createInclusionCriterionRequest.retryConfiguration, specRetryConfiguration);
|
|
252
|
+
if (this.logger)
|
|
253
|
+
retrier.logger = this.logger;
|
|
254
|
+
const request = yield oci_common_1.composeRequest({
|
|
255
|
+
baseEndpoint: this._endpoint,
|
|
256
|
+
defaultHeaders: this._defaultHeaders,
|
|
257
|
+
path: "/inclusionCriteria",
|
|
258
|
+
method: "POST",
|
|
259
|
+
bodyContent: common.ObjectSerializer.serialize(createInclusionCriterionRequest.createInclusionCriterionDetails, "CreateInclusionCriterionDetails", model.CreateInclusionCriterionDetails.getJsonObj),
|
|
260
|
+
pathParams: pathParams,
|
|
261
|
+
headerParams: headerParams,
|
|
262
|
+
queryParams: queryParams
|
|
263
|
+
});
|
|
264
|
+
try {
|
|
265
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
266
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
267
|
+
responseObject: {},
|
|
268
|
+
body: yield response.json(),
|
|
269
|
+
bodyKey: "inclusionCriterion",
|
|
270
|
+
bodyModel: model.InclusionCriterion,
|
|
271
|
+
type: "model.InclusionCriterion",
|
|
272
|
+
responseHeaders: [
|
|
273
|
+
{
|
|
274
|
+
value: response.headers.get("etag"),
|
|
275
|
+
key: "etag",
|
|
276
|
+
dataType: "string"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
value: response.headers.get("opc-work-request-id"),
|
|
280
|
+
key: "opcWorkRequestId",
|
|
281
|
+
dataType: "string"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
value: response.headers.get("opc-request-id"),
|
|
285
|
+
key: "opcRequestId",
|
|
286
|
+
dataType: "string"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
value: response.headers.get("location"),
|
|
290
|
+
key: "location",
|
|
291
|
+
dataType: "string"
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
});
|
|
295
|
+
return sdkResponse;
|
|
296
|
+
}
|
|
297
|
+
catch (err) {
|
|
298
|
+
throw err;
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Delete the specified governance rule.
|
|
304
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
305
|
+
* @param DeleteGovernanceRuleRequest
|
|
306
|
+
* @return DeleteGovernanceRuleResponse
|
|
307
|
+
* @throws OciError when an error occurs
|
|
308
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/DeleteGovernanceRule.ts.html |here} to see how to use DeleteGovernanceRule API.
|
|
309
|
+
*/
|
|
310
|
+
deleteGovernanceRule(deleteGovernanceRuleRequest) {
|
|
311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
+
if (this.logger)
|
|
313
|
+
this.logger.debug("Calling operation GovernanceRuleClient#deleteGovernanceRule.");
|
|
314
|
+
const operationName = "deleteGovernanceRule";
|
|
315
|
+
const apiReferenceLink = "";
|
|
316
|
+
const pathParams = {
|
|
317
|
+
"{governanceRuleId}": deleteGovernanceRuleRequest.governanceRuleId
|
|
318
|
+
};
|
|
319
|
+
const queryParams = {};
|
|
320
|
+
let headerParams = {
|
|
321
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
322
|
+
"if-match": deleteGovernanceRuleRequest.ifMatch,
|
|
323
|
+
"opc-request-id": deleteGovernanceRuleRequest.opcRequestId
|
|
324
|
+
};
|
|
325
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
326
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteGovernanceRuleRequest.retryConfiguration, specRetryConfiguration);
|
|
327
|
+
if (this.logger)
|
|
328
|
+
retrier.logger = this.logger;
|
|
329
|
+
const request = yield oci_common_1.composeRequest({
|
|
330
|
+
baseEndpoint: this._endpoint,
|
|
331
|
+
defaultHeaders: this._defaultHeaders,
|
|
332
|
+
path: "/governanceRules/{governanceRuleId}",
|
|
333
|
+
method: "DELETE",
|
|
334
|
+
pathParams: pathParams,
|
|
335
|
+
headerParams: headerParams,
|
|
336
|
+
queryParams: queryParams
|
|
337
|
+
});
|
|
338
|
+
try {
|
|
339
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
340
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
341
|
+
responseObject: {},
|
|
342
|
+
responseHeaders: [
|
|
343
|
+
{
|
|
344
|
+
value: response.headers.get("opc-work-request-id"),
|
|
345
|
+
key: "opcWorkRequestId",
|
|
346
|
+
dataType: "string"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
value: response.headers.get("opc-request-id"),
|
|
350
|
+
key: "opcRequestId",
|
|
351
|
+
dataType: "string"
|
|
352
|
+
}
|
|
353
|
+
]
|
|
354
|
+
});
|
|
355
|
+
return sdkResponse;
|
|
356
|
+
}
|
|
357
|
+
catch (err) {
|
|
358
|
+
throw err;
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Delete the specified inclusion criterion.
|
|
364
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
365
|
+
* @param DeleteInclusionCriterionRequest
|
|
366
|
+
* @return DeleteInclusionCriterionResponse
|
|
367
|
+
* @throws OciError when an error occurs
|
|
368
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/DeleteInclusionCriterion.ts.html |here} to see how to use DeleteInclusionCriterion API.
|
|
369
|
+
*/
|
|
370
|
+
deleteInclusionCriterion(deleteInclusionCriterionRequest) {
|
|
371
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
372
|
+
if (this.logger)
|
|
373
|
+
this.logger.debug("Calling operation GovernanceRuleClient#deleteInclusionCriterion.");
|
|
374
|
+
const operationName = "deleteInclusionCriterion";
|
|
375
|
+
const apiReferenceLink = "";
|
|
376
|
+
const pathParams = {
|
|
377
|
+
"{inclusionCriterionId}": deleteInclusionCriterionRequest.inclusionCriterionId
|
|
378
|
+
};
|
|
379
|
+
const queryParams = {};
|
|
380
|
+
let headerParams = {
|
|
381
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
382
|
+
"if-match": deleteInclusionCriterionRequest.ifMatch,
|
|
383
|
+
"opc-request-id": deleteInclusionCriterionRequest.opcRequestId
|
|
384
|
+
};
|
|
385
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
386
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteInclusionCriterionRequest.retryConfiguration, specRetryConfiguration);
|
|
387
|
+
if (this.logger)
|
|
388
|
+
retrier.logger = this.logger;
|
|
389
|
+
const request = yield oci_common_1.composeRequest({
|
|
390
|
+
baseEndpoint: this._endpoint,
|
|
391
|
+
defaultHeaders: this._defaultHeaders,
|
|
392
|
+
path: "/inclusionCriteria/{inclusionCriterionId}",
|
|
393
|
+
method: "DELETE",
|
|
394
|
+
pathParams: pathParams,
|
|
395
|
+
headerParams: headerParams,
|
|
396
|
+
queryParams: queryParams
|
|
397
|
+
});
|
|
398
|
+
try {
|
|
399
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
400
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
401
|
+
responseObject: {},
|
|
402
|
+
responseHeaders: [
|
|
403
|
+
{
|
|
404
|
+
value: response.headers.get("opc-work-request-id"),
|
|
405
|
+
key: "opcWorkRequestId",
|
|
406
|
+
dataType: "string"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
value: response.headers.get("opc-request-id"),
|
|
410
|
+
key: "opcRequestId",
|
|
411
|
+
dataType: "string"
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
});
|
|
415
|
+
return sdkResponse;
|
|
416
|
+
}
|
|
417
|
+
catch (err) {
|
|
418
|
+
throw err;
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Get the specified enforced governance rule's information.
|
|
424
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
425
|
+
* @param GetEnforcedGovernanceRuleRequest
|
|
426
|
+
* @return GetEnforcedGovernanceRuleResponse
|
|
427
|
+
* @throws OciError when an error occurs
|
|
428
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/GetEnforcedGovernanceRule.ts.html |here} to see how to use GetEnforcedGovernanceRule API.
|
|
429
|
+
*/
|
|
430
|
+
getEnforcedGovernanceRule(getEnforcedGovernanceRuleRequest) {
|
|
431
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
432
|
+
if (this.logger)
|
|
433
|
+
this.logger.debug("Calling operation GovernanceRuleClient#getEnforcedGovernanceRule.");
|
|
434
|
+
const operationName = "getEnforcedGovernanceRule";
|
|
435
|
+
const apiReferenceLink = "";
|
|
436
|
+
const pathParams = {
|
|
437
|
+
"{enforcedGovernanceRuleId}": getEnforcedGovernanceRuleRequest.enforcedGovernanceRuleId
|
|
438
|
+
};
|
|
439
|
+
const queryParams = {};
|
|
440
|
+
let headerParams = {
|
|
441
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
442
|
+
"opc-request-id": getEnforcedGovernanceRuleRequest.opcRequestId
|
|
443
|
+
};
|
|
444
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
445
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getEnforcedGovernanceRuleRequest.retryConfiguration, specRetryConfiguration);
|
|
446
|
+
if (this.logger)
|
|
447
|
+
retrier.logger = this.logger;
|
|
448
|
+
const request = yield oci_common_1.composeRequest({
|
|
449
|
+
baseEndpoint: this._endpoint,
|
|
450
|
+
defaultHeaders: this._defaultHeaders,
|
|
451
|
+
path: "/enforcedGovernanceRules/{enforcedGovernanceRuleId}",
|
|
452
|
+
method: "GET",
|
|
453
|
+
pathParams: pathParams,
|
|
454
|
+
headerParams: headerParams,
|
|
455
|
+
queryParams: queryParams
|
|
456
|
+
});
|
|
457
|
+
try {
|
|
458
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
459
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
460
|
+
responseObject: {},
|
|
461
|
+
body: yield response.json(),
|
|
462
|
+
bodyKey: "enforcedGovernanceRule",
|
|
463
|
+
bodyModel: model.EnforcedGovernanceRule,
|
|
464
|
+
type: "model.EnforcedGovernanceRule",
|
|
465
|
+
responseHeaders: [
|
|
466
|
+
{
|
|
467
|
+
value: response.headers.get("etag"),
|
|
468
|
+
key: "etag",
|
|
469
|
+
dataType: "string"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
value: response.headers.get("opc-request-id"),
|
|
473
|
+
key: "opcRequestId",
|
|
474
|
+
dataType: "string"
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
});
|
|
478
|
+
return sdkResponse;
|
|
479
|
+
}
|
|
480
|
+
catch (err) {
|
|
481
|
+
throw err;
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Get the specified governance rule's information.
|
|
487
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
488
|
+
* @param GetGovernanceRuleRequest
|
|
489
|
+
* @return GetGovernanceRuleResponse
|
|
490
|
+
* @throws OciError when an error occurs
|
|
491
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/GetGovernanceRule.ts.html |here} to see how to use GetGovernanceRule API.
|
|
492
|
+
*/
|
|
493
|
+
getGovernanceRule(getGovernanceRuleRequest) {
|
|
494
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
495
|
+
if (this.logger)
|
|
496
|
+
this.logger.debug("Calling operation GovernanceRuleClient#getGovernanceRule.");
|
|
497
|
+
const operationName = "getGovernanceRule";
|
|
498
|
+
const apiReferenceLink = "";
|
|
499
|
+
const pathParams = {
|
|
500
|
+
"{governanceRuleId}": getGovernanceRuleRequest.governanceRuleId
|
|
501
|
+
};
|
|
502
|
+
const queryParams = {};
|
|
503
|
+
let headerParams = {
|
|
504
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
505
|
+
"opc-request-id": getGovernanceRuleRequest.opcRequestId
|
|
506
|
+
};
|
|
507
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
508
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getGovernanceRuleRequest.retryConfiguration, specRetryConfiguration);
|
|
509
|
+
if (this.logger)
|
|
510
|
+
retrier.logger = this.logger;
|
|
511
|
+
const request = yield oci_common_1.composeRequest({
|
|
512
|
+
baseEndpoint: this._endpoint,
|
|
513
|
+
defaultHeaders: this._defaultHeaders,
|
|
514
|
+
path: "/governanceRules/{governanceRuleId}",
|
|
515
|
+
method: "GET",
|
|
516
|
+
pathParams: pathParams,
|
|
517
|
+
headerParams: headerParams,
|
|
518
|
+
queryParams: queryParams
|
|
519
|
+
});
|
|
520
|
+
try {
|
|
521
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
522
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
523
|
+
responseObject: {},
|
|
524
|
+
body: yield response.json(),
|
|
525
|
+
bodyKey: "governanceRule",
|
|
526
|
+
bodyModel: model.GovernanceRule,
|
|
527
|
+
type: "model.GovernanceRule",
|
|
528
|
+
responseHeaders: [
|
|
529
|
+
{
|
|
530
|
+
value: response.headers.get("etag"),
|
|
531
|
+
key: "etag",
|
|
532
|
+
dataType: "string"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
value: response.headers.get("opc-request-id"),
|
|
536
|
+
key: "opcRequestId",
|
|
537
|
+
dataType: "string"
|
|
538
|
+
}
|
|
539
|
+
]
|
|
540
|
+
});
|
|
541
|
+
return sdkResponse;
|
|
542
|
+
}
|
|
543
|
+
catch (err) {
|
|
544
|
+
throw err;
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Get the specified inclusion criterion's information.
|
|
550
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
551
|
+
* @param GetInclusionCriterionRequest
|
|
552
|
+
* @return GetInclusionCriterionResponse
|
|
553
|
+
* @throws OciError when an error occurs
|
|
554
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/GetInclusionCriterion.ts.html |here} to see how to use GetInclusionCriterion API.
|
|
555
|
+
*/
|
|
556
|
+
getInclusionCriterion(getInclusionCriterionRequest) {
|
|
557
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
558
|
+
if (this.logger)
|
|
559
|
+
this.logger.debug("Calling operation GovernanceRuleClient#getInclusionCriterion.");
|
|
560
|
+
const operationName = "getInclusionCriterion";
|
|
561
|
+
const apiReferenceLink = "";
|
|
562
|
+
const pathParams = {
|
|
563
|
+
"{inclusionCriterionId}": getInclusionCriterionRequest.inclusionCriterionId
|
|
564
|
+
};
|
|
565
|
+
const queryParams = {};
|
|
566
|
+
let headerParams = {
|
|
567
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
568
|
+
"opc-request-id": getInclusionCriterionRequest.opcRequestId
|
|
569
|
+
};
|
|
570
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
571
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getInclusionCriterionRequest.retryConfiguration, specRetryConfiguration);
|
|
572
|
+
if (this.logger)
|
|
573
|
+
retrier.logger = this.logger;
|
|
574
|
+
const request = yield oci_common_1.composeRequest({
|
|
575
|
+
baseEndpoint: this._endpoint,
|
|
576
|
+
defaultHeaders: this._defaultHeaders,
|
|
577
|
+
path: "/inclusionCriteria/{inclusionCriterionId}",
|
|
578
|
+
method: "GET",
|
|
579
|
+
pathParams: pathParams,
|
|
580
|
+
headerParams: headerParams,
|
|
581
|
+
queryParams: queryParams
|
|
582
|
+
});
|
|
583
|
+
try {
|
|
584
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
585
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
586
|
+
responseObject: {},
|
|
587
|
+
body: yield response.json(),
|
|
588
|
+
bodyKey: "inclusionCriterion",
|
|
589
|
+
bodyModel: model.InclusionCriterion,
|
|
590
|
+
type: "model.InclusionCriterion",
|
|
591
|
+
responseHeaders: [
|
|
592
|
+
{
|
|
593
|
+
value: response.headers.get("etag"),
|
|
594
|
+
key: "etag",
|
|
595
|
+
dataType: "string"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
value: response.headers.get("opc-request-id"),
|
|
599
|
+
key: "opcRequestId",
|
|
600
|
+
dataType: "string"
|
|
601
|
+
}
|
|
602
|
+
]
|
|
603
|
+
});
|
|
604
|
+
return sdkResponse;
|
|
605
|
+
}
|
|
606
|
+
catch (err) {
|
|
607
|
+
throw err;
|
|
608
|
+
}
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Get the specified tenancy attachment's information.
|
|
613
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
614
|
+
* @param GetTenancyAttachmentRequest
|
|
615
|
+
* @return GetTenancyAttachmentResponse
|
|
616
|
+
* @throws OciError when an error occurs
|
|
617
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/GetTenancyAttachment.ts.html |here} to see how to use GetTenancyAttachment API.
|
|
618
|
+
*/
|
|
619
|
+
getTenancyAttachment(getTenancyAttachmentRequest) {
|
|
620
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
621
|
+
if (this.logger)
|
|
622
|
+
this.logger.debug("Calling operation GovernanceRuleClient#getTenancyAttachment.");
|
|
623
|
+
const operationName = "getTenancyAttachment";
|
|
624
|
+
const apiReferenceLink = "";
|
|
625
|
+
const pathParams = {
|
|
626
|
+
"{tenancyAttachmentId}": getTenancyAttachmentRequest.tenancyAttachmentId
|
|
627
|
+
};
|
|
628
|
+
const queryParams = {};
|
|
629
|
+
let headerParams = {
|
|
630
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
631
|
+
"opc-request-id": getTenancyAttachmentRequest.opcRequestId
|
|
632
|
+
};
|
|
633
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
634
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getTenancyAttachmentRequest.retryConfiguration, specRetryConfiguration);
|
|
635
|
+
if (this.logger)
|
|
636
|
+
retrier.logger = this.logger;
|
|
637
|
+
const request = yield oci_common_1.composeRequest({
|
|
638
|
+
baseEndpoint: this._endpoint,
|
|
639
|
+
defaultHeaders: this._defaultHeaders,
|
|
640
|
+
path: "/tenancyAttachments/{tenancyAttachmentId}",
|
|
641
|
+
method: "GET",
|
|
642
|
+
pathParams: pathParams,
|
|
643
|
+
headerParams: headerParams,
|
|
644
|
+
queryParams: queryParams
|
|
645
|
+
});
|
|
646
|
+
try {
|
|
647
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
648
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
649
|
+
responseObject: {},
|
|
650
|
+
body: yield response.json(),
|
|
651
|
+
bodyKey: "tenancyAttachment",
|
|
652
|
+
bodyModel: model.TenancyAttachment,
|
|
653
|
+
type: "model.TenancyAttachment",
|
|
654
|
+
responseHeaders: [
|
|
655
|
+
{
|
|
656
|
+
value: response.headers.get("etag"),
|
|
657
|
+
key: "etag",
|
|
658
|
+
dataType: "string"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
value: response.headers.get("opc-request-id"),
|
|
662
|
+
key: "opcRequestId",
|
|
663
|
+
dataType: "string"
|
|
664
|
+
}
|
|
665
|
+
]
|
|
666
|
+
});
|
|
667
|
+
return sdkResponse;
|
|
668
|
+
}
|
|
669
|
+
catch (err) {
|
|
670
|
+
throw err;
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* List enforced governance rules. Either compartment id or enforced governance rule id must be supplied.
|
|
676
|
+
* An optional governance rule type or a display name can also be supplied.
|
|
677
|
+
*
|
|
678
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
679
|
+
* @param ListEnforcedGovernanceRulesRequest
|
|
680
|
+
* @return ListEnforcedGovernanceRulesResponse
|
|
681
|
+
* @throws OciError when an error occurs
|
|
682
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/ListEnforcedGovernanceRules.ts.html |here} to see how to use ListEnforcedGovernanceRules API.
|
|
683
|
+
*/
|
|
684
|
+
listEnforcedGovernanceRules(listEnforcedGovernanceRulesRequest) {
|
|
685
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
686
|
+
if (this.logger)
|
|
687
|
+
this.logger.debug("Calling operation GovernanceRuleClient#listEnforcedGovernanceRules.");
|
|
688
|
+
const operationName = "listEnforcedGovernanceRules";
|
|
689
|
+
const apiReferenceLink = "";
|
|
690
|
+
const pathParams = {};
|
|
691
|
+
const queryParams = {
|
|
692
|
+
"compartmentId": listEnforcedGovernanceRulesRequest.compartmentId,
|
|
693
|
+
"enforcedGovernanceRuleId": listEnforcedGovernanceRulesRequest.enforcedGovernanceRuleId,
|
|
694
|
+
"governanceRuleType": listEnforcedGovernanceRulesRequest.governanceRuleType,
|
|
695
|
+
"displayName": listEnforcedGovernanceRulesRequest.displayName,
|
|
696
|
+
"limit": listEnforcedGovernanceRulesRequest.limit,
|
|
697
|
+
"page": listEnforcedGovernanceRulesRequest.page,
|
|
698
|
+
"sortOrder": listEnforcedGovernanceRulesRequest.sortOrder,
|
|
699
|
+
"sortBy": listEnforcedGovernanceRulesRequest.sortBy
|
|
700
|
+
};
|
|
701
|
+
let headerParams = {
|
|
702
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
703
|
+
"opc-request-id": listEnforcedGovernanceRulesRequest.opcRequestId
|
|
704
|
+
};
|
|
705
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
706
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listEnforcedGovernanceRulesRequest.retryConfiguration, specRetryConfiguration);
|
|
707
|
+
if (this.logger)
|
|
708
|
+
retrier.logger = this.logger;
|
|
709
|
+
const request = yield oci_common_1.composeRequest({
|
|
710
|
+
baseEndpoint: this._endpoint,
|
|
711
|
+
defaultHeaders: this._defaultHeaders,
|
|
712
|
+
path: "/enforcedGovernanceRules",
|
|
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: "enforcedGovernanceRuleCollection",
|
|
724
|
+
bodyModel: model.EnforcedGovernanceRuleCollection,
|
|
725
|
+
type: "model.EnforcedGovernanceRuleCollection",
|
|
726
|
+
responseHeaders: [
|
|
727
|
+
{
|
|
728
|
+
value: response.headers.get("opc-request-id"),
|
|
729
|
+
key: "opcRequestId",
|
|
730
|
+
dataType: "string"
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
value: response.headers.get("opc-next-page"),
|
|
734
|
+
key: "opcNextPage",
|
|
735
|
+
dataType: "string"
|
|
736
|
+
}
|
|
737
|
+
]
|
|
738
|
+
});
|
|
739
|
+
return sdkResponse;
|
|
740
|
+
}
|
|
741
|
+
catch (err) {
|
|
742
|
+
throw err;
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* List governance rules. Either compartment id or governance rule id must be supplied.
|
|
748
|
+
* An optional lifecycle state, display name or a governance rule type can also be supplied.
|
|
749
|
+
*
|
|
750
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
751
|
+
* @param ListGovernanceRulesRequest
|
|
752
|
+
* @return ListGovernanceRulesResponse
|
|
753
|
+
* @throws OciError when an error occurs
|
|
754
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/ListGovernanceRules.ts.html |here} to see how to use ListGovernanceRules API.
|
|
755
|
+
*/
|
|
756
|
+
listGovernanceRules(listGovernanceRulesRequest) {
|
|
757
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
758
|
+
if (this.logger)
|
|
759
|
+
this.logger.debug("Calling operation GovernanceRuleClient#listGovernanceRules.");
|
|
760
|
+
const operationName = "listGovernanceRules";
|
|
761
|
+
const apiReferenceLink = "";
|
|
762
|
+
const pathParams = {};
|
|
763
|
+
const queryParams = {
|
|
764
|
+
"compartmentId": listGovernanceRulesRequest.compartmentId,
|
|
765
|
+
"governanceRuleId": listGovernanceRulesRequest.governanceRuleId,
|
|
766
|
+
"lifecycleState": listGovernanceRulesRequest.lifecycleState,
|
|
767
|
+
"displayName": listGovernanceRulesRequest.displayName,
|
|
768
|
+
"governanceRuleType": listGovernanceRulesRequest.governanceRuleType,
|
|
769
|
+
"limit": listGovernanceRulesRequest.limit,
|
|
770
|
+
"page": listGovernanceRulesRequest.page,
|
|
771
|
+
"sortOrder": listGovernanceRulesRequest.sortOrder,
|
|
772
|
+
"sortBy": listGovernanceRulesRequest.sortBy
|
|
773
|
+
};
|
|
774
|
+
let headerParams = {
|
|
775
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
776
|
+
"opc-request-id": listGovernanceRulesRequest.opcRequestId
|
|
777
|
+
};
|
|
778
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
779
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listGovernanceRulesRequest.retryConfiguration, specRetryConfiguration);
|
|
780
|
+
if (this.logger)
|
|
781
|
+
retrier.logger = this.logger;
|
|
782
|
+
const request = yield oci_common_1.composeRequest({
|
|
783
|
+
baseEndpoint: this._endpoint,
|
|
784
|
+
defaultHeaders: this._defaultHeaders,
|
|
785
|
+
path: "/governanceRules",
|
|
786
|
+
method: "GET",
|
|
787
|
+
pathParams: pathParams,
|
|
788
|
+
headerParams: headerParams,
|
|
789
|
+
queryParams: queryParams
|
|
790
|
+
});
|
|
791
|
+
try {
|
|
792
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
793
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
794
|
+
responseObject: {},
|
|
795
|
+
body: yield response.json(),
|
|
796
|
+
bodyKey: "governanceRuleCollection",
|
|
797
|
+
bodyModel: model.GovernanceRuleCollection,
|
|
798
|
+
type: "model.GovernanceRuleCollection",
|
|
799
|
+
responseHeaders: [
|
|
800
|
+
{
|
|
801
|
+
value: response.headers.get("opc-request-id"),
|
|
802
|
+
key: "opcRequestId",
|
|
803
|
+
dataType: "string"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
value: response.headers.get("opc-next-page"),
|
|
807
|
+
key: "opcNextPage",
|
|
808
|
+
dataType: "string"
|
|
809
|
+
}
|
|
810
|
+
]
|
|
811
|
+
});
|
|
812
|
+
return sdkResponse;
|
|
813
|
+
}
|
|
814
|
+
catch (err) {
|
|
815
|
+
throw err;
|
|
816
|
+
}
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* List inclusion criteria associated with a governance rule. Governance rule id must be supplied.
|
|
821
|
+
* An optional inclusion criterion id or a lifecycle state can also be supplied.
|
|
822
|
+
*
|
|
823
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
824
|
+
* @param ListInclusionCriteriaRequest
|
|
825
|
+
* @return ListInclusionCriteriaResponse
|
|
826
|
+
* @throws OciError when an error occurs
|
|
827
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/ListInclusionCriteria.ts.html |here} to see how to use ListInclusionCriteria API.
|
|
828
|
+
*/
|
|
829
|
+
listInclusionCriteria(listInclusionCriteriaRequest) {
|
|
830
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
831
|
+
if (this.logger)
|
|
832
|
+
this.logger.debug("Calling operation GovernanceRuleClient#listInclusionCriteria.");
|
|
833
|
+
const operationName = "listInclusionCriteria";
|
|
834
|
+
const apiReferenceLink = "";
|
|
835
|
+
const pathParams = {};
|
|
836
|
+
const queryParams = {
|
|
837
|
+
"governanceRuleId": listInclusionCriteriaRequest.governanceRuleId,
|
|
838
|
+
"inclusionCriterionId": listInclusionCriteriaRequest.inclusionCriterionId,
|
|
839
|
+
"lifecycleState": listInclusionCriteriaRequest.lifecycleState,
|
|
840
|
+
"limit": listInclusionCriteriaRequest.limit,
|
|
841
|
+
"page": listInclusionCriteriaRequest.page,
|
|
842
|
+
"sortOrder": listInclusionCriteriaRequest.sortOrder,
|
|
843
|
+
"sortBy": listInclusionCriteriaRequest.sortBy
|
|
844
|
+
};
|
|
845
|
+
let headerParams = {
|
|
846
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
847
|
+
"opc-request-id": listInclusionCriteriaRequest.opcRequestId
|
|
848
|
+
};
|
|
849
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
850
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listInclusionCriteriaRequest.retryConfiguration, specRetryConfiguration);
|
|
851
|
+
if (this.logger)
|
|
852
|
+
retrier.logger = this.logger;
|
|
853
|
+
const request = yield oci_common_1.composeRequest({
|
|
854
|
+
baseEndpoint: this._endpoint,
|
|
855
|
+
defaultHeaders: this._defaultHeaders,
|
|
856
|
+
path: "/inclusionCriteria",
|
|
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: "inclusionCriterionCollection",
|
|
868
|
+
bodyModel: model.InclusionCriterionCollection,
|
|
869
|
+
type: "model.InclusionCriterionCollection",
|
|
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
|
+
* List tenancy attachments. Either compartment id, governance rule id or tenancy attachment id must be supplied.
|
|
892
|
+
* An optional lifecycle state or a child tenancy id can also be supplied.
|
|
893
|
+
*
|
|
894
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
895
|
+
* @param ListTenancyAttachmentsRequest
|
|
896
|
+
* @return ListTenancyAttachmentsResponse
|
|
897
|
+
* @throws OciError when an error occurs
|
|
898
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/ListTenancyAttachments.ts.html |here} to see how to use ListTenancyAttachments API.
|
|
899
|
+
*/
|
|
900
|
+
listTenancyAttachments(listTenancyAttachmentsRequest) {
|
|
901
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
902
|
+
if (this.logger)
|
|
903
|
+
this.logger.debug("Calling operation GovernanceRuleClient#listTenancyAttachments.");
|
|
904
|
+
const operationName = "listTenancyAttachments";
|
|
905
|
+
const apiReferenceLink = "";
|
|
906
|
+
const pathParams = {};
|
|
907
|
+
const queryParams = {
|
|
908
|
+
"compartmentId": listTenancyAttachmentsRequest.compartmentId,
|
|
909
|
+
"tenancyAttachmentId": listTenancyAttachmentsRequest.tenancyAttachmentId,
|
|
910
|
+
"governanceRuleId": listTenancyAttachmentsRequest.governanceRuleId,
|
|
911
|
+
"lifecycleState": listTenancyAttachmentsRequest.lifecycleState,
|
|
912
|
+
"childTenancyId": listTenancyAttachmentsRequest.childTenancyId,
|
|
913
|
+
"limit": listTenancyAttachmentsRequest.limit,
|
|
914
|
+
"page": listTenancyAttachmentsRequest.page,
|
|
915
|
+
"sortOrder": listTenancyAttachmentsRequest.sortOrder,
|
|
916
|
+
"sortBy": listTenancyAttachmentsRequest.sortBy
|
|
917
|
+
};
|
|
918
|
+
let headerParams = {
|
|
919
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
920
|
+
"opc-request-id": listTenancyAttachmentsRequest.opcRequestId
|
|
921
|
+
};
|
|
922
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
923
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listTenancyAttachmentsRequest.retryConfiguration, specRetryConfiguration);
|
|
924
|
+
if (this.logger)
|
|
925
|
+
retrier.logger = this.logger;
|
|
926
|
+
const request = yield oci_common_1.composeRequest({
|
|
927
|
+
baseEndpoint: this._endpoint,
|
|
928
|
+
defaultHeaders: this._defaultHeaders,
|
|
929
|
+
path: "/tenancyAttachments",
|
|
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: "tenancyAttachmentCollection",
|
|
941
|
+
bodyModel: model.TenancyAttachmentCollection,
|
|
942
|
+
type: "model.TenancyAttachmentCollection",
|
|
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
|
+
* Retry the creation of the specified governance rule.
|
|
965
|
+
* Used by the tenancy admins when all the workflow retries have exhausted.
|
|
966
|
+
* When provided, If-Match is checked against ETag values of the resource.
|
|
967
|
+
*
|
|
968
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
969
|
+
* @param RetryGovernanceRuleRequest
|
|
970
|
+
* @return RetryGovernanceRuleResponse
|
|
971
|
+
* @throws OciError when an error occurs
|
|
972
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/RetryGovernanceRule.ts.html |here} to see how to use RetryGovernanceRule API.
|
|
973
|
+
*/
|
|
974
|
+
retryGovernanceRule(retryGovernanceRuleRequest) {
|
|
975
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
976
|
+
if (this.logger)
|
|
977
|
+
this.logger.debug("Calling operation GovernanceRuleClient#retryGovernanceRule.");
|
|
978
|
+
const operationName = "retryGovernanceRule";
|
|
979
|
+
const apiReferenceLink = "";
|
|
980
|
+
const pathParams = {
|
|
981
|
+
"{governanceRuleId}": retryGovernanceRuleRequest.governanceRuleId
|
|
982
|
+
};
|
|
983
|
+
const queryParams = {};
|
|
984
|
+
let headerParams = {
|
|
985
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
986
|
+
"opc-retry-token": retryGovernanceRuleRequest.opcRetryToken,
|
|
987
|
+
"if-match": retryGovernanceRuleRequest.ifMatch,
|
|
988
|
+
"opc-request-id": retryGovernanceRuleRequest.opcRequestId
|
|
989
|
+
};
|
|
990
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
991
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, retryGovernanceRuleRequest.retryConfiguration, specRetryConfiguration);
|
|
992
|
+
if (this.logger)
|
|
993
|
+
retrier.logger = this.logger;
|
|
994
|
+
const request = yield oci_common_1.composeRequest({
|
|
995
|
+
baseEndpoint: this._endpoint,
|
|
996
|
+
defaultHeaders: this._defaultHeaders,
|
|
997
|
+
path: "/governanceRules/{governanceRuleId}/actions/retry",
|
|
998
|
+
method: "POST",
|
|
999
|
+
pathParams: pathParams,
|
|
1000
|
+
headerParams: headerParams,
|
|
1001
|
+
queryParams: queryParams
|
|
1002
|
+
});
|
|
1003
|
+
try {
|
|
1004
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1005
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1006
|
+
responseObject: {},
|
|
1007
|
+
responseHeaders: [
|
|
1008
|
+
{
|
|
1009
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1010
|
+
key: "opcWorkRequestId",
|
|
1011
|
+
dataType: "string"
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
value: response.headers.get("opc-request-id"),
|
|
1015
|
+
key: "opcRequestId",
|
|
1016
|
+
dataType: "string"
|
|
1017
|
+
}
|
|
1018
|
+
]
|
|
1019
|
+
});
|
|
1020
|
+
return sdkResponse;
|
|
1021
|
+
}
|
|
1022
|
+
catch (err) {
|
|
1023
|
+
throw err;
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* Retry governance rule application for the specified tenancy attachment id.
|
|
1029
|
+
* Used by the tenancy admins when all the workflow retries have exhausted.
|
|
1030
|
+
*
|
|
1031
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
1032
|
+
* @param RetryTenancyAttachmentRequest
|
|
1033
|
+
* @return RetryTenancyAttachmentResponse
|
|
1034
|
+
* @throws OciError when an error occurs
|
|
1035
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/RetryTenancyAttachment.ts.html |here} to see how to use RetryTenancyAttachment API.
|
|
1036
|
+
*/
|
|
1037
|
+
retryTenancyAttachment(retryTenancyAttachmentRequest) {
|
|
1038
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1039
|
+
if (this.logger)
|
|
1040
|
+
this.logger.debug("Calling operation GovernanceRuleClient#retryTenancyAttachment.");
|
|
1041
|
+
const operationName = "retryTenancyAttachment";
|
|
1042
|
+
const apiReferenceLink = "";
|
|
1043
|
+
const pathParams = {
|
|
1044
|
+
"{tenancyAttachmentId}": retryTenancyAttachmentRequest.tenancyAttachmentId
|
|
1045
|
+
};
|
|
1046
|
+
const queryParams = {};
|
|
1047
|
+
let headerParams = {
|
|
1048
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1049
|
+
"opc-retry-token": retryTenancyAttachmentRequest.opcRetryToken,
|
|
1050
|
+
"if-match": retryTenancyAttachmentRequest.ifMatch,
|
|
1051
|
+
"opc-request-id": retryTenancyAttachmentRequest.opcRequestId
|
|
1052
|
+
};
|
|
1053
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
1054
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, retryTenancyAttachmentRequest.retryConfiguration, specRetryConfiguration);
|
|
1055
|
+
if (this.logger)
|
|
1056
|
+
retrier.logger = this.logger;
|
|
1057
|
+
const request = yield oci_common_1.composeRequest({
|
|
1058
|
+
baseEndpoint: this._endpoint,
|
|
1059
|
+
defaultHeaders: this._defaultHeaders,
|
|
1060
|
+
path: "/tenancyAttachments/{tenancyAttachmentId}/actions/retry",
|
|
1061
|
+
method: "POST",
|
|
1062
|
+
pathParams: pathParams,
|
|
1063
|
+
headerParams: headerParams,
|
|
1064
|
+
queryParams: queryParams
|
|
1065
|
+
});
|
|
1066
|
+
try {
|
|
1067
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1068
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1069
|
+
responseObject: {},
|
|
1070
|
+
responseHeaders: [
|
|
1071
|
+
{
|
|
1072
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1073
|
+
key: "opcWorkRequestId",
|
|
1074
|
+
dataType: "string"
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
value: response.headers.get("opc-request-id"),
|
|
1078
|
+
key: "opcRequestId",
|
|
1079
|
+
dataType: "string"
|
|
1080
|
+
}
|
|
1081
|
+
]
|
|
1082
|
+
});
|
|
1083
|
+
return sdkResponse;
|
|
1084
|
+
}
|
|
1085
|
+
catch (err) {
|
|
1086
|
+
throw err;
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* Update the specified governance rule.
|
|
1092
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
1093
|
+
* @param UpdateGovernanceRuleRequest
|
|
1094
|
+
* @return UpdateGovernanceRuleResponse
|
|
1095
|
+
* @throws OciError when an error occurs
|
|
1096
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/UpdateGovernanceRule.ts.html |here} to see how to use UpdateGovernanceRule API.
|
|
1097
|
+
*/
|
|
1098
|
+
updateGovernanceRule(updateGovernanceRuleRequest) {
|
|
1099
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1100
|
+
if (this.logger)
|
|
1101
|
+
this.logger.debug("Calling operation GovernanceRuleClient#updateGovernanceRule.");
|
|
1102
|
+
const operationName = "updateGovernanceRule";
|
|
1103
|
+
const apiReferenceLink = "";
|
|
1104
|
+
const pathParams = {
|
|
1105
|
+
"{governanceRuleId}": updateGovernanceRuleRequest.governanceRuleId
|
|
1106
|
+
};
|
|
1107
|
+
const queryParams = {};
|
|
1108
|
+
let headerParams = {
|
|
1109
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1110
|
+
"if-match": updateGovernanceRuleRequest.ifMatch,
|
|
1111
|
+
"opc-request-id": updateGovernanceRuleRequest.opcRequestId
|
|
1112
|
+
};
|
|
1113
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
1114
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateGovernanceRuleRequest.retryConfiguration, specRetryConfiguration);
|
|
1115
|
+
if (this.logger)
|
|
1116
|
+
retrier.logger = this.logger;
|
|
1117
|
+
const request = yield oci_common_1.composeRequest({
|
|
1118
|
+
baseEndpoint: this._endpoint,
|
|
1119
|
+
defaultHeaders: this._defaultHeaders,
|
|
1120
|
+
path: "/governanceRules/{governanceRuleId}",
|
|
1121
|
+
method: "PUT",
|
|
1122
|
+
bodyContent: common.ObjectSerializer.serialize(updateGovernanceRuleRequest.updateGovernanceRuleDetails, "UpdateGovernanceRuleDetails", model.UpdateGovernanceRuleDetails.getJsonObj),
|
|
1123
|
+
pathParams: pathParams,
|
|
1124
|
+
headerParams: headerParams,
|
|
1125
|
+
queryParams: queryParams
|
|
1126
|
+
});
|
|
1127
|
+
try {
|
|
1128
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1129
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1130
|
+
responseObject: {},
|
|
1131
|
+
responseHeaders: [
|
|
1132
|
+
{
|
|
1133
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1134
|
+
key: "opcWorkRequestId",
|
|
1135
|
+
dataType: "string"
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
value: response.headers.get("opc-request-id"),
|
|
1139
|
+
key: "opcRequestId",
|
|
1140
|
+
dataType: "string"
|
|
1141
|
+
}
|
|
1142
|
+
]
|
|
1143
|
+
});
|
|
1144
|
+
return sdkResponse;
|
|
1145
|
+
}
|
|
1146
|
+
catch (err) {
|
|
1147
|
+
throw err;
|
|
1148
|
+
}
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
exports.GovernanceRuleClient = GovernanceRuleClient;
|
|
1153
|
+
GovernanceRuleClient.serviceEndpointTemplate = "https://governance-rules.organizations.{region}.oci.{secondLevelDomain}";
|
|
1154
|
+
GovernanceRuleClient.endpointServiceName = "";
|
|
1155
|
+
var WorkRequestApiKeys;
|
|
1156
|
+
(function (WorkRequestApiKeys) {
|
|
1157
|
+
})(WorkRequestApiKeys = exports.WorkRequestApiKeys || (exports.WorkRequestApiKeys = {}));
|
|
1158
|
+
/**
|
|
1159
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
1160
|
+
*/
|
|
1161
|
+
class WorkRequestClient {
|
|
1162
|
+
constructor(params, clientConfiguration) {
|
|
1163
|
+
this["_endpoint"] = "";
|
|
1164
|
+
this["_defaultHeaders"] = {};
|
|
1165
|
+
this._circuitBreaker = null;
|
|
1166
|
+
this._httpOptions = undefined;
|
|
1167
|
+
this.targetService = "WorkRequest";
|
|
1168
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
1169
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
1170
|
+
: null;
|
|
1171
|
+
if (clientConfiguration) {
|
|
1172
|
+
this._clientConfiguration = clientConfiguration;
|
|
1173
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
1174
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
1175
|
+
: null;
|
|
1176
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
1177
|
+
? clientConfiguration.httpOptions
|
|
1178
|
+
: undefined;
|
|
1179
|
+
}
|
|
1180
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
1181
|
+
const specCircuitBreakerEnabled = true;
|
|
1182
|
+
if (!this._circuitBreaker &&
|
|
1183
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
1184
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
1185
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
1186
|
+
}
|
|
1187
|
+
this._httpClient =
|
|
1188
|
+
params.httpClient ||
|
|
1189
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
|
|
1190
|
+
if (params.authenticationDetailsProvider &&
|
|
1191
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
1192
|
+
const provider = params.authenticationDetailsProvider;
|
|
1193
|
+
if (provider.getRegion()) {
|
|
1194
|
+
this.region = provider.getRegion();
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
1200
|
+
*/
|
|
1201
|
+
get endpoint() {
|
|
1202
|
+
return this._endpoint;
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
1206
|
+
* @param endpoint The endpoint of the service.
|
|
1207
|
+
*/
|
|
1208
|
+
set endpoint(endpoint) {
|
|
1209
|
+
this._endpoint = endpoint;
|
|
1210
|
+
this._endpoint = this._endpoint + "/20220504";
|
|
1211
|
+
if (this.logger)
|
|
1212
|
+
this.logger.info(`WorkRequestClient endpoint set to ${this._endpoint}`);
|
|
1213
|
+
}
|
|
1214
|
+
get logger() {
|
|
1215
|
+
return common.LOG.logger;
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
1219
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
1220
|
+
* @param region The region of the service.
|
|
1221
|
+
*/
|
|
1222
|
+
set region(region) {
|
|
1223
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(WorkRequestClient.serviceEndpointTemplate, region, WorkRequestClient.endpointServiceName);
|
|
1224
|
+
}
|
|
1225
|
+
/**
|
|
1226
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
1227
|
+
*
|
|
1228
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
1229
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
1230
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
1231
|
+
* @param regionId The public region ID.
|
|
1232
|
+
*/
|
|
1233
|
+
set regionId(regionId) {
|
|
1234
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(WorkRequestClient.serviceEndpointTemplate, regionId, WorkRequestClient.endpointServiceName);
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* Creates a new WorkRequestWaiter for resources for this service.
|
|
1238
|
+
*
|
|
1239
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
1240
|
+
* @return The service waiters.
|
|
1241
|
+
*/
|
|
1242
|
+
createWaiters(config) {
|
|
1243
|
+
this._waiters = new workrequest_waiter_1.WorkRequestWaiter(this, config);
|
|
1244
|
+
return this._waiters;
|
|
1245
|
+
}
|
|
1246
|
+
/**
|
|
1247
|
+
* Gets the waiters available for resources for this service.
|
|
1248
|
+
*
|
|
1249
|
+
* @return The service waiters.
|
|
1250
|
+
*/
|
|
1251
|
+
getWaiters() {
|
|
1252
|
+
if (this._waiters) {
|
|
1253
|
+
return this._waiters;
|
|
1254
|
+
}
|
|
1255
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* Cancels the work request with the given ID.
|
|
1259
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
1260
|
+
* @param CancelWorkRequestRequest
|
|
1261
|
+
* @return CancelWorkRequestResponse
|
|
1262
|
+
* @throws OciError when an error occurs
|
|
1263
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/CancelWorkRequest.ts.html |here} to see how to use CancelWorkRequest API.
|
|
1264
|
+
*/
|
|
1265
|
+
cancelWorkRequest(cancelWorkRequestRequest) {
|
|
1266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1267
|
+
if (this.logger)
|
|
1268
|
+
this.logger.debug("Calling operation WorkRequestClient#cancelWorkRequest.");
|
|
1269
|
+
const operationName = "cancelWorkRequest";
|
|
1270
|
+
const apiReferenceLink = "";
|
|
1271
|
+
const pathParams = {
|
|
1272
|
+
"{workRequestId}": cancelWorkRequestRequest.workRequestId
|
|
1273
|
+
};
|
|
1274
|
+
const queryParams = {};
|
|
1275
|
+
let headerParams = {
|
|
1276
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1277
|
+
"if-match": cancelWorkRequestRequest.ifMatch,
|
|
1278
|
+
"opc-request-id": cancelWorkRequestRequest.opcRequestId
|
|
1279
|
+
};
|
|
1280
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
1281
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
1282
|
+
if (this.logger)
|
|
1283
|
+
retrier.logger = this.logger;
|
|
1284
|
+
const request = yield oci_common_1.composeRequest({
|
|
1285
|
+
baseEndpoint: this._endpoint,
|
|
1286
|
+
defaultHeaders: this._defaultHeaders,
|
|
1287
|
+
path: "/workRequests/{workRequestId}",
|
|
1288
|
+
method: "DELETE",
|
|
1289
|
+
pathParams: pathParams,
|
|
1290
|
+
headerParams: headerParams,
|
|
1291
|
+
queryParams: queryParams
|
|
1292
|
+
});
|
|
1293
|
+
try {
|
|
1294
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1295
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1296
|
+
responseObject: {},
|
|
1297
|
+
responseHeaders: [
|
|
1298
|
+
{
|
|
1299
|
+
value: response.headers.get("opc-request-id"),
|
|
1300
|
+
key: "opcRequestId",
|
|
1301
|
+
dataType: "string"
|
|
1302
|
+
}
|
|
1303
|
+
]
|
|
1304
|
+
});
|
|
1305
|
+
return sdkResponse;
|
|
1306
|
+
}
|
|
1307
|
+
catch (err) {
|
|
1308
|
+
throw err;
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* Gets details of the work request with the given ID.
|
|
1314
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
1315
|
+
* @param GetWorkRequestRequest
|
|
1316
|
+
* @return GetWorkRequestResponse
|
|
1317
|
+
* @throws OciError when an error occurs
|
|
1318
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
|
|
1319
|
+
*/
|
|
1320
|
+
getWorkRequest(getWorkRequestRequest) {
|
|
1321
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1322
|
+
if (this.logger)
|
|
1323
|
+
this.logger.debug("Calling operation WorkRequestClient#getWorkRequest.");
|
|
1324
|
+
const operationName = "getWorkRequest";
|
|
1325
|
+
const apiReferenceLink = "";
|
|
1326
|
+
const pathParams = {
|
|
1327
|
+
"{workRequestId}": getWorkRequestRequest.workRequestId
|
|
1328
|
+
};
|
|
1329
|
+
const queryParams = {};
|
|
1330
|
+
let headerParams = {
|
|
1331
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1332
|
+
"opc-request-id": getWorkRequestRequest.opcRequestId
|
|
1333
|
+
};
|
|
1334
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
1335
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
1336
|
+
if (this.logger)
|
|
1337
|
+
retrier.logger = this.logger;
|
|
1338
|
+
const request = yield oci_common_1.composeRequest({
|
|
1339
|
+
baseEndpoint: this._endpoint,
|
|
1340
|
+
defaultHeaders: this._defaultHeaders,
|
|
1341
|
+
path: "/workRequests/{workRequestId}",
|
|
1342
|
+
method: "GET",
|
|
1343
|
+
pathParams: pathParams,
|
|
1344
|
+
headerParams: headerParams,
|
|
1345
|
+
queryParams: queryParams
|
|
1346
|
+
});
|
|
1347
|
+
try {
|
|
1348
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1349
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1350
|
+
responseObject: {},
|
|
1351
|
+
body: yield response.json(),
|
|
1352
|
+
bodyKey: "workRequest",
|
|
1353
|
+
bodyModel: model.WorkRequest,
|
|
1354
|
+
type: "model.WorkRequest",
|
|
1355
|
+
responseHeaders: [
|
|
1356
|
+
{
|
|
1357
|
+
value: response.headers.get("etag"),
|
|
1358
|
+
key: "etag",
|
|
1359
|
+
dataType: "string"
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
value: response.headers.get("opc-request-id"),
|
|
1363
|
+
key: "opcRequestId",
|
|
1364
|
+
dataType: "string"
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
value: response.headers.get("retry-after"),
|
|
1368
|
+
key: "retryAfter",
|
|
1369
|
+
dataType: "number"
|
|
1370
|
+
}
|
|
1371
|
+
]
|
|
1372
|
+
});
|
|
1373
|
+
return sdkResponse;
|
|
1374
|
+
}
|
|
1375
|
+
catch (err) {
|
|
1376
|
+
throw err;
|
|
1377
|
+
}
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* Returns a (paginated) list of errors for the work request with the given ID.
|
|
1382
|
+
*
|
|
1383
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
1384
|
+
* @param ListWorkRequestErrorsRequest
|
|
1385
|
+
* @return ListWorkRequestErrorsResponse
|
|
1386
|
+
* @throws OciError when an error occurs
|
|
1387
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
|
|
1388
|
+
*/
|
|
1389
|
+
listWorkRequestErrors(listWorkRequestErrorsRequest) {
|
|
1390
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1391
|
+
if (this.logger)
|
|
1392
|
+
this.logger.debug("Calling operation WorkRequestClient#listWorkRequestErrors.");
|
|
1393
|
+
const operationName = "listWorkRequestErrors";
|
|
1394
|
+
const apiReferenceLink = "";
|
|
1395
|
+
const pathParams = {
|
|
1396
|
+
"{workRequestId}": listWorkRequestErrorsRequest.workRequestId
|
|
1397
|
+
};
|
|
1398
|
+
const queryParams = {
|
|
1399
|
+
"page": listWorkRequestErrorsRequest.page,
|
|
1400
|
+
"limit": listWorkRequestErrorsRequest.limit,
|
|
1401
|
+
"sortBy": listWorkRequestErrorsRequest.sortBy,
|
|
1402
|
+
"sortOrder": listWorkRequestErrorsRequest.sortOrder
|
|
1403
|
+
};
|
|
1404
|
+
let headerParams = {
|
|
1405
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1406
|
+
"opc-request-id": listWorkRequestErrorsRequest.opcRequestId
|
|
1407
|
+
};
|
|
1408
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
1409
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
|
|
1410
|
+
if (this.logger)
|
|
1411
|
+
retrier.logger = this.logger;
|
|
1412
|
+
const request = yield oci_common_1.composeRequest({
|
|
1413
|
+
baseEndpoint: this._endpoint,
|
|
1414
|
+
defaultHeaders: this._defaultHeaders,
|
|
1415
|
+
path: "/workRequests/{workRequestId}/errors",
|
|
1416
|
+
method: "GET",
|
|
1417
|
+
pathParams: pathParams,
|
|
1418
|
+
headerParams: headerParams,
|
|
1419
|
+
queryParams: queryParams
|
|
1420
|
+
});
|
|
1421
|
+
try {
|
|
1422
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1423
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1424
|
+
responseObject: {},
|
|
1425
|
+
body: yield response.json(),
|
|
1426
|
+
bodyKey: "workRequestErrorCollection",
|
|
1427
|
+
bodyModel: model.WorkRequestErrorCollection,
|
|
1428
|
+
type: "model.WorkRequestErrorCollection",
|
|
1429
|
+
responseHeaders: [
|
|
1430
|
+
{
|
|
1431
|
+
value: response.headers.get("opc-next-page"),
|
|
1432
|
+
key: "opcNextPage",
|
|
1433
|
+
dataType: "string"
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
value: response.headers.get("opc-request-id"),
|
|
1437
|
+
key: "opcRequestId",
|
|
1438
|
+
dataType: "string"
|
|
1439
|
+
}
|
|
1440
|
+
]
|
|
1441
|
+
});
|
|
1442
|
+
return sdkResponse;
|
|
1443
|
+
}
|
|
1444
|
+
catch (err) {
|
|
1445
|
+
throw err;
|
|
1446
|
+
}
|
|
1447
|
+
});
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* Returns a (paginated) list of logs for the work request with the given ID.
|
|
1451
|
+
*
|
|
1452
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
1453
|
+
* @param ListWorkRequestLogsRequest
|
|
1454
|
+
* @return ListWorkRequestLogsResponse
|
|
1455
|
+
* @throws OciError when an error occurs
|
|
1456
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
|
|
1457
|
+
*/
|
|
1458
|
+
listWorkRequestLogs(listWorkRequestLogsRequest) {
|
|
1459
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1460
|
+
if (this.logger)
|
|
1461
|
+
this.logger.debug("Calling operation WorkRequestClient#listWorkRequestLogs.");
|
|
1462
|
+
const operationName = "listWorkRequestLogs";
|
|
1463
|
+
const apiReferenceLink = "";
|
|
1464
|
+
const pathParams = {
|
|
1465
|
+
"{workRequestId}": listWorkRequestLogsRequest.workRequestId
|
|
1466
|
+
};
|
|
1467
|
+
const queryParams = {
|
|
1468
|
+
"page": listWorkRequestLogsRequest.page,
|
|
1469
|
+
"limit": listWorkRequestLogsRequest.limit,
|
|
1470
|
+
"sortBy": listWorkRequestLogsRequest.sortBy,
|
|
1471
|
+
"sortOrder": listWorkRequestLogsRequest.sortOrder
|
|
1472
|
+
};
|
|
1473
|
+
let headerParams = {
|
|
1474
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1475
|
+
"opc-request-id": listWorkRequestLogsRequest.opcRequestId
|
|
1476
|
+
};
|
|
1477
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
1478
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
|
|
1479
|
+
if (this.logger)
|
|
1480
|
+
retrier.logger = this.logger;
|
|
1481
|
+
const request = yield oci_common_1.composeRequest({
|
|
1482
|
+
baseEndpoint: this._endpoint,
|
|
1483
|
+
defaultHeaders: this._defaultHeaders,
|
|
1484
|
+
path: "/workRequests/{workRequestId}/logs",
|
|
1485
|
+
method: "GET",
|
|
1486
|
+
pathParams: pathParams,
|
|
1487
|
+
headerParams: headerParams,
|
|
1488
|
+
queryParams: queryParams
|
|
1489
|
+
});
|
|
1490
|
+
try {
|
|
1491
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1492
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1493
|
+
responseObject: {},
|
|
1494
|
+
body: yield response.json(),
|
|
1495
|
+
bodyKey: "workRequestLogEntryCollection",
|
|
1496
|
+
bodyModel: model.WorkRequestLogEntryCollection,
|
|
1497
|
+
type: "model.WorkRequestLogEntryCollection",
|
|
1498
|
+
responseHeaders: [
|
|
1499
|
+
{
|
|
1500
|
+
value: response.headers.get("opc-next-page"),
|
|
1501
|
+
key: "opcNextPage",
|
|
1502
|
+
dataType: "string"
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
value: response.headers.get("opc-request-id"),
|
|
1506
|
+
key: "opcRequestId",
|
|
1507
|
+
dataType: "string"
|
|
1508
|
+
}
|
|
1509
|
+
]
|
|
1510
|
+
});
|
|
1511
|
+
return sdkResponse;
|
|
1512
|
+
}
|
|
1513
|
+
catch (err) {
|
|
1514
|
+
throw err;
|
|
1515
|
+
}
|
|
1516
|
+
});
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* Lists the work requests in a compartment.
|
|
1520
|
+
*
|
|
1521
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
1522
|
+
* @param ListWorkRequestsRequest
|
|
1523
|
+
* @return ListWorkRequestsResponse
|
|
1524
|
+
* @throws OciError when an error occurs
|
|
1525
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.31.0/governancerulescontrolplane/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
|
|
1526
|
+
*/
|
|
1527
|
+
listWorkRequests(listWorkRequestsRequest) {
|
|
1528
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1529
|
+
if (this.logger)
|
|
1530
|
+
this.logger.debug("Calling operation WorkRequestClient#listWorkRequests.");
|
|
1531
|
+
const operationName = "listWorkRequests";
|
|
1532
|
+
const apiReferenceLink = "";
|
|
1533
|
+
const pathParams = {};
|
|
1534
|
+
const queryParams = {
|
|
1535
|
+
"compartmentId": listWorkRequestsRequest.compartmentId,
|
|
1536
|
+
"workRequestId": listWorkRequestsRequest.workRequestId,
|
|
1537
|
+
"status": listWorkRequestsRequest.status,
|
|
1538
|
+
"resourceId": listWorkRequestsRequest.resourceId,
|
|
1539
|
+
"page": listWorkRequestsRequest.page,
|
|
1540
|
+
"limit": listWorkRequestsRequest.limit,
|
|
1541
|
+
"sortOrder": listWorkRequestsRequest.sortOrder,
|
|
1542
|
+
"sortBy": listWorkRequestsRequest.sortBy
|
|
1543
|
+
};
|
|
1544
|
+
let headerParams = {
|
|
1545
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1546
|
+
"opc-request-id": listWorkRequestsRequest.opcRequestId
|
|
1547
|
+
};
|
|
1548
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
1549
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
|
|
1550
|
+
if (this.logger)
|
|
1551
|
+
retrier.logger = this.logger;
|
|
1552
|
+
const request = yield oci_common_1.composeRequest({
|
|
1553
|
+
baseEndpoint: this._endpoint,
|
|
1554
|
+
defaultHeaders: this._defaultHeaders,
|
|
1555
|
+
path: "/workRequests",
|
|
1556
|
+
method: "GET",
|
|
1557
|
+
pathParams: pathParams,
|
|
1558
|
+
headerParams: headerParams,
|
|
1559
|
+
queryParams: queryParams
|
|
1560
|
+
});
|
|
1561
|
+
try {
|
|
1562
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1563
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1564
|
+
responseObject: {},
|
|
1565
|
+
body: yield response.json(),
|
|
1566
|
+
bodyKey: "workRequestSummaryCollection",
|
|
1567
|
+
bodyModel: model.WorkRequestSummaryCollection,
|
|
1568
|
+
type: "model.WorkRequestSummaryCollection",
|
|
1569
|
+
responseHeaders: [
|
|
1570
|
+
{
|
|
1571
|
+
value: response.headers.get("opc-request-id"),
|
|
1572
|
+
key: "opcRequestId",
|
|
1573
|
+
dataType: "string"
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
value: response.headers.get("opc-next-page"),
|
|
1577
|
+
key: "opcNextPage",
|
|
1578
|
+
dataType: "string"
|
|
1579
|
+
}
|
|
1580
|
+
]
|
|
1581
|
+
});
|
|
1582
|
+
return sdkResponse;
|
|
1583
|
+
}
|
|
1584
|
+
catch (err) {
|
|
1585
|
+
throw err;
|
|
1586
|
+
}
|
|
1587
|
+
});
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
exports.WorkRequestClient = WorkRequestClient;
|
|
1591
|
+
WorkRequestClient.serviceEndpointTemplate = "https://governance-rules.organizations.{region}.oci.{secondLevelDomain}";
|
|
1592
|
+
WorkRequestClient.endpointServiceName = "";
|
|
1593
|
+
//# sourceMappingURL=client.js.map
|