@huaweicloud/huaweicloud-sdk-cbr 3.1.84 → 3.1.86
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +2 -2
- package/v1/CbrClient.d.ts +159 -0
- package/v1/CbrClient.d.ts.map +1 -1
- package/v1/CbrClient.js +304 -0
- package/v1/CbrClient.js.map +1 -1
- package/v1/model/BackupExtendInfo.d.ts +0 -2
- package/v1/model/BackupExtendInfo.d.ts.map +1 -1
- package/v1/model/BackupExtendInfo.js +0 -4
- package/v1/model/BackupExtendInfo.js.map +1 -1
- package/v1/model/BackupResp.d.ts +2 -0
- package/v1/model/BackupResp.d.ts.map +1 -1
- package/v1/model/BackupResp.js +4 -0
- package/v1/model/BackupResp.js.map +1 -1
- package/v1/model/CreateOrganizationPolicyRequest.d.ts +7 -0
- package/v1/model/CreateOrganizationPolicyRequest.d.ts.map +1 -0
- package/v1/model/CreateOrganizationPolicyRequest.js +13 -0
- package/v1/model/CreateOrganizationPolicyRequest.js.map +1 -0
- package/v1/model/CreateOrganizationPolicyResponse.d.ts +8 -0
- package/v1/model/CreateOrganizationPolicyResponse.d.ts.map +1 -0
- package/v1/model/CreateOrganizationPolicyResponse.js +15 -0
- package/v1/model/CreateOrganizationPolicyResponse.js.map +1 -0
- package/v1/model/DeleteOrganizationPolicyRequest.d.ts +8 -0
- package/v1/model/DeleteOrganizationPolicyRequest.d.ts.map +1 -0
- package/v1/model/DeleteOrganizationPolicyRequest.js +20 -0
- package/v1/model/DeleteOrganizationPolicyRequest.js.map +1 -0
- package/v1/model/DeleteOrganizationPolicyResponse.d.ts +5 -0
- package/v1/model/DeleteOrganizationPolicyResponse.d.ts.map +1 -0
- package/v1/model/DeleteOrganizationPolicyResponse.js +11 -0
- package/v1/model/DeleteOrganizationPolicyResponse.js.map +1 -0
- package/v1/model/ListExternalVaultResponse.d.ts +0 -4
- package/v1/model/ListExternalVaultResponse.d.ts.map +1 -1
- package/v1/model/ListExternalVaultResponse.js +0 -10
- package/v1/model/ListExternalVaultResponse.js.map +1 -1
- package/v1/model/ListOrganizationPoliciesRequest.d.ts +8 -0
- package/v1/model/ListOrganizationPoliciesRequest.d.ts.map +1 -0
- package/v1/model/ListOrganizationPoliciesRequest.js +20 -0
- package/v1/model/ListOrganizationPoliciesRequest.js.map +1 -0
- package/v1/model/ListOrganizationPoliciesResponse.d.ts +14 -0
- package/v1/model/ListOrganizationPoliciesResponse.d.ts.map +1 -0
- package/v1/model/ListOrganizationPoliciesResponse.js +27 -0
- package/v1/model/ListOrganizationPoliciesResponse.js.map +1 -0
- package/v1/model/ListOrganizationPolicyDetailRequest.d.ts +8 -0
- package/v1/model/ListOrganizationPolicyDetailRequest.d.ts.map +1 -0
- package/v1/model/ListOrganizationPolicyDetailRequest.js +20 -0
- package/v1/model/ListOrganizationPolicyDetailRequest.js.map +1 -0
- package/v1/model/ListOrganizationPolicyDetailResponse.d.ts +14 -0
- package/v1/model/ListOrganizationPolicyDetailResponse.d.ts.map +1 -0
- package/v1/model/ListOrganizationPolicyDetailResponse.js +27 -0
- package/v1/model/ListOrganizationPolicyDetailResponse.js.map +1 -0
- package/v1/model/ListVaultResponse.d.ts +0 -4
- package/v1/model/ListVaultResponse.d.ts.map +1 -1
- package/v1/model/ListVaultResponse.js +0 -10
- package/v1/model/ListVaultResponse.js.map +1 -1
- package/v1/model/OrganizationPolicy.d.ts +50 -0
- package/v1/model/OrganizationPolicy.d.ts.map +1 -0
- package/v1/model/OrganizationPolicy.js +113 -0
- package/v1/model/OrganizationPolicy.js.map +1 -0
- package/v1/model/OrganizationPolicyCreate.d.ts +38 -0
- package/v1/model/OrganizationPolicyCreate.d.ts.map +1 -0
- package/v1/model/OrganizationPolicyCreate.js +82 -0
- package/v1/model/OrganizationPolicyCreate.js.map +1 -0
- package/v1/model/OrganizationPolicyCreateReq.d.ts +7 -0
- package/v1/model/OrganizationPolicyCreateReq.d.ts.map +1 -0
- package/v1/model/OrganizationPolicyCreateReq.js +14 -0
- package/v1/model/OrganizationPolicyCreateReq.js.map +1 -0
- package/v1/model/OrganizationPolicyStatus.d.ts +18 -0
- package/v1/model/OrganizationPolicyStatus.d.ts.map +1 -0
- package/v1/model/OrganizationPolicyStatus.js +47 -0
- package/v1/model/OrganizationPolicyStatus.js.map +1 -0
- package/v1/model/OrganizationPolicyUpdate.d.ts +26 -0
- package/v1/model/OrganizationPolicyUpdate.d.ts.map +1 -0
- package/v1/model/OrganizationPolicyUpdate.js +57 -0
- package/v1/model/OrganizationPolicyUpdate.js.map +1 -0
- package/v1/model/OrganizationPolicyUpdateReq.d.ts +7 -0
- package/v1/model/OrganizationPolicyUpdateReq.d.ts.map +1 -0
- package/v1/model/OrganizationPolicyUpdateReq.js +14 -0
- package/v1/model/OrganizationPolicyUpdateReq.js.map +1 -0
- package/v1/model/ShowOrganizationPolicyRequest.d.ts +8 -0
- package/v1/model/ShowOrganizationPolicyRequest.d.ts.map +1 -0
- package/v1/model/ShowOrganizationPolicyRequest.js +20 -0
- package/v1/model/ShowOrganizationPolicyRequest.js.map +1 -0
- package/v1/model/ShowOrganizationPolicyResponse.d.ts +8 -0
- package/v1/model/ShowOrganizationPolicyResponse.d.ts.map +1 -0
- package/v1/model/ShowOrganizationPolicyResponse.js +15 -0
- package/v1/model/ShowOrganizationPolicyResponse.js.map +1 -0
- package/v1/model/UpdateOrganizationPolicyRequest.d.ts +11 -0
- package/v1/model/UpdateOrganizationPolicyRequest.d.ts.map +1 -0
- package/v1/model/UpdateOrganizationPolicyRequest.js +24 -0
- package/v1/model/UpdateOrganizationPolicyRequest.js.map +1 -0
- package/v1/model/UpdateOrganizationPolicyResponse.d.ts +8 -0
- package/v1/model/UpdateOrganizationPolicyResponse.d.ts.map +1 -0
- package/v1/model/UpdateOrganizationPolicyResponse.js +15 -0
- package/v1/model/UpdateOrganizationPolicyResponse.js.map +1 -0
- package/v1/model/VaultCreate.d.ts +12 -0
- package/v1/model/VaultCreate.d.ts.map +1 -1
- package/v1/model/VaultCreate.js +20 -1
- package/v1/model/VaultCreate.js.map +1 -1
- package/v1/public-api.d.ts +18 -0
- package/v1/public-api.d.ts.map +1 -1
- package/v1/public-api.js +18 -0
- package/v1/public-api.js.map +1 -1
package/v1/CbrClient.js
CHANGED
@@ -12,12 +12,14 @@ const CheckAgentRequest_1 = require("./model/CheckAgentRequest");
|
|
12
12
|
const CopyBackupRequest_1 = require("./model/CopyBackupRequest");
|
13
13
|
const CopyCheckpointRequest_1 = require("./model/CopyCheckpointRequest");
|
14
14
|
const CreateCheckpointRequest_1 = require("./model/CreateCheckpointRequest");
|
15
|
+
const CreateOrganizationPolicyRequest_1 = require("./model/CreateOrganizationPolicyRequest");
|
15
16
|
const CreatePolicyRequest_1 = require("./model/CreatePolicyRequest");
|
16
17
|
const CreatePostPaidVaultRequest_1 = require("./model/CreatePostPaidVaultRequest");
|
17
18
|
const CreateVaultRequest_1 = require("./model/CreateVaultRequest");
|
18
19
|
const CreateVaultTagsRequest_1 = require("./model/CreateVaultTagsRequest");
|
19
20
|
const DeleteBackupRequest_1 = require("./model/DeleteBackupRequest");
|
20
21
|
const DeleteMemberRequest_1 = require("./model/DeleteMemberRequest");
|
22
|
+
const DeleteOrganizationPolicyRequest_1 = require("./model/DeleteOrganizationPolicyRequest");
|
21
23
|
const DeletePolicyRequest_1 = require("./model/DeletePolicyRequest");
|
22
24
|
const DeleteVaultRequest_1 = require("./model/DeleteVaultRequest");
|
23
25
|
const DeleteVaultTagRequest_1 = require("./model/DeleteVaultTagRequest");
|
@@ -29,6 +31,8 @@ const ListBackupsRequest_1 = require("./model/ListBackupsRequest");
|
|
29
31
|
const ListDomainProjectsRequest_1 = require("./model/ListDomainProjectsRequest");
|
30
32
|
const ListExternalVaultRequest_1 = require("./model/ListExternalVaultRequest");
|
31
33
|
const ListOpLogsRequest_1 = require("./model/ListOpLogsRequest");
|
34
|
+
const ListOrganizationPoliciesRequest_1 = require("./model/ListOrganizationPoliciesRequest");
|
35
|
+
const ListOrganizationPolicyDetailRequest_1 = require("./model/ListOrganizationPolicyDetailRequest");
|
32
36
|
const ListPoliciesRequest_1 = require("./model/ListPoliciesRequest");
|
33
37
|
const ListProtectableRequest_1 = require("./model/ListProtectableRequest");
|
34
38
|
const ListVaultRequest_1 = require("./model/ListVaultRequest");
|
@@ -48,6 +52,7 @@ const ShowMembersDetailRequest_1 = require("./model/ShowMembersDetailRequest");
|
|
48
52
|
const ShowMetadataRequest_1 = require("./model/ShowMetadataRequest");
|
49
53
|
const ShowMigrateStatusRequest_1 = require("./model/ShowMigrateStatusRequest");
|
50
54
|
const ShowOpLogRequest_1 = require("./model/ShowOpLogRequest");
|
55
|
+
const ShowOrganizationPolicyRequest_1 = require("./model/ShowOrganizationPolicyRequest");
|
51
56
|
const ShowPolicyRequest_1 = require("./model/ShowPolicyRequest");
|
52
57
|
const ShowProtectableRequest_1 = require("./model/ShowProtectableRequest");
|
53
58
|
const ShowStorageUsageRequest_1 = require("./model/ShowStorageUsageRequest");
|
@@ -59,6 +64,7 @@ const UpdateAgentRequest_1 = require("./model/UpdateAgentRequest");
|
|
59
64
|
const UpdateBackupRequest_1 = require("./model/UpdateBackupRequest");
|
60
65
|
const UpdateMemberStatusRequest_1 = require("./model/UpdateMemberStatusRequest");
|
61
66
|
const UpdateOrderRequest_1 = require("./model/UpdateOrderRequest");
|
67
|
+
const UpdateOrganizationPolicyRequest_1 = require("./model/UpdateOrganizationPolicyRequest");
|
62
68
|
const UpdatePolicyRequest_1 = require("./model/UpdatePolicyRequest");
|
63
69
|
const UpdateVaultRequest_1 = require("./model/UpdateVaultRequest");
|
64
70
|
class CbrClient {
|
@@ -244,6 +250,22 @@ class CbrClient {
|
|
244
250
|
options['responseHeaders'] = [''];
|
245
251
|
return this.hcClient.sendRequest(options);
|
246
252
|
}
|
253
|
+
/**
|
254
|
+
* 创建组织策略
|
255
|
+
*
|
256
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
257
|
+
*
|
258
|
+
* @summary 创建组织策略
|
259
|
+
* @param {OrganizationPolicyCreateReq} createOrganizationPolicyRequestBody 策略资源创建参数
|
260
|
+
* @param {*} [options] Override http request option.
|
261
|
+
* @throws {RequiredError}
|
262
|
+
*/
|
263
|
+
createOrganizationPolicy(createOrganizationPolicyRequest) {
|
264
|
+
const options = (0, exports.ParamCreater)().createOrganizationPolicy(createOrganizationPolicyRequest);
|
265
|
+
// @ts-ignore
|
266
|
+
options['responseHeaders'] = [''];
|
267
|
+
return this.hcClient.sendRequest(options);
|
268
|
+
}
|
247
269
|
/**
|
248
270
|
* 创建策略,策略分为备份策略和复制策略。
|
249
271
|
*
|
@@ -343,6 +365,22 @@ class CbrClient {
|
|
343
365
|
options['responseHeaders'] = [''];
|
344
366
|
return this.hcClient.sendRequest(options);
|
345
367
|
}
|
368
|
+
/**
|
369
|
+
* 删除组织策略
|
370
|
+
*
|
371
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
372
|
+
*
|
373
|
+
* @summary 删除组织策略
|
374
|
+
* @param {string} organizationPolicyId 资源策略ID
|
375
|
+
* @param {*} [options] Override http request option.
|
376
|
+
* @throws {RequiredError}
|
377
|
+
*/
|
378
|
+
deleteOrganizationPolicy(deleteOrganizationPolicyRequest) {
|
379
|
+
const options = (0, exports.ParamCreater)().deleteOrganizationPolicy(deleteOrganizationPolicyRequest);
|
380
|
+
// @ts-ignore
|
381
|
+
options['responseHeaders'] = [''];
|
382
|
+
return this.hcClient.sendRequest(options);
|
383
|
+
}
|
346
384
|
/**
|
347
385
|
* 删除策略
|
348
386
|
*
|
@@ -564,6 +602,38 @@ class CbrClient {
|
|
564
602
|
options['responseHeaders'] = [''];
|
565
603
|
return this.hcClient.sendRequest(options);
|
566
604
|
}
|
605
|
+
/**
|
606
|
+
* 查询组织策略列表
|
607
|
+
*
|
608
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
609
|
+
*
|
610
|
+
* @summary 查询组织策略列表
|
611
|
+
* @param {string} operationType 组织策略类型
|
612
|
+
* @param {*} [options] Override http request option.
|
613
|
+
* @throws {RequiredError}
|
614
|
+
*/
|
615
|
+
listOrganizationPolicies(listOrganizationPoliciesRequest) {
|
616
|
+
const options = (0, exports.ParamCreater)().listOrganizationPolicies(listOrganizationPoliciesRequest);
|
617
|
+
// @ts-ignore
|
618
|
+
options['responseHeaders'] = [''];
|
619
|
+
return this.hcClient.sendRequest(options);
|
620
|
+
}
|
621
|
+
/**
|
622
|
+
* 查询组织策略每个账号下策略部署状态列表
|
623
|
+
*
|
624
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
625
|
+
*
|
626
|
+
* @summary 查询组织策略部署状态列表
|
627
|
+
* @param {string} organizationPolicyId 组织策略ID
|
628
|
+
* @param {*} [options] Override http request option.
|
629
|
+
* @throws {RequiredError}
|
630
|
+
*/
|
631
|
+
listOrganizationPolicyDetail(listOrganizationPolicyDetailRequest) {
|
632
|
+
const options = (0, exports.ParamCreater)().listOrganizationPolicyDetail(listOrganizationPolicyDetailRequest);
|
633
|
+
// @ts-ignore
|
634
|
+
options['responseHeaders'] = [''];
|
635
|
+
return this.hcClient.sendRequest(options);
|
636
|
+
}
|
567
637
|
/**
|
568
638
|
* 查询策略列表
|
569
639
|
*
|
@@ -915,6 +985,22 @@ class CbrClient {
|
|
915
985
|
options['responseHeaders'] = [''];
|
916
986
|
return this.hcClient.sendRequest(options);
|
917
987
|
}
|
988
|
+
/**
|
989
|
+
* 查询指定组织策略
|
990
|
+
*
|
991
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
992
|
+
*
|
993
|
+
* @summary 查询指定组织策略
|
994
|
+
* @param {string} organizationPolicyId 组织策略ID
|
995
|
+
* @param {*} [options] Override http request option.
|
996
|
+
* @throws {RequiredError}
|
997
|
+
*/
|
998
|
+
showOrganizationPolicy(showOrganizationPolicyRequest) {
|
999
|
+
const options = (0, exports.ParamCreater)().showOrganizationPolicy(showOrganizationPolicyRequest);
|
1000
|
+
// @ts-ignore
|
1001
|
+
options['responseHeaders'] = [''];
|
1002
|
+
return this.hcClient.sendRequest(options);
|
1003
|
+
}
|
918
1004
|
/**
|
919
1005
|
* 查询单个策略
|
920
1006
|
*
|
@@ -1148,6 +1234,23 @@ class CbrClient {
|
|
1148
1234
|
options['responseHeaders'] = [''];
|
1149
1235
|
return this.hcClient.sendRequest(options);
|
1150
1236
|
}
|
1237
|
+
/**
|
1238
|
+
* 更新组织策略
|
1239
|
+
*
|
1240
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1241
|
+
*
|
1242
|
+
* @summary 更新组织策略
|
1243
|
+
* @param {string} organizationPolicyId 组织策略ID
|
1244
|
+
* @param {OrganizationPolicyUpdateReq} updateOrganizationPolicyRequestBody 组织策略修改参数
|
1245
|
+
* @param {*} [options] Override http request option.
|
1246
|
+
* @throws {RequiredError}
|
1247
|
+
*/
|
1248
|
+
updateOrganizationPolicy(updateOrganizationPolicyRequest) {
|
1249
|
+
const options = (0, exports.ParamCreater)().updateOrganizationPolicy(updateOrganizationPolicyRequest);
|
1250
|
+
// @ts-ignore
|
1251
|
+
options['responseHeaders'] = [''];
|
1252
|
+
return this.hcClient.sendRequest(options);
|
1253
|
+
}
|
1151
1254
|
/**
|
1152
1255
|
* 修改策略
|
1153
1256
|
*
|
@@ -1562,6 +1665,39 @@ const ParamCreater = function () {
|
|
1562
1665
|
options.headers = localVarHeaderParameter;
|
1563
1666
|
return options;
|
1564
1667
|
},
|
1668
|
+
/**
|
1669
|
+
* 创建组织策略
|
1670
|
+
*
|
1671
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1672
|
+
*/
|
1673
|
+
createOrganizationPolicy(createOrganizationPolicyRequest) {
|
1674
|
+
const options = {
|
1675
|
+
method: "POST",
|
1676
|
+
url: "/v3/{project_id}/organization-policies",
|
1677
|
+
contentType: "application/json;charset=UTF-8",
|
1678
|
+
queryParams: {},
|
1679
|
+
pathParams: {},
|
1680
|
+
headers: {},
|
1681
|
+
data: {}
|
1682
|
+
};
|
1683
|
+
const localVarHeaderParameter = {};
|
1684
|
+
let body;
|
1685
|
+
if (createOrganizationPolicyRequest !== null && createOrganizationPolicyRequest !== undefined) {
|
1686
|
+
if (createOrganizationPolicyRequest instanceof CreateOrganizationPolicyRequest_1.CreateOrganizationPolicyRequest) {
|
1687
|
+
body = createOrganizationPolicyRequest.body;
|
1688
|
+
}
|
1689
|
+
else {
|
1690
|
+
body = createOrganizationPolicyRequest['body'];
|
1691
|
+
}
|
1692
|
+
}
|
1693
|
+
if (body === null || body === undefined) {
|
1694
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
1695
|
+
}
|
1696
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1697
|
+
options.data = body !== undefined ? body : {};
|
1698
|
+
options.headers = localVarHeaderParameter;
|
1699
|
+
return options;
|
1700
|
+
},
|
1565
1701
|
/**
|
1566
1702
|
* 创建策略,策略分为备份策略和复制策略。
|
1567
1703
|
*
|
@@ -1767,6 +1903,37 @@ const ParamCreater = function () {
|
|
1767
1903
|
options.headers = localVarHeaderParameter;
|
1768
1904
|
return options;
|
1769
1905
|
},
|
1906
|
+
/**
|
1907
|
+
* 删除组织策略
|
1908
|
+
*
|
1909
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1910
|
+
*/
|
1911
|
+
deleteOrganizationPolicy(deleteOrganizationPolicyRequest) {
|
1912
|
+
const options = {
|
1913
|
+
method: "DELETE",
|
1914
|
+
url: "/v3/{project_id}/organization-policies/{organization_policy_id}",
|
1915
|
+
contentType: "application/json",
|
1916
|
+
queryParams: {},
|
1917
|
+
pathParams: {},
|
1918
|
+
headers: {}
|
1919
|
+
};
|
1920
|
+
const localVarHeaderParameter = {};
|
1921
|
+
let organizationPolicyId;
|
1922
|
+
if (deleteOrganizationPolicyRequest !== null && deleteOrganizationPolicyRequest !== undefined) {
|
1923
|
+
if (deleteOrganizationPolicyRequest instanceof DeleteOrganizationPolicyRequest_1.DeleteOrganizationPolicyRequest) {
|
1924
|
+
organizationPolicyId = deleteOrganizationPolicyRequest.organizationPolicyId;
|
1925
|
+
}
|
1926
|
+
else {
|
1927
|
+
organizationPolicyId = deleteOrganizationPolicyRequest['organization_policy_id'];
|
1928
|
+
}
|
1929
|
+
}
|
1930
|
+
if (organizationPolicyId === null || organizationPolicyId === undefined) {
|
1931
|
+
throw new RequiredError('organizationPolicyId', 'Required parameter organizationPolicyId was null or undefined when calling deleteOrganizationPolicy.');
|
1932
|
+
}
|
1933
|
+
options.pathParams = { 'organization_policy_id': organizationPolicyId, };
|
1934
|
+
options.headers = localVarHeaderParameter;
|
1935
|
+
return options;
|
1936
|
+
},
|
1770
1937
|
/**
|
1771
1938
|
* 删除策略
|
1772
1939
|
*
|
@@ -2395,6 +2562,72 @@ const ParamCreater = function () {
|
|
2395
2562
|
options.headers = localVarHeaderParameter;
|
2396
2563
|
return options;
|
2397
2564
|
},
|
2565
|
+
/**
|
2566
|
+
* 查询组织策略列表
|
2567
|
+
*
|
2568
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2569
|
+
*/
|
2570
|
+
listOrganizationPolicies(listOrganizationPoliciesRequest) {
|
2571
|
+
const options = {
|
2572
|
+
method: "GET",
|
2573
|
+
url: "/v3/{project_id}/organization-policies",
|
2574
|
+
contentType: "application/json",
|
2575
|
+
queryParams: {},
|
2576
|
+
pathParams: {},
|
2577
|
+
headers: {}
|
2578
|
+
};
|
2579
|
+
const localVarHeaderParameter = {};
|
2580
|
+
const localVarQueryParameter = {};
|
2581
|
+
let operationType;
|
2582
|
+
if (listOrganizationPoliciesRequest !== null && listOrganizationPoliciesRequest !== undefined) {
|
2583
|
+
if (listOrganizationPoliciesRequest instanceof ListOrganizationPoliciesRequest_1.ListOrganizationPoliciesRequest) {
|
2584
|
+
operationType = listOrganizationPoliciesRequest.operationType;
|
2585
|
+
}
|
2586
|
+
else {
|
2587
|
+
operationType = listOrganizationPoliciesRequest['operation_type'];
|
2588
|
+
}
|
2589
|
+
}
|
2590
|
+
if (operationType === null || operationType === undefined) {
|
2591
|
+
throw new RequiredError('operationType', 'Required parameter operationType was null or undefined when calling listOrganizationPolicies.');
|
2592
|
+
}
|
2593
|
+
if (operationType !== null && operationType !== undefined) {
|
2594
|
+
localVarQueryParameter['operation_type'] = operationType;
|
2595
|
+
}
|
2596
|
+
options.queryParams = localVarQueryParameter;
|
2597
|
+
options.headers = localVarHeaderParameter;
|
2598
|
+
return options;
|
2599
|
+
},
|
2600
|
+
/**
|
2601
|
+
* 查询组织策略每个账号下策略部署状态列表
|
2602
|
+
*
|
2603
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2604
|
+
*/
|
2605
|
+
listOrganizationPolicyDetail(listOrganizationPolicyDetailRequest) {
|
2606
|
+
const options = {
|
2607
|
+
method: "GET",
|
2608
|
+
url: "/v3/{project_id}/organization-policies/{organization_policy_id}/policy-detail",
|
2609
|
+
contentType: "application/json",
|
2610
|
+
queryParams: {},
|
2611
|
+
pathParams: {},
|
2612
|
+
headers: {}
|
2613
|
+
};
|
2614
|
+
const localVarHeaderParameter = {};
|
2615
|
+
let organizationPolicyId;
|
2616
|
+
if (listOrganizationPolicyDetailRequest !== null && listOrganizationPolicyDetailRequest !== undefined) {
|
2617
|
+
if (listOrganizationPolicyDetailRequest instanceof ListOrganizationPolicyDetailRequest_1.ListOrganizationPolicyDetailRequest) {
|
2618
|
+
organizationPolicyId = listOrganizationPolicyDetailRequest.organizationPolicyId;
|
2619
|
+
}
|
2620
|
+
else {
|
2621
|
+
organizationPolicyId = listOrganizationPolicyDetailRequest['organization_policy_id'];
|
2622
|
+
}
|
2623
|
+
}
|
2624
|
+
if (organizationPolicyId === null || organizationPolicyId === undefined) {
|
2625
|
+
throw new RequiredError('organizationPolicyId', 'Required parameter organizationPolicyId was null or undefined when calling listOrganizationPolicyDetail.');
|
2626
|
+
}
|
2627
|
+
options.pathParams = { 'organization_policy_id': organizationPolicyId, };
|
2628
|
+
options.headers = localVarHeaderParameter;
|
2629
|
+
return options;
|
2630
|
+
},
|
2398
2631
|
/**
|
2399
2632
|
* 查询策略列表
|
2400
2633
|
*
|
@@ -3220,6 +3453,37 @@ const ParamCreater = function () {
|
|
3220
3453
|
options.headers = localVarHeaderParameter;
|
3221
3454
|
return options;
|
3222
3455
|
},
|
3456
|
+
/**
|
3457
|
+
* 查询指定组织策略
|
3458
|
+
*
|
3459
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
3460
|
+
*/
|
3461
|
+
showOrganizationPolicy(showOrganizationPolicyRequest) {
|
3462
|
+
const options = {
|
3463
|
+
method: "GET",
|
3464
|
+
url: "/v3/{project_id}/organization-policies/{organization_policy_id}",
|
3465
|
+
contentType: "application/json",
|
3466
|
+
queryParams: {},
|
3467
|
+
pathParams: {},
|
3468
|
+
headers: {}
|
3469
|
+
};
|
3470
|
+
const localVarHeaderParameter = {};
|
3471
|
+
let organizationPolicyId;
|
3472
|
+
if (showOrganizationPolicyRequest !== null && showOrganizationPolicyRequest !== undefined) {
|
3473
|
+
if (showOrganizationPolicyRequest instanceof ShowOrganizationPolicyRequest_1.ShowOrganizationPolicyRequest) {
|
3474
|
+
organizationPolicyId = showOrganizationPolicyRequest.organizationPolicyId;
|
3475
|
+
}
|
3476
|
+
else {
|
3477
|
+
organizationPolicyId = showOrganizationPolicyRequest['organization_policy_id'];
|
3478
|
+
}
|
3479
|
+
}
|
3480
|
+
if (organizationPolicyId === null || organizationPolicyId === undefined) {
|
3481
|
+
throw new RequiredError('organizationPolicyId', 'Required parameter organizationPolicyId was null or undefined when calling showOrganizationPolicy.');
|
3482
|
+
}
|
3483
|
+
options.pathParams = { 'organization_policy_id': organizationPolicyId, };
|
3484
|
+
options.headers = localVarHeaderParameter;
|
3485
|
+
return options;
|
3486
|
+
},
|
3223
3487
|
/**
|
3224
3488
|
* 查询单个策略
|
3225
3489
|
*
|
@@ -3681,6 +3945,46 @@ const ParamCreater = function () {
|
|
3681
3945
|
options.headers = localVarHeaderParameter;
|
3682
3946
|
return options;
|
3683
3947
|
},
|
3948
|
+
/**
|
3949
|
+
* 更新组织策略
|
3950
|
+
*
|
3951
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
3952
|
+
*/
|
3953
|
+
updateOrganizationPolicy(updateOrganizationPolicyRequest) {
|
3954
|
+
const options = {
|
3955
|
+
method: "PUT",
|
3956
|
+
url: "/v3/{project_id}/organization-policies/{organization_policy_id}",
|
3957
|
+
contentType: "application/json;charset=UTF-8",
|
3958
|
+
queryParams: {},
|
3959
|
+
pathParams: {},
|
3960
|
+
headers: {},
|
3961
|
+
data: {}
|
3962
|
+
};
|
3963
|
+
const localVarHeaderParameter = {};
|
3964
|
+
let body;
|
3965
|
+
let organizationPolicyId;
|
3966
|
+
if (updateOrganizationPolicyRequest !== null && updateOrganizationPolicyRequest !== undefined) {
|
3967
|
+
if (updateOrganizationPolicyRequest instanceof UpdateOrganizationPolicyRequest_1.UpdateOrganizationPolicyRequest) {
|
3968
|
+
organizationPolicyId = updateOrganizationPolicyRequest.organizationPolicyId;
|
3969
|
+
body = updateOrganizationPolicyRequest.body;
|
3970
|
+
}
|
3971
|
+
else {
|
3972
|
+
organizationPolicyId = updateOrganizationPolicyRequest['organization_policy_id'];
|
3973
|
+
body = updateOrganizationPolicyRequest['body'];
|
3974
|
+
}
|
3975
|
+
}
|
3976
|
+
if (organizationPolicyId === null || organizationPolicyId === undefined) {
|
3977
|
+
throw new RequiredError('organizationPolicyId', 'Required parameter organizationPolicyId was null or undefined when calling updateOrganizationPolicy.');
|
3978
|
+
}
|
3979
|
+
if (body === null || body === undefined) {
|
3980
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
3981
|
+
}
|
3982
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
3983
|
+
options.data = body !== undefined ? body : {};
|
3984
|
+
options.pathParams = { 'organization_policy_id': organizationPolicyId, };
|
3985
|
+
options.headers = localVarHeaderParameter;
|
3986
|
+
return options;
|
3987
|
+
},
|
3684
3988
|
/**
|
3685
3989
|
* 修改策略
|
3686
3990
|
*
|