@huaweicloud/huaweicloud-sdk-cbr 3.1.36
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +13 -0
- package/README.md +1 -0
- package/huaweicloud-sdk-cbr.d.ts +2 -0
- package/huaweicloud-sdk-cbr.js +31 -0
- package/package.json +19 -0
- package/v1/CbrClient.d.ts +1175 -0
- package/v1/CbrClient.js +2558 -0
- package/v1/CbrRegion.d.ts +22 -0
- package/v1/CbrRegion.js +57 -0
- package/v1/model/AddMemberRequest.d.ts +10 -0
- package/v1/model/AddMemberRequest.js +28 -0
- package/v1/model/AddMemberResponse.d.ts +9 -0
- package/v1/model/AddMemberResponse.js +35 -0
- package/v1/model/AddMembersReq.d.ts +5 -0
- package/v1/model/AddMembersReq.js +14 -0
- package/v1/model/AddVaultResourceRequest.d.ts +10 -0
- package/v1/model/AddVaultResourceRequest.js +28 -0
- package/v1/model/AddVaultResourceResponse.d.ts +8 -0
- package/v1/model/AddVaultResourceResponse.js +41 -0
- package/v1/model/AssociateVaultPolicyRequest.d.ts +10 -0
- package/v1/model/AssociateVaultPolicyRequest.js +28 -0
- package/v1/model/AssociateVaultPolicyResponse.d.ts +9 -0
- package/v1/model/AssociateVaultPolicyResponse.js +41 -0
- package/v1/model/BackupExtendInfo.d.ts +51 -0
- package/v1/model/BackupExtendInfo.js +143 -0
- package/v1/model/BackupReplicateReq.d.ts +6 -0
- package/v1/model/BackupReplicateReq.js +14 -0
- package/v1/model/BackupReplicateReqBody.d.ts +23 -0
- package/v1/model/BackupReplicateReqBody.js +76 -0
- package/v1/model/BackupReplicateRespBody.d.ts +35 -0
- package/v1/model/BackupReplicateRespBody.js +121 -0
- package/v1/model/BackupResp.d.ts +118 -0
- package/v1/model/BackupResp.js +335 -0
- package/v1/model/BackupRestore.d.ts +22 -0
- package/v1/model/BackupRestore.js +69 -0
- package/v1/model/BackupRestoreReq.d.ts +6 -0
- package/v1/model/BackupRestoreReq.js +14 -0
- package/v1/model/BackupRestoreServerMapping.d.ts +11 -0
- package/v1/model/BackupRestoreServerMapping.js +39 -0
- package/v1/model/BackupSync.d.ts +35 -0
- package/v1/model/BackupSync.js +129 -0
- package/v1/model/BackupSyncReq.d.ts +6 -0
- package/v1/model/BackupSyncReq.js +14 -0
- package/v1/model/BackupSyncRespBody.d.ts +11 -0
- package/v1/model/BackupSyncRespBody.js +39 -0
- package/v1/model/BatchCreateAndDeleteVaultTagsRequest.d.ts +10 -0
- package/v1/model/BatchCreateAndDeleteVaultTagsRequest.js +28 -0
- package/v1/model/BatchCreateAndDeleteVaultTagsResponse.d.ts +4 -0
- package/v1/model/BatchCreateAndDeleteVaultTagsResponse.js +27 -0
- package/v1/model/BillbingCreateExtraInfo.d.ts +11 -0
- package/v1/model/BillbingCreateExtraInfo.js +37 -0
- package/v1/model/Billing.d.ts +119 -0
- package/v1/model/Billing.js +258 -0
- package/v1/model/BillingCreate.d.ts +119 -0
- package/v1/model/BillingCreate.js +286 -0
- package/v1/model/BillingUpdate.d.ts +17 -0
- package/v1/model/BillingUpdate.js +36 -0
- package/v1/model/BindRulesTags.d.ts +7 -0
- package/v1/model/BindRulesTags.js +19 -0
- package/v1/model/BulkCreateAndDeleteVaultTagsReq.d.ts +21 -0
- package/v1/model/BulkCreateAndDeleteVaultTagsReq.js +41 -0
- package/v1/model/CbcOrderResult.d.ts +11 -0
- package/v1/model/CbcOrderResult.js +27 -0
- package/v1/model/CheckpointCreate.d.ts +35 -0
- package/v1/model/CheckpointCreate.js +80 -0
- package/v1/model/CheckpointCreateSkippedResource.d.ts +13 -0
- package/v1/model/CheckpointCreateSkippedResource.js +29 -0
- package/v1/model/CheckpointExtraInfoResp.d.ts +11 -0
- package/v1/model/CheckpointExtraInfoResp.js +31 -0
- package/v1/model/CheckpointParam.d.ts +24 -0
- package/v1/model/CheckpointParam.js +67 -0
- package/v1/model/CheckpointPlanCreate.d.ts +15 -0
- package/v1/model/CheckpointPlanCreate.js +37 -0
- package/v1/model/CheckpointReplicateParam.d.ts +27 -0
- package/v1/model/CheckpointReplicateParam.js +97 -0
- package/v1/model/CheckpointReplicateReq.d.ts +6 -0
- package/v1/model/CheckpointReplicateReq.js +14 -0
- package/v1/model/CheckpointReplicateRespBody.d.ts +34 -0
- package/v1/model/CheckpointReplicateRespBody.js +119 -0
- package/v1/model/CheckpointReplicateRespbackups.d.ts +11 -0
- package/v1/model/CheckpointReplicateRespbackups.js +39 -0
- package/v1/model/CheckpointResourceResp.d.ts +40 -0
- package/v1/model/CheckpointResourceResp.js +106 -0
- package/v1/model/CopyBackupRequest.d.ts +10 -0
- package/v1/model/CopyBackupRequest.js +28 -0
- package/v1/model/CopyBackupResponse.d.ts +7 -0
- package/v1/model/CopyBackupResponse.js +31 -0
- package/v1/model/CopyCheckpointRequest.d.ts +6 -0
- package/v1/model/CopyCheckpointRequest.js +13 -0
- package/v1/model/CopyCheckpointResponse.d.ts +7 -0
- package/v1/model/CopyCheckpointResponse.js +31 -0
- package/v1/model/CreateCheckpointRequest.d.ts +6 -0
- package/v1/model/CreateCheckpointRequest.js +13 -0
- package/v1/model/CreateCheckpointResponse.d.ts +7 -0
- package/v1/model/CreateCheckpointResponse.js +31 -0
- package/v1/model/CreatePolicyRequest.d.ts +6 -0
- package/v1/model/CreatePolicyRequest.js +13 -0
- package/v1/model/CreatePolicyResponse.d.ts +7 -0
- package/v1/model/CreatePolicyResponse.js +31 -0
- package/v1/model/CreateVaultRequest.d.ts +6 -0
- package/v1/model/CreateVaultRequest.js +13 -0
- package/v1/model/CreateVaultResponse.d.ts +7 -0
- package/v1/model/CreateVaultResponse.js +31 -0
- package/v1/model/CreateVaultTagsRequest.d.ts +10 -0
- package/v1/model/CreateVaultTagsRequest.js +28 -0
- package/v1/model/CreateVaultTagsResponse.d.ts +4 -0
- package/v1/model/CreateVaultTagsResponse.js +27 -0
- package/v1/model/DeleteBackupRequest.d.ts +7 -0
- package/v1/model/DeleteBackupRequest.js +24 -0
- package/v1/model/DeleteBackupResponse.d.ts +4 -0
- package/v1/model/DeleteBackupResponse.js +27 -0
- package/v1/model/DeleteMemberRequest.d.ts +11 -0
- package/v1/model/DeleteMemberRequest.js +39 -0
- package/v1/model/DeleteMemberResponse.d.ts +4 -0
- package/v1/model/DeleteMemberResponse.js +27 -0
- package/v1/model/DeletePolicyRequest.d.ts +7 -0
- package/v1/model/DeletePolicyRequest.js +24 -0
- package/v1/model/DeletePolicyResponse.d.ts +4 -0
- package/v1/model/DeletePolicyResponse.js +27 -0
- package/v1/model/DeleteVaultRequest.d.ts +7 -0
- package/v1/model/DeleteVaultRequest.js +24 -0
- package/v1/model/DeleteVaultResponse.d.ts +4 -0
- package/v1/model/DeleteVaultResponse.js +27 -0
- package/v1/model/DeleteVaultTagRequest.d.ts +9 -0
- package/v1/model/DeleteVaultTagRequest.js +29 -0
- package/v1/model/DeleteVaultTagResponse.d.ts +4 -0
- package/v1/model/DeleteVaultTagResponse.js +27 -0
- package/v1/model/DisassociateVaultPolicyRequest.d.ts +10 -0
- package/v1/model/DisassociateVaultPolicyRequest.js +28 -0
- package/v1/model/DisassociateVaultPolicyResponse.d.ts +9 -0
- package/v1/model/DisassociateVaultPolicyResponse.js +41 -0
- package/v1/model/ImageData.d.ts +7 -0
- package/v1/model/ImageData.js +23 -0
- package/v1/model/ImportBackupRequest.d.ts +6 -0
- package/v1/model/ImportBackupRequest.js +13 -0
- package/v1/model/ImportBackupResponse.d.ts +7 -0
- package/v1/model/ImportBackupResponse.js +31 -0
- package/v1/model/ListBackupsRequest.d.ts +128 -0
- package/v1/model/ListBackupsRequest.js +305 -0
- package/v1/model/ListBackupsResponse.d.ts +13 -0
- package/v1/model/ListBackupsResponse.js +43 -0
- package/v1/model/ListOpLogsRequest.d.ts +71 -0
- package/v1/model/ListOpLogsRequest.js +175 -0
- package/v1/model/ListOpLogsResponse.d.ts +15 -0
- package/v1/model/ListOpLogsResponse.js +53 -0
- package/v1/model/ListPoliciesRequest.d.ts +19 -0
- package/v1/model/ListPoliciesRequest.js +46 -0
- package/v1/model/ListPoliciesResponse.d.ts +9 -0
- package/v1/model/ListPoliciesResponse.js +35 -0
- package/v1/model/ListProtectableRequest.d.ts +31 -0
- package/v1/model/ListProtectableRequest.js +71 -0
- package/v1/model/ListProtectableResponse.d.ts +7 -0
- package/v1/model/ListProtectableResponse.js +31 -0
- package/v1/model/ListVaultRequest.d.ts +53 -0
- package/v1/model/ListVaultRequest.js +131 -0
- package/v1/model/ListVaultResponse.d.ts +13 -0
- package/v1/model/ListVaultResponse.js +43 -0
- package/v1/model/Match.d.ts +7 -0
- package/v1/model/Match.js +19 -0
- package/v1/model/Member.d.ts +40 -0
- package/v1/model/Member.js +112 -0
- package/v1/model/MigrateVaultResourceRequest.d.ts +10 -0
- package/v1/model/MigrateVaultResourceRequest.js +28 -0
- package/v1/model/MigrateVaultResourceResponse.d.ts +8 -0
- package/v1/model/MigrateVaultResourceResponse.js +41 -0
- package/v1/model/OpErrorInfo.d.ts +7 -0
- package/v1/model/OpErrorInfo.js +17 -0
- package/v1/model/OpExtendInfoBckup.d.ts +41 -0
- package/v1/model/OpExtendInfoBckup.js +102 -0
- package/v1/model/OpExtendInfoCommon.d.ts +13 -0
- package/v1/model/OpExtendInfoCommon.js +43 -0
- package/v1/model/OpExtendInfoDelete.d.ts +11 -0
- package/v1/model/OpExtendInfoDelete.js +39 -0
- package/v1/model/OpExtendInfoRemoveResources.d.ts +14 -0
- package/v1/model/OpExtendInfoRemoveResources.js +41 -0
- package/v1/model/OpExtendInfoReplication.d.ts +43 -0
- package/v1/model/OpExtendInfoReplication.js +154 -0
- package/v1/model/OpExtendInfoRestore.d.ts +19 -0
- package/v1/model/OpExtendInfoRestore.js +65 -0
- package/v1/model/OpExtendInfoSync.d.ts +15 -0
- package/v1/model/OpExtendInfoSync.js +51 -0
- package/v1/model/OpExtendInfoVaultDelete.d.ts +11 -0
- package/v1/model/OpExtendInfoVaultDelete.js +37 -0
- package/v1/model/OpExtraInfo.d.ts +36 -0
- package/v1/model/OpExtraInfo.js +77 -0
- package/v1/model/OperationLog.d.ts +87 -0
- package/v1/model/OperationLog.js +234 -0
- package/v1/model/Policy.d.ts +34 -0
- package/v1/model/Policy.js +82 -0
- package/v1/model/PolicyAssociateVault.d.ts +11 -0
- package/v1/model/PolicyAssociateVault.js +38 -0
- package/v1/model/PolicyCreate.d.ts +27 -0
- package/v1/model/PolicyCreate.js +62 -0
- package/v1/model/PolicyCreateReq.d.ts +6 -0
- package/v1/model/PolicyCreateReq.js +14 -0
- package/v1/model/PolicyTriggerPropertiesReq.d.ts +5 -0
- package/v1/model/PolicyTriggerPropertiesReq.js +14 -0
- package/v1/model/PolicyTriggerPropertiesResp.d.ts +9 -0
- package/v1/model/PolicyTriggerPropertiesResp.js +28 -0
- package/v1/model/PolicyTriggerReq.d.ts +6 -0
- package/v1/model/PolicyTriggerReq.js +14 -0
- package/v1/model/PolicyTriggerResp.d.ts +19 -0
- package/v1/model/PolicyTriggerResp.js +35 -0
- package/v1/model/PolicyUpdate.d.ts +15 -0
- package/v1/model/PolicyUpdate.js +35 -0
- package/v1/model/PolicyUpdateReq.d.ts +6 -0
- package/v1/model/PolicyUpdateReq.js +14 -0
- package/v1/model/PolicyoODCreate.d.ts +41 -0
- package/v1/model/PolicyoODCreate.js +139 -0
- package/v1/model/ProtectableReplicationCapabilitiesRespRegion.d.ts +9 -0
- package/v1/model/ProtectableReplicationCapabilitiesRespRegion.js +29 -0
- package/v1/model/ProtectableResult.d.ts +14 -0
- package/v1/model/ProtectableResult.js +30 -0
- package/v1/model/ProtectablesResp.d.ts +29 -0
- package/v1/model/ProtectablesResp.js +56 -0
- package/v1/model/RemoveVaultResourceRequest.d.ts +10 -0
- package/v1/model/RemoveVaultResourceRequest.js +28 -0
- package/v1/model/RemoveVaultResourceResponse.d.ts +8 -0
- package/v1/model/RemoveVaultResourceResponse.js +41 -0
- package/v1/model/ReplicationRecordGet.d.ts +67 -0
- package/v1/model/ReplicationRecordGet.js +198 -0
- package/v1/model/ReplicationRecordsExtraInfo.d.ts +21 -0
- package/v1/model/ReplicationRecordsExtraInfo.js +69 -0
- package/v1/model/Resource.d.ts +14 -0
- package/v1/model/Resource.js +37 -0
- package/v1/model/ResourceCreate.d.ts +14 -0
- package/v1/model/ResourceCreate.js +37 -0
- package/v1/model/ResourceExtraInfo.d.ts +12 -0
- package/v1/model/ResourceExtraInfo.js +37 -0
- package/v1/model/ResourceExtraInfoIncludeVolumes.d.ts +9 -0
- package/v1/model/ResourceExtraInfoIncludeVolumes.js +28 -0
- package/v1/model/ResourceResp.d.ts +43 -0
- package/v1/model/ResourceResp.js +110 -0
- package/v1/model/RestoreBackupRequest.d.ts +10 -0
- package/v1/model/RestoreBackupRequest.js +28 -0
- package/v1/model/RestoreBackupResponse.d.ts +4 -0
- package/v1/model/RestoreBackupResponse.js +27 -0
- package/v1/model/ShowBackupRequest.d.ts +7 -0
- package/v1/model/ShowBackupRequest.js +24 -0
- package/v1/model/ShowBackupResponse.d.ts +7 -0
- package/v1/model/ShowBackupResponse.js +31 -0
- package/v1/model/ShowCheckpointRequest.d.ts +7 -0
- package/v1/model/ShowCheckpointRequest.js +24 -0
- package/v1/model/ShowCheckpointResponse.d.ts +7 -0
- package/v1/model/ShowCheckpointResponse.js +31 -0
- package/v1/model/ShowMemberDetailRequest.d.ts +11 -0
- package/v1/model/ShowMemberDetailRequest.js +39 -0
- package/v1/model/ShowMemberDetailResponse.d.ts +7 -0
- package/v1/model/ShowMemberDetailResponse.js +31 -0
- package/v1/model/ShowMembersDetailRequest.d.ts +29 -0
- package/v1/model/ShowMembersDetailRequest.js +86 -0
- package/v1/model/ShowMembersDetailResponse.d.ts +9 -0
- package/v1/model/ShowMembersDetailResponse.js +35 -0
- package/v1/model/ShowOpLogRequest.d.ts +7 -0
- package/v1/model/ShowOpLogRequest.js +24 -0
- package/v1/model/ShowOpLogResponse.d.ts +9 -0
- package/v1/model/ShowOpLogResponse.js +41 -0
- package/v1/model/ShowPolicyRequest.d.ts +7 -0
- package/v1/model/ShowPolicyRequest.js +24 -0
- package/v1/model/ShowPolicyResponse.d.ts +7 -0
- package/v1/model/ShowPolicyResponse.js +31 -0
- package/v1/model/ShowProtectableRequest.d.ts +19 -0
- package/v1/model/ShowProtectableRequest.js +48 -0
- package/v1/model/ShowProtectableResponse.d.ts +7 -0
- package/v1/model/ShowProtectableResponse.js +31 -0
- package/v1/model/ShowReplicationCapabilitiesRequest.d.ts +3 -0
- package/v1/model/ShowReplicationCapabilitiesRequest.js +9 -0
- package/v1/model/ShowReplicationCapabilitiesResponse.d.ts +7 -0
- package/v1/model/ShowReplicationCapabilitiesResponse.js +31 -0
- package/v1/model/ShowVaultProjectTagRequest.d.ts +3 -0
- package/v1/model/ShowVaultProjectTagRequest.js +9 -0
- package/v1/model/ShowVaultProjectTagResponse.d.ts +7 -0
- package/v1/model/ShowVaultProjectTagResponse.js +31 -0
- package/v1/model/ShowVaultRequest.d.ts +7 -0
- package/v1/model/ShowVaultRequest.js +24 -0
- package/v1/model/ShowVaultResourceInstancesRequest.d.ts +6 -0
- package/v1/model/ShowVaultResourceInstancesRequest.js +13 -0
- package/v1/model/ShowVaultResourceInstancesResponse.d.ts +11 -0
- package/v1/model/ShowVaultResourceInstancesResponse.js +45 -0
- package/v1/model/ShowVaultResponse.d.ts +7 -0
- package/v1/model/ShowVaultResponse.js +31 -0
- package/v1/model/ShowVaultTagRequest.d.ts +7 -0
- package/v1/model/ShowVaultTagRequest.js +24 -0
- package/v1/model/ShowVaultTagResponse.d.ts +12 -0
- package/v1/model/ShowVaultTagResponse.js +45 -0
- package/v1/model/SysTag.d.ts +7 -0
- package/v1/model/SysTag.js +19 -0
- package/v1/model/SysTags.d.ts +7 -0
- package/v1/model/SysTags.js +19 -0
- package/v1/model/Tag.d.ts +7 -0
- package/v1/model/Tag.js +18 -0
- package/v1/model/TagResource.d.ts +24 -0
- package/v1/model/TagResource.js +74 -0
- package/v1/model/TagsReq.d.ts +7 -0
- package/v1/model/TagsReq.js +19 -0
- package/v1/model/TagsResp.d.ts +7 -0
- package/v1/model/TagsResp.js +17 -0
- package/v1/model/UpdateMember.d.ts +18 -0
- package/v1/model/UpdateMember.js +38 -0
- package/v1/model/UpdateMemberStatusRequest.d.ts +14 -0
- package/v1/model/UpdateMemberStatusRequest.js +43 -0
- package/v1/model/UpdateMemberStatusResponse.d.ts +7 -0
- package/v1/model/UpdateMemberStatusResponse.js +31 -0
- package/v1/model/UpdatePolicyRequest.d.ts +10 -0
- package/v1/model/UpdatePolicyRequest.js +28 -0
- package/v1/model/UpdatePolicyResponse.d.ts +7 -0
- package/v1/model/UpdatePolicyResponse.js +31 -0
- package/v1/model/UpdateVaultRequest.d.ts +10 -0
- package/v1/model/UpdateVaultRequest.js +28 -0
- package/v1/model/UpdateVaultResponse.d.ts +7 -0
- package/v1/model/UpdateVaultResponse.js +31 -0
- package/v1/model/Vault.d.ts +57 -0
- package/v1/model/Vault.js +169 -0
- package/v1/model/VaultAddResourceReq.d.ts +6 -0
- package/v1/model/VaultAddResourceReq.js +14 -0
- package/v1/model/VaultAssociate.d.ts +15 -0
- package/v1/model/VaultAssociate.js +51 -0
- package/v1/model/VaultBackup.d.ts +10 -0
- package/v1/model/VaultBackup.js +28 -0
- package/v1/model/VaultBackupReq.d.ts +6 -0
- package/v1/model/VaultBackupReq.js +14 -0
- package/v1/model/VaultBindRules.d.ts +6 -0
- package/v1/model/VaultBindRules.js +13 -0
- package/v1/model/VaultCreate.d.ts +37 -0
- package/v1/model/VaultCreate.js +102 -0
- package/v1/model/VaultCreateReq.d.ts +6 -0
- package/v1/model/VaultCreateReq.js +14 -0
- package/v1/model/VaultCreateResource.d.ts +64 -0
- package/v1/model/VaultCreateResource.js +181 -0
- package/v1/model/VaultDissociate.d.ts +7 -0
- package/v1/model/VaultDissociate.js +24 -0
- package/v1/model/VaultGet.d.ts +63 -0
- package/v1/model/VaultGet.js +188 -0
- package/v1/model/VaultMigrateResourceReq.d.ts +11 -0
- package/v1/model/VaultMigrateResourceReq.js +39 -0
- package/v1/model/VaultPolicyResp.d.ts +15 -0
- package/v1/model/VaultPolicyResp.js +53 -0
- package/v1/model/VaultRemoveResourceReq.d.ts +7 -0
- package/v1/model/VaultRemoveResourceReq.js +24 -0
- package/v1/model/VaultResourceInstancesReq.d.ts +60 -0
- package/v1/model/VaultResourceInstancesReq.js +146 -0
- package/v1/model/VaultTagsCreateReq.d.ts +6 -0
- package/v1/model/VaultTagsCreateReq.js +13 -0
- package/v1/model/VaultUpdate.d.ts +27 -0
- package/v1/model/VaultUpdate.js +77 -0
- package/v1/model/VaultUpdateReq.d.ts +6 -0
- package/v1/model/VaultUpdateReq.js +14 -0
- package/v1/public-api.d.ts +171 -0
- package/v1/public-api.js +187 -0
package/v1/CbrClient.js
ADDED
@@ -0,0 +1,2558 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
3
|
+
var extendStatics = function (d, b) {
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
|
+
return extendStatics(d, b);
|
8
|
+
};
|
9
|
+
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12
|
+
extendStatics(d, b);
|
13
|
+
function __() { this.constructor = d; }
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15
|
+
};
|
16
|
+
})();
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
18
|
+
exports.RequiredError = exports.ParamCreater = exports.CbrClient = void 0;
|
19
|
+
var ClientBuilder_1 = require("@huaweicloud/huaweicloud-sdk-core/ClientBuilder");
|
20
|
+
var AddMemberRequest_1 = require("./model/AddMemberRequest");
|
21
|
+
var AddVaultResourceRequest_1 = require("./model/AddVaultResourceRequest");
|
22
|
+
var AssociateVaultPolicyRequest_1 = require("./model/AssociateVaultPolicyRequest");
|
23
|
+
var BatchCreateAndDeleteVaultTagsRequest_1 = require("./model/BatchCreateAndDeleteVaultTagsRequest");
|
24
|
+
var CopyBackupRequest_1 = require("./model/CopyBackupRequest");
|
25
|
+
var CopyCheckpointRequest_1 = require("./model/CopyCheckpointRequest");
|
26
|
+
var CreateCheckpointRequest_1 = require("./model/CreateCheckpointRequest");
|
27
|
+
var CreatePolicyRequest_1 = require("./model/CreatePolicyRequest");
|
28
|
+
var CreateVaultRequest_1 = require("./model/CreateVaultRequest");
|
29
|
+
var CreateVaultTagsRequest_1 = require("./model/CreateVaultTagsRequest");
|
30
|
+
var DeleteBackupRequest_1 = require("./model/DeleteBackupRequest");
|
31
|
+
var DeleteMemberRequest_1 = require("./model/DeleteMemberRequest");
|
32
|
+
var DeletePolicyRequest_1 = require("./model/DeletePolicyRequest");
|
33
|
+
var DeleteVaultRequest_1 = require("./model/DeleteVaultRequest");
|
34
|
+
var DeleteVaultTagRequest_1 = require("./model/DeleteVaultTagRequest");
|
35
|
+
var DisassociateVaultPolicyRequest_1 = require("./model/DisassociateVaultPolicyRequest");
|
36
|
+
var ImportBackupRequest_1 = require("./model/ImportBackupRequest");
|
37
|
+
var ListBackupsRequest_1 = require("./model/ListBackupsRequest");
|
38
|
+
var ListOpLogsRequest_1 = require("./model/ListOpLogsRequest");
|
39
|
+
var ListPoliciesRequest_1 = require("./model/ListPoliciesRequest");
|
40
|
+
var ListProtectableRequest_1 = require("./model/ListProtectableRequest");
|
41
|
+
var ListVaultRequest_1 = require("./model/ListVaultRequest");
|
42
|
+
var MigrateVaultResourceRequest_1 = require("./model/MigrateVaultResourceRequest");
|
43
|
+
var RemoveVaultResourceRequest_1 = require("./model/RemoveVaultResourceRequest");
|
44
|
+
var RestoreBackupRequest_1 = require("./model/RestoreBackupRequest");
|
45
|
+
var ShowBackupRequest_1 = require("./model/ShowBackupRequest");
|
46
|
+
var ShowCheckpointRequest_1 = require("./model/ShowCheckpointRequest");
|
47
|
+
var ShowMemberDetailRequest_1 = require("./model/ShowMemberDetailRequest");
|
48
|
+
var ShowMembersDetailRequest_1 = require("./model/ShowMembersDetailRequest");
|
49
|
+
var ShowOpLogRequest_1 = require("./model/ShowOpLogRequest");
|
50
|
+
var ShowPolicyRequest_1 = require("./model/ShowPolicyRequest");
|
51
|
+
var ShowProtectableRequest_1 = require("./model/ShowProtectableRequest");
|
52
|
+
var ShowVaultRequest_1 = require("./model/ShowVaultRequest");
|
53
|
+
var ShowVaultResourceInstancesRequest_1 = require("./model/ShowVaultResourceInstancesRequest");
|
54
|
+
var ShowVaultTagRequest_1 = require("./model/ShowVaultTagRequest");
|
55
|
+
var UpdateMemberStatusRequest_1 = require("./model/UpdateMemberStatusRequest");
|
56
|
+
var UpdatePolicyRequest_1 = require("./model/UpdatePolicyRequest");
|
57
|
+
var UpdateVaultRequest_1 = require("./model/UpdateVaultRequest");
|
58
|
+
var CbrClient = /** @class */ (function () {
|
59
|
+
function CbrClient(client) {
|
60
|
+
this.hcClient = client;
|
61
|
+
}
|
62
|
+
CbrClient.newBuilder = function () {
|
63
|
+
return new ClientBuilder_1.ClientBuilder(newClient);
|
64
|
+
};
|
65
|
+
CbrClient.prototype.getPath = function () {
|
66
|
+
return __dirname;
|
67
|
+
};
|
68
|
+
/**
|
69
|
+
* 添加备份可共享的成员,只有云服务器备份可以添加备份共享成员,且仅支持在同一区域的不同用户间共享。
|
70
|
+
*
|
71
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
72
|
+
*
|
73
|
+
* @summary 添加备份成员
|
74
|
+
* @param {string} backupId 备份副本id
|
75
|
+
* @param {AddMembersReq} addMemberRequestBody 添加备份共享成员请求body
|
76
|
+
* @param {*} [options] Override http request option.
|
77
|
+
* @throws {RequiredError}
|
78
|
+
*/
|
79
|
+
CbrClient.prototype.addMember = function (addMemberRequest) {
|
80
|
+
var options = (0, exports.ParamCreater)().addMember(addMemberRequest);
|
81
|
+
// @ts-ignore
|
82
|
+
options['responseHeaders'] = [''];
|
83
|
+
return this.hcClient.sendRequest(options);
|
84
|
+
};
|
85
|
+
/**
|
86
|
+
* 存储库添加资源
|
87
|
+
*
|
88
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
89
|
+
*
|
90
|
+
* @summary 添加资源
|
91
|
+
* @param {string} vaultId 存储库ID
|
92
|
+
* @param {VaultAddResourceReq} addVaultResourceRequestBody 存储库添加资源参数
|
93
|
+
* @param {*} [options] Override http request option.
|
94
|
+
* @throws {RequiredError}
|
95
|
+
*/
|
96
|
+
CbrClient.prototype.addVaultResource = function (addVaultResourceRequest) {
|
97
|
+
var options = (0, exports.ParamCreater)().addVaultResource(addVaultResourceRequest);
|
98
|
+
// @ts-ignore
|
99
|
+
options['responseHeaders'] = [''];
|
100
|
+
return this.hcClient.sendRequest(options);
|
101
|
+
};
|
102
|
+
/**
|
103
|
+
* 存储库设置策略
|
104
|
+
*
|
105
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
106
|
+
*
|
107
|
+
* @summary 设置存储库策略
|
108
|
+
* @param {string} vaultId 存储库ID
|
109
|
+
* @param {VaultAssociate} associateVaultPolicyRequestBody 关联策略ID
|
110
|
+
* @param {*} [options] Override http request option.
|
111
|
+
* @throws {RequiredError}
|
112
|
+
*/
|
113
|
+
CbrClient.prototype.associateVaultPolicy = function (associateVaultPolicyRequest) {
|
114
|
+
var options = (0, exports.ParamCreater)().associateVaultPolicy(associateVaultPolicyRequest);
|
115
|
+
// @ts-ignore
|
116
|
+
options['responseHeaders'] = [''];
|
117
|
+
return this.hcClient.sendRequest(options);
|
118
|
+
};
|
119
|
+
/**
|
120
|
+
* 为指定实例批量添加或删除标签
|
121
|
+
* 标签管理服务需要使用该接口批量管理实例的标签。
|
122
|
+
* 一个资源上最多有10个标签。
|
123
|
+
* 此接口为幂等接口:
|
124
|
+
* 创建时如果请求体中存在重复key则报错。
|
125
|
+
* 创建时,不允许重复key,如果数据库存在就覆盖。
|
126
|
+
* 删除时,允许重复key。
|
127
|
+
* 删除时,如果删除的标签不存在,默认处理成功,删除时不对标签字符集范围做校验。key长度127个字符,value为255个字符。删除时tags结构体不能缺失,key不能为空,或者空字符串。
|
128
|
+
*
|
129
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
130
|
+
*
|
131
|
+
* @summary 批量添加删除存储库资源标签
|
132
|
+
* @param {string} vaultId 资源id
|
133
|
+
* @param {BulkCreateAndDeleteVaultTagsReq} [batchCreateAndDeleteVaultTagsRequestBody] 批量添加删除存储库资源标签请求body
|
134
|
+
* @param {*} [options] Override http request option.
|
135
|
+
* @throws {RequiredError}
|
136
|
+
*/
|
137
|
+
CbrClient.prototype.batchCreateAndDeleteVaultTags = function (batchCreateAndDeleteVaultTagsRequest) {
|
138
|
+
var options = (0, exports.ParamCreater)().batchCreateAndDeleteVaultTags(batchCreateAndDeleteVaultTagsRequest);
|
139
|
+
// @ts-ignore
|
140
|
+
options['responseHeaders'] = [''];
|
141
|
+
return this.hcClient.sendRequest(options);
|
142
|
+
};
|
143
|
+
/**
|
144
|
+
* 跨区域复制备份。
|
145
|
+
*
|
146
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
147
|
+
*
|
148
|
+
* @summary 复制备份
|
149
|
+
* @param {string} backupId 复制的备份ID
|
150
|
+
* @param {BackupReplicateReq} copyBackupRequestBody 复制备份请求body
|
151
|
+
* @param {*} [options] Override http request option.
|
152
|
+
* @throws {RequiredError}
|
153
|
+
*/
|
154
|
+
CbrClient.prototype.copyBackup = function (copyBackupRequest) {
|
155
|
+
var options = (0, exports.ParamCreater)().copyBackup(copyBackupRequest);
|
156
|
+
// @ts-ignore
|
157
|
+
options['responseHeaders'] = [''];
|
158
|
+
return this.hcClient.sendRequest(options);
|
159
|
+
};
|
160
|
+
/**
|
161
|
+
* 执行复制
|
162
|
+
*
|
163
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
164
|
+
*
|
165
|
+
* @summary 复制备份还原点
|
166
|
+
* @param {CheckpointReplicateReq} copyCheckpointRequestBody 创建复制
|
167
|
+
* @param {*} [options] Override http request option.
|
168
|
+
* @throws {RequiredError}
|
169
|
+
*/
|
170
|
+
CbrClient.prototype.copyCheckpoint = function (copyCheckpointRequest) {
|
171
|
+
var options = (0, exports.ParamCreater)().copyCheckpoint(copyCheckpointRequest);
|
172
|
+
// @ts-ignore
|
173
|
+
options['responseHeaders'] = [''];
|
174
|
+
return this.hcClient.sendRequest(options);
|
175
|
+
};
|
176
|
+
/**
|
177
|
+
* 对存储库执行备份,生成备份还原点
|
178
|
+
*
|
179
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
180
|
+
*
|
181
|
+
* @summary 创建备份还原点
|
182
|
+
* @param {VaultBackupReq} createCheckpointRequestBody vault维度执行备份
|
183
|
+
* @param {*} [options] Override http request option.
|
184
|
+
* @throws {RequiredError}
|
185
|
+
*/
|
186
|
+
CbrClient.prototype.createCheckpoint = function (createCheckpointRequest) {
|
187
|
+
var options = (0, exports.ParamCreater)().createCheckpoint(createCheckpointRequest);
|
188
|
+
// @ts-ignore
|
189
|
+
options['responseHeaders'] = [''];
|
190
|
+
return this.hcClient.sendRequest(options);
|
191
|
+
};
|
192
|
+
/**
|
193
|
+
* 创建策略,策略分为备份策略和复制策略。
|
194
|
+
*
|
195
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
196
|
+
*
|
197
|
+
* @summary 创建策略
|
198
|
+
* @param {PolicyCreateReq} createPolicyRequestBody 创建策略body
|
199
|
+
* @param {*} [options] Override http request option.
|
200
|
+
* @throws {RequiredError}
|
201
|
+
*/
|
202
|
+
CbrClient.prototype.createPolicy = function (createPolicyRequest) {
|
203
|
+
var options = (0, exports.ParamCreater)().createPolicy(createPolicyRequest);
|
204
|
+
// @ts-ignore
|
205
|
+
options['responseHeaders'] = [''];
|
206
|
+
return this.hcClient.sendRequest(options);
|
207
|
+
};
|
208
|
+
/**
|
209
|
+
* 创建存储库
|
210
|
+
*
|
211
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
212
|
+
*
|
213
|
+
* @summary 创建存储库
|
214
|
+
* @param {VaultCreateReq} createVaultRequestBody 存储库创建参数
|
215
|
+
* @param {*} [options] Override http request option.
|
216
|
+
* @throws {RequiredError}
|
217
|
+
*/
|
218
|
+
CbrClient.prototype.createVault = function (createVaultRequest) {
|
219
|
+
var options = (0, exports.ParamCreater)().createVault(createVaultRequest);
|
220
|
+
// @ts-ignore
|
221
|
+
options['responseHeaders'] = [''];
|
222
|
+
return this.hcClient.sendRequest(options);
|
223
|
+
};
|
224
|
+
/**
|
225
|
+
* 一个资源上最多有10个标签。
|
226
|
+
* 此接口为幂等接口:创建时,如果创建的标签已经存在(key相同),则覆盖。
|
227
|
+
*
|
228
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
229
|
+
*
|
230
|
+
* @summary 添加存储库资源标签
|
231
|
+
* @param {string} vaultId 资源id
|
232
|
+
* @param {VaultTagsCreateReq} [createVaultTagsRequestBody] 添加存储库资源标签参数
|
233
|
+
* @param {*} [options] Override http request option.
|
234
|
+
* @throws {RequiredError}
|
235
|
+
*/
|
236
|
+
CbrClient.prototype.createVaultTags = function (createVaultTagsRequest) {
|
237
|
+
var options = (0, exports.ParamCreater)().createVaultTags(createVaultTagsRequest);
|
238
|
+
// @ts-ignore
|
239
|
+
options['responseHeaders'] = [''];
|
240
|
+
return this.hcClient.sendRequest(options);
|
241
|
+
};
|
242
|
+
/**
|
243
|
+
* 删除单个备份。
|
244
|
+
*
|
245
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
246
|
+
*
|
247
|
+
* @summary 删除备份
|
248
|
+
* @param {string} backupId 指定删除的备份ID
|
249
|
+
* @param {*} [options] Override http request option.
|
250
|
+
* @throws {RequiredError}
|
251
|
+
*/
|
252
|
+
CbrClient.prototype.deleteBackup = function (deleteBackupRequest) {
|
253
|
+
var options = (0, exports.ParamCreater)().deleteBackup(deleteBackupRequest);
|
254
|
+
// @ts-ignore
|
255
|
+
options['responseHeaders'] = [''];
|
256
|
+
return this.hcClient.sendRequest(options);
|
257
|
+
};
|
258
|
+
/**
|
259
|
+
* 删除指定的备份共享成员
|
260
|
+
*
|
261
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
262
|
+
*
|
263
|
+
* @summary 删除指定备份成员
|
264
|
+
* @param {string} backupId 备份副本id
|
265
|
+
* @param {string} memberId 成员id
|
266
|
+
* @param {*} [options] Override http request option.
|
267
|
+
* @throws {RequiredError}
|
268
|
+
*/
|
269
|
+
CbrClient.prototype.deleteMember = function (deleteMemberRequest) {
|
270
|
+
var options = (0, exports.ParamCreater)().deleteMember(deleteMemberRequest);
|
271
|
+
// @ts-ignore
|
272
|
+
options['responseHeaders'] = [''];
|
273
|
+
return this.hcClient.sendRequest(options);
|
274
|
+
};
|
275
|
+
/**
|
276
|
+
* 删除策略
|
277
|
+
*
|
278
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
279
|
+
*
|
280
|
+
* @summary 删除策略
|
281
|
+
* @param {string} policyId 策略ID
|
282
|
+
* @param {*} [options] Override http request option.
|
283
|
+
* @throws {RequiredError}
|
284
|
+
*/
|
285
|
+
CbrClient.prototype.deletePolicy = function (deletePolicyRequest) {
|
286
|
+
var options = (0, exports.ParamCreater)().deletePolicy(deletePolicyRequest);
|
287
|
+
// @ts-ignore
|
288
|
+
options['responseHeaders'] = [''];
|
289
|
+
return this.hcClient.sendRequest(options);
|
290
|
+
};
|
291
|
+
/**
|
292
|
+
* 删除存储库。若删除储存库,将一并删除存储库中的所有备份。
|
293
|
+
*
|
294
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
295
|
+
*
|
296
|
+
* @summary 删除存储库
|
297
|
+
* @param {string} vaultId 存储库ID
|
298
|
+
* @param {*} [options] Override http request option.
|
299
|
+
* @throws {RequiredError}
|
300
|
+
*/
|
301
|
+
CbrClient.prototype.deleteVault = function (deleteVaultRequest) {
|
302
|
+
var options = (0, exports.ParamCreater)().deleteVault(deleteVaultRequest);
|
303
|
+
// @ts-ignore
|
304
|
+
options['responseHeaders'] = [''];
|
305
|
+
return this.hcClient.sendRequest(options);
|
306
|
+
};
|
307
|
+
/**
|
308
|
+
* 幂等接口:删除时,如果删除的标签不存在,返回404。Key不能为空或者空字符串。
|
309
|
+
*
|
310
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
311
|
+
*
|
312
|
+
* @summary 删除存储库资源标签
|
313
|
+
* @param {string} key 不能为空或空字符串,不检查长度和字符集,去掉key前后的空格后检查,去掉key前后的空格后使用。 即使底层存在非法的tag也要能删。
|
314
|
+
* @param {string} vaultId 资源id
|
315
|
+
* @param {*} [options] Override http request option.
|
316
|
+
* @throws {RequiredError}
|
317
|
+
*/
|
318
|
+
CbrClient.prototype.deleteVaultTag = function (deleteVaultTagRequest) {
|
319
|
+
var options = (0, exports.ParamCreater)().deleteVaultTag(deleteVaultTagRequest);
|
320
|
+
// @ts-ignore
|
321
|
+
options['responseHeaders'] = [''];
|
322
|
+
return this.hcClient.sendRequest(options);
|
323
|
+
};
|
324
|
+
/**
|
325
|
+
* 存储库解除策略
|
326
|
+
*
|
327
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
328
|
+
*
|
329
|
+
* @summary 解除存储库策略
|
330
|
+
* @param {string} vaultId 存储库ID
|
331
|
+
* @param {VaultDissociate} disassociateVaultPolicyRequestBody 解除策略参数
|
332
|
+
* @param {*} [options] Override http request option.
|
333
|
+
* @throws {RequiredError}
|
334
|
+
*/
|
335
|
+
CbrClient.prototype.disassociateVaultPolicy = function (disassociateVaultPolicyRequest) {
|
336
|
+
var options = (0, exports.ParamCreater)().disassociateVaultPolicy(disassociateVaultPolicyRequest);
|
337
|
+
// @ts-ignore
|
338
|
+
options['responseHeaders'] = [''];
|
339
|
+
return this.hcClient.sendRequest(options);
|
340
|
+
};
|
341
|
+
/**
|
342
|
+
* 同步线下混合云VMware备份副本
|
343
|
+
*
|
344
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
345
|
+
*
|
346
|
+
* @summary 同步备份
|
347
|
+
* @param {BackupSyncReq} importBackupRequestBody 同步备份请求体
|
348
|
+
* @param {*} [options] Override http request option.
|
349
|
+
* @throws {RequiredError}
|
350
|
+
*/
|
351
|
+
CbrClient.prototype.importBackup = function (importBackupRequest) {
|
352
|
+
var options = (0, exports.ParamCreater)().importBackup(importBackupRequest);
|
353
|
+
// @ts-ignore
|
354
|
+
options['responseHeaders'] = [''];
|
355
|
+
return this.hcClient.sendRequest(options);
|
356
|
+
};
|
357
|
+
/**
|
358
|
+
* 查询所有副本
|
359
|
+
*
|
360
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
361
|
+
*
|
362
|
+
* @summary 查询所有备份
|
363
|
+
* @param {string} [checkpointId] 还原点ID
|
364
|
+
* @param {boolean} [dec] 专属云 (专属云场景使用,非专属云场景不生效)
|
365
|
+
* @param {string} [endTime] 备份产生时间范围的结束时间,格式为%YYYY-%mm-%ddT%HH:%MM:%SSZ,例如2018-02-01T12:00:00Z
|
366
|
+
* @param {'backup' | 'replication'} [imageType] 备份类型
|
367
|
+
* @param {number} [limit] 每页显示的条目数量,正整数
|
368
|
+
* @param {string} [marker] 上一次查询最后一条的id
|
369
|
+
* @param {string} [name] 名称
|
370
|
+
* @param {number} [offset] 偏移值,正整数
|
371
|
+
* @param {string} [resourceAz] 支持按az来过滤
|
372
|
+
* @param {string} [resourceId] 资源ID
|
373
|
+
* @param {string} [resourceName] 资源名称
|
374
|
+
* @param {'OS::Cinder::Volume' | 'OS::Nova::Server' | 'OS::Workspace::DesktopV2'} [resourceType] 资源类型: 云服务器: OS::Nova::Server, 云硬盘: OS::Cinder::Volume, 云桌面:OS::Workspace::DesktopV2
|
375
|
+
* @param {string} [sort] sort的内容为一组由逗号分隔的属性及可选排序方向组成,形如<key1>[:<direction>],<key2>[:<direction>],其中direction的取值为asc (升序) 或 desc (降序),如没有传入direction参数,默认为降序,sort内容的长度限制为255个字符。key取值范围:[created_at,updated_at,name,status,protected_at,id]
|
376
|
+
* @param {string} [startTime] 备份产生时间范围的开始时间,格式为%YYYY-%mm-%ddT%HH:%MM:%SSZ,例如2018-02-01T12:00:00Z
|
377
|
+
* @param {'available' | 'protecting' | 'deleting' | 'restoring' | 'error' | 'waiting_protect' | 'waiting_delete' | 'waiting_restore'} [status] 状态。 调用API时,支持通过传多个status值进行过滤。例如:status=available&status=error
|
378
|
+
* @param {string} [vaultId] 存储库ID
|
379
|
+
* @param {string} [enterpriseProjectId] 企业项目id或all_granted_eps,all_granted_eps表示查询用户有权限的所有企业项目id
|
380
|
+
* @param {'all_granted' | 'private' | 'shared'} [ownType] 持有类型,私有的private/共享的shared/全部all_granted,默认只查询private。
|
381
|
+
* @param {'pending' | 'accepted' | 'rejected'} [memberStatus] 共享状态
|
382
|
+
* @param {string} [parentId] 父备份ID
|
383
|
+
* @param {string} [usedPercent] 根据存储库使用率过滤备份,取值范围 [1, 100],含1和100。例如,used_percent=80,表示筛选所属存储库使用率大于等于80%的所有备份。
|
384
|
+
* @param {boolean} [showReplication] 是否返回复制记录
|
385
|
+
* @param {boolean} [incremental] 是否是增备
|
386
|
+
* @param {*} [options] Override http request option.
|
387
|
+
* @throws {RequiredError}
|
388
|
+
*/
|
389
|
+
CbrClient.prototype.listBackups = function (listBackupsRequest) {
|
390
|
+
var options = (0, exports.ParamCreater)().listBackups(listBackupsRequest);
|
391
|
+
// @ts-ignore
|
392
|
+
options['responseHeaders'] = [''];
|
393
|
+
return this.hcClient.sendRequest(options);
|
394
|
+
};
|
395
|
+
/**
|
396
|
+
* 查询任务列表
|
397
|
+
*
|
398
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
399
|
+
*
|
400
|
+
* @summary 查询任务列表
|
401
|
+
* @param {string} [endTime] 任务结束时间,格式为%YYYY-%mm-%ddT%HH:%MM:%SSZ,例如2018-02-01T12:00:00Z
|
402
|
+
* @param {number} [limit] 每页显示的条目数量,正整数
|
403
|
+
* @param {number} [offset] 偏移值,正整数
|
404
|
+
* @param {'backup' | 'copy' | 'replication' | 'delete' | 'restore' | 'vault_delete' | 'remove_resource' | 'sync'} [operationType] 任务类型
|
405
|
+
* @param {string} [providerId] 备份提供商ID
|
406
|
+
* @param {string} [resourceId] 该任务操作的资源ID
|
407
|
+
* @param {string} [resourceName] 该任务操作的资源名称
|
408
|
+
* @param {string} [startTime] 任务开始时间,格式为%YYYY-%mm-%ddT%HH:%MM:%SSZ,例如2018-01-01T12:00:00Z
|
409
|
+
* @param {'success' | 'skipped' | 'failed' | 'running' | 'timeout' | 'waiting'} [status] 任务状态
|
410
|
+
* @param {string} [vaultId] 存储库ID,该任务操作的资源所属绑定的存储库。
|
411
|
+
* @param {string} [vaultName] 存储库名称,该任务操作资源所绑定的存储库名称。
|
412
|
+
* @param {string} [enterpriseProjectId] 企业项目id或all_granted_eps,all_granted_eps表示查询用户有权限的所有企业项目id
|
413
|
+
* @param {*} [options] Override http request option.
|
414
|
+
* @throws {RequiredError}
|
415
|
+
*/
|
416
|
+
CbrClient.prototype.listOpLogs = function (listOpLogsRequest) {
|
417
|
+
var options = (0, exports.ParamCreater)().listOpLogs(listOpLogsRequest);
|
418
|
+
// @ts-ignore
|
419
|
+
options['responseHeaders'] = [''];
|
420
|
+
return this.hcClient.sendRequest(options);
|
421
|
+
};
|
422
|
+
/**
|
423
|
+
* 查询策略列表
|
424
|
+
*
|
425
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
426
|
+
*
|
427
|
+
* @summary 查询策略列表
|
428
|
+
* @param {'backup' | 'replication'} [operationType] 策略类型:备份(backup)、复制(replication)
|
429
|
+
* @param {string} [vaultId] 存储库ID
|
430
|
+
* @param {*} [options] Override http request option.
|
431
|
+
* @throws {RequiredError}
|
432
|
+
*/
|
433
|
+
CbrClient.prototype.listPolicies = function (listPoliciesRequest) {
|
434
|
+
var options = (0, exports.ParamCreater)().listPolicies(listPoliciesRequest);
|
435
|
+
// @ts-ignore
|
436
|
+
options['responseHeaders'] = [''];
|
437
|
+
return this.hcClient.sendRequest(options);
|
438
|
+
};
|
439
|
+
/**
|
440
|
+
* 查询可保护性资源列表
|
441
|
+
*
|
442
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
443
|
+
*
|
444
|
+
* @summary 查询可保护资源
|
445
|
+
* @param {'server' | 'disk'} protectableType 对象类型
|
446
|
+
* @param {number} [limit] 每页显示的条目数量,每页最多支持50条
|
447
|
+
* @param {string} [marker] 上一次查询最后一条的ID
|
448
|
+
* @param {string} [name] 按名称过滤
|
449
|
+
* @param {number} [offset] 偏移值
|
450
|
+
* @param {string} [status] 资源的状态,如available,error 等
|
451
|
+
* @param {string} [id] 根据资源id过滤
|
452
|
+
* @param {string} [serverId] 根据该id过滤属于该服务器的所有磁盘,支持企业多项目的用户才能传入此参数
|
453
|
+
* @param {*} [options] Override http request option.
|
454
|
+
* @throws {RequiredError}
|
455
|
+
*/
|
456
|
+
CbrClient.prototype.listProtectable = function (listProtectableRequest) {
|
457
|
+
var options = (0, exports.ParamCreater)().listProtectable(listProtectableRequest);
|
458
|
+
// @ts-ignore
|
459
|
+
options['responseHeaders'] = [''];
|
460
|
+
return this.hcClient.sendRequest(options);
|
461
|
+
};
|
462
|
+
/**
|
463
|
+
* 查询存储库列表
|
464
|
+
*
|
465
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
466
|
+
*
|
467
|
+
* @summary 查询存储库列表
|
468
|
+
* @param {number} [limit] 每页显示条目数,正整数
|
469
|
+
* @param {string} [name] 存储库名称
|
470
|
+
* @param {number} [offset] 偏移值,正整数
|
471
|
+
* @param {'public' | 'hybrid'} [cloudType] 云类型
|
472
|
+
* @param {'backup' | 'replication'} [protectType] 保护类型
|
473
|
+
* @param {string} [objectType] 对象类型:云服务器(server),云硬盘(disk),文件系统(turbo),云桌面(workspace),VMware(vmware),关系型数据库(rds),文件(file)。
|
474
|
+
* @param {string} [enterpriseProjectId] 企业项目id或all_granted_eps,all_granted_eps表示查询用户有权限的所有企业项目id
|
475
|
+
* @param {string} [id] 存储库ID
|
476
|
+
* @param {string} [policyId] 策略ID
|
477
|
+
* @param {string} [status] 状态
|
478
|
+
* @param {string} [resourceIds] 资源id
|
479
|
+
* @param {*} [options] Override http request option.
|
480
|
+
* @throws {RequiredError}
|
481
|
+
*/
|
482
|
+
CbrClient.prototype.listVault = function (listVaultRequest) {
|
483
|
+
var options = (0, exports.ParamCreater)().listVault(listVaultRequest);
|
484
|
+
// @ts-ignore
|
485
|
+
options['responseHeaders'] = [''];
|
486
|
+
return this.hcClient.sendRequest(options);
|
487
|
+
};
|
488
|
+
/**
|
489
|
+
* 支持资源迁移到另一个存储库,不删除备份。
|
490
|
+
*
|
491
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
492
|
+
*
|
493
|
+
* @summary 迁移资源
|
494
|
+
* @param {string} vaultId
|
495
|
+
* @param {VaultMigrateResourceReq} migrateVaultResourceRequestBody 迁移资源请求体
|
496
|
+
* @param {*} [options] Override http request option.
|
497
|
+
* @throws {RequiredError}
|
498
|
+
*/
|
499
|
+
CbrClient.prototype.migrateVaultResource = function (migrateVaultResourceRequest) {
|
500
|
+
var options = (0, exports.ParamCreater)().migrateVaultResource(migrateVaultResourceRequest);
|
501
|
+
// @ts-ignore
|
502
|
+
options['responseHeaders'] = [''];
|
503
|
+
return this.hcClient.sendRequest(options);
|
504
|
+
};
|
505
|
+
/**
|
506
|
+
* 移除存储库中的资源,若移除资源,将一并删除该资源在保管库中的备份
|
507
|
+
*
|
508
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
509
|
+
*
|
510
|
+
* @summary 移除资源
|
511
|
+
* @param {string} vaultId 存储库ID
|
512
|
+
* @param {VaultRemoveResourceReq} removeVaultResourceRequestBody 存储库移除资源参数
|
513
|
+
* @param {*} [options] Override http request option.
|
514
|
+
* @throws {RequiredError}
|
515
|
+
*/
|
516
|
+
CbrClient.prototype.removeVaultResource = function (removeVaultResourceRequest) {
|
517
|
+
var options = (0, exports.ParamCreater)().removeVaultResource(removeVaultResourceRequest);
|
518
|
+
// @ts-ignore
|
519
|
+
options['responseHeaders'] = [''];
|
520
|
+
return this.hcClient.sendRequest(options);
|
521
|
+
};
|
522
|
+
/**
|
523
|
+
* 恢复备份数据
|
524
|
+
*
|
525
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
526
|
+
*
|
527
|
+
* @summary 备份恢复
|
528
|
+
* @param {string} backupId 备份id
|
529
|
+
* @param {BackupRestoreReq} restoreBackupRequestBody 恢复请求body
|
530
|
+
* @param {*} [options] Override http request option.
|
531
|
+
* @throws {RequiredError}
|
532
|
+
*/
|
533
|
+
CbrClient.prototype.restoreBackup = function (restoreBackupRequest) {
|
534
|
+
var options = (0, exports.ParamCreater)().restoreBackup(restoreBackupRequest);
|
535
|
+
// @ts-ignore
|
536
|
+
options['responseHeaders'] = [''];
|
537
|
+
return this.hcClient.sendRequest(options);
|
538
|
+
};
|
539
|
+
/**
|
540
|
+
* 根据指定id查询单个副本。
|
541
|
+
*
|
542
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
543
|
+
*
|
544
|
+
* @summary 查询指定备份
|
545
|
+
* @param {string} backupId 备份ID
|
546
|
+
* @param {*} [options] Override http request option.
|
547
|
+
* @throws {RequiredError}
|
548
|
+
*/
|
549
|
+
CbrClient.prototype.showBackup = function (showBackupRequest) {
|
550
|
+
var options = (0, exports.ParamCreater)().showBackup(showBackupRequest);
|
551
|
+
// @ts-ignore
|
552
|
+
options['responseHeaders'] = [''];
|
553
|
+
return this.hcClient.sendRequest(options);
|
554
|
+
};
|
555
|
+
/**
|
556
|
+
* 根据还原点ID查询指定还原点
|
557
|
+
*
|
558
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
559
|
+
*
|
560
|
+
* @summary 查询备份还原点
|
561
|
+
* @param {string} checkpointId 还原点ID
|
562
|
+
* @param {*} [options] Override http request option.
|
563
|
+
* @throws {RequiredError}
|
564
|
+
*/
|
565
|
+
CbrClient.prototype.showCheckpoint = function (showCheckpointRequest) {
|
566
|
+
var options = (0, exports.ParamCreater)().showCheckpoint(showCheckpointRequest);
|
567
|
+
// @ts-ignore
|
568
|
+
options['responseHeaders'] = [''];
|
569
|
+
return this.hcClient.sendRequest(options);
|
570
|
+
};
|
571
|
+
/**
|
572
|
+
* 获取备份成员的详情
|
573
|
+
*
|
574
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
575
|
+
*
|
576
|
+
* @summary 获取备份成员详情
|
577
|
+
* @param {string} backupId 备份副本id
|
578
|
+
* @param {string} memberId 成员id,为接收方的project_id
|
579
|
+
* @param {*} [options] Override http request option.
|
580
|
+
* @throws {RequiredError}
|
581
|
+
*/
|
582
|
+
CbrClient.prototype.showMemberDetail = function (showMemberDetailRequest) {
|
583
|
+
var options = (0, exports.ParamCreater)().showMemberDetail(showMemberDetailRequest);
|
584
|
+
// @ts-ignore
|
585
|
+
options['responseHeaders'] = [''];
|
586
|
+
return this.hcClient.sendRequest(options);
|
587
|
+
};
|
588
|
+
/**
|
589
|
+
* 获取备份共享成员的列表信息
|
590
|
+
*
|
591
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
592
|
+
*
|
593
|
+
* @summary 获取备份成员列表
|
594
|
+
* @param {string} backupId 备份id
|
595
|
+
* @param {string} [destProjectId] 接受备份共享的项目id
|
596
|
+
* @param {string} [imageId] 接受的共享备份副本注册的镜像id
|
597
|
+
* @param {string} [status] 备份共享状态
|
598
|
+
* @param {string} [vaultId] 目标端接受共享备份的存储库id,仅支持uuid
|
599
|
+
* @param {number} [limit] 每页显示的条目数量,正整数
|
600
|
+
* @param {string} [marker] 上一次查询最后一条的id,仅支持uuid
|
601
|
+
* @param {number} [offset] 偏移值,正整数
|
602
|
+
* @param {string} [sort] sort的内容为一组由逗号分隔的属性及可选排序方向组成,形如<key1>[:<direction>],<key2>[:<direction>],其中direction的取值为asc (升序) 或 desc (降序),如没有传入direction参数,默认为降序,sort内容的长度限制为255个字符。
|
603
|
+
* @param {*} [options] Override http request option.
|
604
|
+
* @throws {RequiredError}
|
605
|
+
*/
|
606
|
+
CbrClient.prototype.showMembersDetail = function (showMembersDetailRequest) {
|
607
|
+
var options = (0, exports.ParamCreater)().showMembersDetail(showMembersDetailRequest);
|
608
|
+
// @ts-ignore
|
609
|
+
options['responseHeaders'] = [''];
|
610
|
+
return this.hcClient.sendRequest(options);
|
611
|
+
};
|
612
|
+
/**
|
613
|
+
* 根据指定任务ID查询任务
|
614
|
+
*
|
615
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
616
|
+
*
|
617
|
+
* @summary 查询单个任务
|
618
|
+
* @param {string} operationLogId 任务ID
|
619
|
+
* @param {*} [options] Override http request option.
|
620
|
+
* @throws {RequiredError}
|
621
|
+
*/
|
622
|
+
CbrClient.prototype.showOpLog = function (showOpLogRequest) {
|
623
|
+
var options = (0, exports.ParamCreater)().showOpLog(showOpLogRequest);
|
624
|
+
// @ts-ignore
|
625
|
+
options['responseHeaders'] = [''];
|
626
|
+
return this.hcClient.sendRequest(options);
|
627
|
+
};
|
628
|
+
/**
|
629
|
+
* 查询单个策略
|
630
|
+
*
|
631
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
632
|
+
*
|
633
|
+
* @summary 查询单个策略
|
634
|
+
* @param {string} policyId 策略ID
|
635
|
+
* @param {*} [options] Override http request option.
|
636
|
+
* @throws {RequiredError}
|
637
|
+
*/
|
638
|
+
CbrClient.prototype.showPolicy = function (showPolicyRequest) {
|
639
|
+
var options = (0, exports.ParamCreater)().showPolicy(showPolicyRequest);
|
640
|
+
// @ts-ignore
|
641
|
+
options['responseHeaders'] = [''];
|
642
|
+
return this.hcClient.sendRequest(options);
|
643
|
+
};
|
644
|
+
/**
|
645
|
+
* 根据ID查询可保护性资源
|
646
|
+
*
|
647
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
648
|
+
*
|
649
|
+
* @summary 查询指定可保护资源
|
650
|
+
* @param {string} instanceId 资源ID
|
651
|
+
* @param {'server' | 'disk'} protectableType 可保护性类型
|
652
|
+
* @param {*} [options] Override http request option.
|
653
|
+
* @throws {RequiredError}
|
654
|
+
*/
|
655
|
+
CbrClient.prototype.showProtectable = function (showProtectableRequest) {
|
656
|
+
var options = (0, exports.ParamCreater)().showProtectable(showProtectableRequest);
|
657
|
+
// @ts-ignore
|
658
|
+
options['responseHeaders'] = [''];
|
659
|
+
return this.hcClient.sendRequest(options);
|
660
|
+
};
|
661
|
+
/**
|
662
|
+
* 查询本区域的复制能力
|
663
|
+
*
|
664
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
665
|
+
*
|
666
|
+
* @summary 查询复制能力
|
667
|
+
* @param {*} [options] Override http request option.
|
668
|
+
* @throws {RequiredError}
|
669
|
+
*/
|
670
|
+
CbrClient.prototype.showReplicationCapabilities = function () {
|
671
|
+
var options = (0, exports.ParamCreater)().showReplicationCapabilities();
|
672
|
+
// @ts-ignore
|
673
|
+
options['responseHeaders'] = [''];
|
674
|
+
return this.hcClient.sendRequest(options);
|
675
|
+
};
|
676
|
+
/**
|
677
|
+
* 根据ID查询指定存储库
|
678
|
+
*
|
679
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
680
|
+
*
|
681
|
+
* @summary 查询指定存储库
|
682
|
+
* @param {string} vaultId 存储库ID
|
683
|
+
* @param {*} [options] Override http request option.
|
684
|
+
* @throws {RequiredError}
|
685
|
+
*/
|
686
|
+
CbrClient.prototype.showVault = function (showVaultRequest) {
|
687
|
+
var options = (0, exports.ParamCreater)().showVault(showVaultRequest);
|
688
|
+
// @ts-ignore
|
689
|
+
options['responseHeaders'] = [''];
|
690
|
+
return this.hcClient.sendRequest(options);
|
691
|
+
};
|
692
|
+
/**
|
693
|
+
* 查询租户在指定Region和实例类型的所有标签集合
|
694
|
+
* 标签管理服务需要能够列出当前租户全部已使用的标签集合,为各服务Console打标签和过滤实例时提供标签联想功能
|
695
|
+
*
|
696
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
697
|
+
*
|
698
|
+
* @summary 查询存储库项目标签
|
699
|
+
* @param {*} [options] Override http request option.
|
700
|
+
* @throws {RequiredError}
|
701
|
+
*/
|
702
|
+
CbrClient.prototype.showVaultProjectTag = function () {
|
703
|
+
var options = (0, exports.ParamCreater)().showVaultProjectTag();
|
704
|
+
// @ts-ignore
|
705
|
+
options['responseHeaders'] = [''];
|
706
|
+
return this.hcClient.sendRequest(options);
|
707
|
+
};
|
708
|
+
/**
|
709
|
+
* 使用标签过滤实例
|
710
|
+
* 标签管理服务需要提供按标签过滤各服务实例并汇总显示在列表中,需要各服务提供查询能力
|
711
|
+
*
|
712
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
713
|
+
*
|
714
|
+
* @summary 查询存储库资源实例
|
715
|
+
* @param {VaultResourceInstancesReq} showVaultResourceInstancesRequestBody 查询存储库资源实例参数
|
716
|
+
* @param {*} [options] Override http request option.
|
717
|
+
* @throws {RequiredError}
|
718
|
+
*/
|
719
|
+
CbrClient.prototype.showVaultResourceInstances = function (showVaultResourceInstancesRequest) {
|
720
|
+
var options = (0, exports.ParamCreater)().showVaultResourceInstances(showVaultResourceInstancesRequest);
|
721
|
+
// @ts-ignore
|
722
|
+
options['responseHeaders'] = [''];
|
723
|
+
return this.hcClient.sendRequest(options);
|
724
|
+
};
|
725
|
+
/**
|
726
|
+
* 查询指定实例的标签信息
|
727
|
+
* 标签管理服务需要使用该接口查询指定实例的全部标签数据
|
728
|
+
*
|
729
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
730
|
+
*
|
731
|
+
* @summary 查询存储库资源标签
|
732
|
+
* @param {string} vaultId 资源id
|
733
|
+
* @param {*} [options] Override http request option.
|
734
|
+
* @throws {RequiredError}
|
735
|
+
*/
|
736
|
+
CbrClient.prototype.showVaultTag = function (showVaultTagRequest) {
|
737
|
+
var options = (0, exports.ParamCreater)().showVaultTag(showVaultTagRequest);
|
738
|
+
// @ts-ignore
|
739
|
+
options['responseHeaders'] = [''];
|
740
|
+
return this.hcClient.sendRequest(options);
|
741
|
+
};
|
742
|
+
/**
|
743
|
+
* 更新备份共享成员的状态,需要接收方执行此API。
|
744
|
+
*
|
745
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
746
|
+
*
|
747
|
+
* @summary 更新备份成员状态
|
748
|
+
* @param {string} memberId 成员id,成员id与项目id为同一个。
|
749
|
+
* @param {string} backupId 备份副本id
|
750
|
+
* @param {UpdateMember} [updateMemberStatusRequestBody] 备份共享更新请求体
|
751
|
+
* @param {*} [options] Override http request option.
|
752
|
+
* @throws {RequiredError}
|
753
|
+
*/
|
754
|
+
CbrClient.prototype.updateMemberStatus = function (updateMemberStatusRequest) {
|
755
|
+
var options = (0, exports.ParamCreater)().updateMemberStatus(updateMemberStatusRequest);
|
756
|
+
// @ts-ignore
|
757
|
+
options['responseHeaders'] = [''];
|
758
|
+
return this.hcClient.sendRequest(options);
|
759
|
+
};
|
760
|
+
/**
|
761
|
+
* 修改策略
|
762
|
+
*
|
763
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
764
|
+
*
|
765
|
+
* @summary 修改策略
|
766
|
+
* @param {string} policyId 策略ID
|
767
|
+
* @param {PolicyUpdateReq} updatePolicyRequestBody 修改策略body
|
768
|
+
* @param {*} [options] Override http request option.
|
769
|
+
* @throws {RequiredError}
|
770
|
+
*/
|
771
|
+
CbrClient.prototype.updatePolicy = function (updatePolicyRequest) {
|
772
|
+
var options = (0, exports.ParamCreater)().updatePolicy(updatePolicyRequest);
|
773
|
+
// @ts-ignore
|
774
|
+
options['responseHeaders'] = [''];
|
775
|
+
return this.hcClient.sendRequest(options);
|
776
|
+
};
|
777
|
+
/**
|
778
|
+
* 根据存储库ID修改存储库
|
779
|
+
*
|
780
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
781
|
+
*
|
782
|
+
* @summary 修改存储库
|
783
|
+
* @param {string} vaultId 存储库ID
|
784
|
+
* @param {VaultUpdateReq} updateVaultRequestBody 存储修改参数
|
785
|
+
* @param {*} [options] Override http request option.
|
786
|
+
* @throws {RequiredError}
|
787
|
+
*/
|
788
|
+
CbrClient.prototype.updateVault = function (updateVaultRequest) {
|
789
|
+
var options = (0, exports.ParamCreater)().updateVault(updateVaultRequest);
|
790
|
+
// @ts-ignore
|
791
|
+
options['responseHeaders'] = [''];
|
792
|
+
return this.hcClient.sendRequest(options);
|
793
|
+
};
|
794
|
+
return CbrClient;
|
795
|
+
}());
|
796
|
+
exports.CbrClient = CbrClient;
|
797
|
+
var ParamCreater = function () {
|
798
|
+
return {
|
799
|
+
/**
|
800
|
+
* 添加备份可共享的成员,只有云服务器备份可以添加备份共享成员,且仅支持在同一区域的不同用户间共享。
|
801
|
+
*
|
802
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
803
|
+
*/
|
804
|
+
addMember: function (addMemberRequest) {
|
805
|
+
var options = {
|
806
|
+
method: "POST",
|
807
|
+
url: "/v3/{project_id}/backups/{backup_id}/members",
|
808
|
+
contentType: "application/json;charset=UTF-8",
|
809
|
+
queryParams: {},
|
810
|
+
pathParams: {},
|
811
|
+
headers: {},
|
812
|
+
data: {}
|
813
|
+
};
|
814
|
+
var localVarHeaderParameter = {};
|
815
|
+
var body;
|
816
|
+
var backupId;
|
817
|
+
if (addMemberRequest !== null && addMemberRequest !== undefined) {
|
818
|
+
if (addMemberRequest instanceof AddMemberRequest_1.AddMemberRequest) {
|
819
|
+
backupId = addMemberRequest.backupId;
|
820
|
+
body = addMemberRequest.body;
|
821
|
+
}
|
822
|
+
else {
|
823
|
+
backupId = addMemberRequest['backup_id'];
|
824
|
+
body = addMemberRequest['body'];
|
825
|
+
}
|
826
|
+
}
|
827
|
+
if (backupId === null || backupId === undefined) {
|
828
|
+
throw new RequiredError('backupId', 'Required parameter backupId was null or undefined when calling addMember.');
|
829
|
+
}
|
830
|
+
if (body === null || body === undefined) {
|
831
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
832
|
+
}
|
833
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
834
|
+
options.data = body !== undefined ? body : {};
|
835
|
+
options.pathParams = { 'backup_id': backupId, };
|
836
|
+
options.headers = localVarHeaderParameter;
|
837
|
+
return options;
|
838
|
+
},
|
839
|
+
/**
|
840
|
+
* 存储库添加资源
|
841
|
+
*
|
842
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
843
|
+
*/
|
844
|
+
addVaultResource: function (addVaultResourceRequest) {
|
845
|
+
var options = {
|
846
|
+
method: "POST",
|
847
|
+
url: "/v3/{project_id}/vaults/{vault_id}/addresources",
|
848
|
+
contentType: "application/json;charset=UTF-8",
|
849
|
+
queryParams: {},
|
850
|
+
pathParams: {},
|
851
|
+
headers: {},
|
852
|
+
data: {}
|
853
|
+
};
|
854
|
+
var localVarHeaderParameter = {};
|
855
|
+
var body;
|
856
|
+
var vaultId;
|
857
|
+
if (addVaultResourceRequest !== null && addVaultResourceRequest !== undefined) {
|
858
|
+
if (addVaultResourceRequest instanceof AddVaultResourceRequest_1.AddVaultResourceRequest) {
|
859
|
+
vaultId = addVaultResourceRequest.vaultId;
|
860
|
+
body = addVaultResourceRequest.body;
|
861
|
+
}
|
862
|
+
else {
|
863
|
+
vaultId = addVaultResourceRequest['vault_id'];
|
864
|
+
body = addVaultResourceRequest['body'];
|
865
|
+
}
|
866
|
+
}
|
867
|
+
if (vaultId === null || vaultId === undefined) {
|
868
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling addVaultResource.');
|
869
|
+
}
|
870
|
+
if (body === null || body === undefined) {
|
871
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
872
|
+
}
|
873
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
874
|
+
options.data = body !== undefined ? body : {};
|
875
|
+
options.pathParams = { 'vault_id': vaultId, };
|
876
|
+
options.headers = localVarHeaderParameter;
|
877
|
+
return options;
|
878
|
+
},
|
879
|
+
/**
|
880
|
+
* 存储库设置策略
|
881
|
+
*
|
882
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
883
|
+
*/
|
884
|
+
associateVaultPolicy: function (associateVaultPolicyRequest) {
|
885
|
+
var options = {
|
886
|
+
method: "POST",
|
887
|
+
url: "/v3/{project_id}/vaults/{vault_id}/associatepolicy",
|
888
|
+
contentType: "application/json;charset=UTF-8",
|
889
|
+
queryParams: {},
|
890
|
+
pathParams: {},
|
891
|
+
headers: {},
|
892
|
+
data: {}
|
893
|
+
};
|
894
|
+
var localVarHeaderParameter = {};
|
895
|
+
var body;
|
896
|
+
var vaultId;
|
897
|
+
if (associateVaultPolicyRequest !== null && associateVaultPolicyRequest !== undefined) {
|
898
|
+
if (associateVaultPolicyRequest instanceof AssociateVaultPolicyRequest_1.AssociateVaultPolicyRequest) {
|
899
|
+
vaultId = associateVaultPolicyRequest.vaultId;
|
900
|
+
body = associateVaultPolicyRequest.body;
|
901
|
+
}
|
902
|
+
else {
|
903
|
+
vaultId = associateVaultPolicyRequest['vault_id'];
|
904
|
+
body = associateVaultPolicyRequest['body'];
|
905
|
+
}
|
906
|
+
}
|
907
|
+
if (vaultId === null || vaultId === undefined) {
|
908
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling associateVaultPolicy.');
|
909
|
+
}
|
910
|
+
if (body === null || body === undefined) {
|
911
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
912
|
+
}
|
913
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
914
|
+
options.data = body !== undefined ? body : {};
|
915
|
+
options.pathParams = { 'vault_id': vaultId, };
|
916
|
+
options.headers = localVarHeaderParameter;
|
917
|
+
return options;
|
918
|
+
},
|
919
|
+
/**
|
920
|
+
* 为指定实例批量添加或删除标签
|
921
|
+
* 标签管理服务需要使用该接口批量管理实例的标签。
|
922
|
+
* 一个资源上最多有10个标签。
|
923
|
+
* 此接口为幂等接口:
|
924
|
+
* 创建时如果请求体中存在重复key则报错。
|
925
|
+
* 创建时,不允许重复key,如果数据库存在就覆盖。
|
926
|
+
* 删除时,允许重复key。
|
927
|
+
* 删除时,如果删除的标签不存在,默认处理成功,删除时不对标签字符集范围做校验。key长度127个字符,value为255个字符。删除时tags结构体不能缺失,key不能为空,或者空字符串。
|
928
|
+
*
|
929
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
930
|
+
*/
|
931
|
+
batchCreateAndDeleteVaultTags: function (batchCreateAndDeleteVaultTagsRequest) {
|
932
|
+
var options = {
|
933
|
+
method: "POST",
|
934
|
+
url: "/v3/{project_id}/vault/{vault_id}/tags/action",
|
935
|
+
contentType: "application/json;charset=UTF-8",
|
936
|
+
queryParams: {},
|
937
|
+
pathParams: {},
|
938
|
+
headers: {},
|
939
|
+
data: {}
|
940
|
+
};
|
941
|
+
var localVarHeaderParameter = {};
|
942
|
+
var body;
|
943
|
+
var vaultId;
|
944
|
+
if (batchCreateAndDeleteVaultTagsRequest !== null && batchCreateAndDeleteVaultTagsRequest !== undefined) {
|
945
|
+
if (batchCreateAndDeleteVaultTagsRequest instanceof BatchCreateAndDeleteVaultTagsRequest_1.BatchCreateAndDeleteVaultTagsRequest) {
|
946
|
+
vaultId = batchCreateAndDeleteVaultTagsRequest.vaultId;
|
947
|
+
body = batchCreateAndDeleteVaultTagsRequest.body;
|
948
|
+
}
|
949
|
+
else {
|
950
|
+
vaultId = batchCreateAndDeleteVaultTagsRequest['vault_id'];
|
951
|
+
body = batchCreateAndDeleteVaultTagsRequest['body'];
|
952
|
+
}
|
953
|
+
}
|
954
|
+
if (vaultId === null || vaultId === undefined) {
|
955
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling batchCreateAndDeleteVaultTags.');
|
956
|
+
}
|
957
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
958
|
+
options.data = body !== undefined ? body : {};
|
959
|
+
options.pathParams = { 'vault_id': vaultId, };
|
960
|
+
options.headers = localVarHeaderParameter;
|
961
|
+
return options;
|
962
|
+
},
|
963
|
+
/**
|
964
|
+
* 跨区域复制备份。
|
965
|
+
*
|
966
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
967
|
+
*/
|
968
|
+
copyBackup: function (copyBackupRequest) {
|
969
|
+
var options = {
|
970
|
+
method: "POST",
|
971
|
+
url: "/v3/{project_id}/backups/{backup_id}/replicate",
|
972
|
+
contentType: "application/json;charset=UTF-8",
|
973
|
+
queryParams: {},
|
974
|
+
pathParams: {},
|
975
|
+
headers: {},
|
976
|
+
data: {}
|
977
|
+
};
|
978
|
+
var localVarHeaderParameter = {};
|
979
|
+
var body;
|
980
|
+
var backupId;
|
981
|
+
if (copyBackupRequest !== null && copyBackupRequest !== undefined) {
|
982
|
+
if (copyBackupRequest instanceof CopyBackupRequest_1.CopyBackupRequest) {
|
983
|
+
backupId = copyBackupRequest.backupId;
|
984
|
+
body = copyBackupRequest.body;
|
985
|
+
}
|
986
|
+
else {
|
987
|
+
backupId = copyBackupRequest['backup_id'];
|
988
|
+
body = copyBackupRequest['body'];
|
989
|
+
}
|
990
|
+
}
|
991
|
+
if (backupId === null || backupId === undefined) {
|
992
|
+
throw new RequiredError('backupId', 'Required parameter backupId was null or undefined when calling copyBackup.');
|
993
|
+
}
|
994
|
+
if (body === null || body === undefined) {
|
995
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
996
|
+
}
|
997
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
998
|
+
options.data = body !== undefined ? body : {};
|
999
|
+
options.pathParams = { 'backup_id': backupId, };
|
1000
|
+
options.headers = localVarHeaderParameter;
|
1001
|
+
return options;
|
1002
|
+
},
|
1003
|
+
/**
|
1004
|
+
* 执行复制
|
1005
|
+
*
|
1006
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1007
|
+
*/
|
1008
|
+
copyCheckpoint: function (copyCheckpointRequest) {
|
1009
|
+
var options = {
|
1010
|
+
method: "POST",
|
1011
|
+
url: "/v3/{project_id}/checkpoints/replicate",
|
1012
|
+
contentType: "application/json;charset=UTF-8",
|
1013
|
+
queryParams: {},
|
1014
|
+
pathParams: {},
|
1015
|
+
headers: {},
|
1016
|
+
data: {}
|
1017
|
+
};
|
1018
|
+
var localVarHeaderParameter = {};
|
1019
|
+
var body;
|
1020
|
+
if (copyCheckpointRequest !== null && copyCheckpointRequest !== undefined) {
|
1021
|
+
if (copyCheckpointRequest instanceof CopyCheckpointRequest_1.CopyCheckpointRequest) {
|
1022
|
+
body = copyCheckpointRequest.body;
|
1023
|
+
}
|
1024
|
+
else {
|
1025
|
+
body = copyCheckpointRequest['body'];
|
1026
|
+
}
|
1027
|
+
}
|
1028
|
+
if (body === null || body === undefined) {
|
1029
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
1030
|
+
}
|
1031
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1032
|
+
options.data = body !== undefined ? body : {};
|
1033
|
+
options.headers = localVarHeaderParameter;
|
1034
|
+
return options;
|
1035
|
+
},
|
1036
|
+
/**
|
1037
|
+
* 对存储库执行备份,生成备份还原点
|
1038
|
+
*
|
1039
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1040
|
+
*/
|
1041
|
+
createCheckpoint: function (createCheckpointRequest) {
|
1042
|
+
var options = {
|
1043
|
+
method: "POST",
|
1044
|
+
url: "/v3/{project_id}/checkpoints",
|
1045
|
+
contentType: "application/json;charset=UTF-8",
|
1046
|
+
queryParams: {},
|
1047
|
+
pathParams: {},
|
1048
|
+
headers: {},
|
1049
|
+
data: {}
|
1050
|
+
};
|
1051
|
+
var localVarHeaderParameter = {};
|
1052
|
+
var body;
|
1053
|
+
if (createCheckpointRequest !== null && createCheckpointRequest !== undefined) {
|
1054
|
+
if (createCheckpointRequest instanceof CreateCheckpointRequest_1.CreateCheckpointRequest) {
|
1055
|
+
body = createCheckpointRequest.body;
|
1056
|
+
}
|
1057
|
+
else {
|
1058
|
+
body = createCheckpointRequest['body'];
|
1059
|
+
}
|
1060
|
+
}
|
1061
|
+
if (body === null || body === undefined) {
|
1062
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
1063
|
+
}
|
1064
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1065
|
+
options.data = body !== undefined ? body : {};
|
1066
|
+
options.headers = localVarHeaderParameter;
|
1067
|
+
return options;
|
1068
|
+
},
|
1069
|
+
/**
|
1070
|
+
* 创建策略,策略分为备份策略和复制策略。
|
1071
|
+
*
|
1072
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1073
|
+
*/
|
1074
|
+
createPolicy: function (createPolicyRequest) {
|
1075
|
+
var options = {
|
1076
|
+
method: "POST",
|
1077
|
+
url: "/v3/{project_id}/policies",
|
1078
|
+
contentType: "application/json;charset=UTF-8",
|
1079
|
+
queryParams: {},
|
1080
|
+
pathParams: {},
|
1081
|
+
headers: {},
|
1082
|
+
data: {}
|
1083
|
+
};
|
1084
|
+
var localVarHeaderParameter = {};
|
1085
|
+
var body;
|
1086
|
+
if (createPolicyRequest !== null && createPolicyRequest !== undefined) {
|
1087
|
+
if (createPolicyRequest instanceof CreatePolicyRequest_1.CreatePolicyRequest) {
|
1088
|
+
body = createPolicyRequest.body;
|
1089
|
+
}
|
1090
|
+
else {
|
1091
|
+
body = createPolicyRequest['body'];
|
1092
|
+
}
|
1093
|
+
}
|
1094
|
+
if (body === null || body === undefined) {
|
1095
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
1096
|
+
}
|
1097
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1098
|
+
options.data = body !== undefined ? body : {};
|
1099
|
+
options.headers = localVarHeaderParameter;
|
1100
|
+
return options;
|
1101
|
+
},
|
1102
|
+
/**
|
1103
|
+
* 创建存储库
|
1104
|
+
*
|
1105
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1106
|
+
*/
|
1107
|
+
createVault: function (createVaultRequest) {
|
1108
|
+
var options = {
|
1109
|
+
method: "POST",
|
1110
|
+
url: "/v3/{project_id}/vaults",
|
1111
|
+
contentType: "application/json;charset=UTF-8",
|
1112
|
+
queryParams: {},
|
1113
|
+
pathParams: {},
|
1114
|
+
headers: {},
|
1115
|
+
data: {}
|
1116
|
+
};
|
1117
|
+
var localVarHeaderParameter = {};
|
1118
|
+
var body;
|
1119
|
+
if (createVaultRequest !== null && createVaultRequest !== undefined) {
|
1120
|
+
if (createVaultRequest instanceof CreateVaultRequest_1.CreateVaultRequest) {
|
1121
|
+
body = createVaultRequest.body;
|
1122
|
+
}
|
1123
|
+
else {
|
1124
|
+
body = createVaultRequest['body'];
|
1125
|
+
}
|
1126
|
+
}
|
1127
|
+
if (body === null || body === undefined) {
|
1128
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
1129
|
+
}
|
1130
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1131
|
+
options.data = body !== undefined ? body : {};
|
1132
|
+
options.headers = localVarHeaderParameter;
|
1133
|
+
return options;
|
1134
|
+
},
|
1135
|
+
/**
|
1136
|
+
* 一个资源上最多有10个标签。
|
1137
|
+
* 此接口为幂等接口:创建时,如果创建的标签已经存在(key相同),则覆盖。
|
1138
|
+
*
|
1139
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1140
|
+
*/
|
1141
|
+
createVaultTags: function (createVaultTagsRequest) {
|
1142
|
+
var options = {
|
1143
|
+
method: "POST",
|
1144
|
+
url: "/v3/{project_id}/vault/{vault_id}/tags",
|
1145
|
+
contentType: "application/json;charset=UTF-8",
|
1146
|
+
queryParams: {},
|
1147
|
+
pathParams: {},
|
1148
|
+
headers: {},
|
1149
|
+
data: {}
|
1150
|
+
};
|
1151
|
+
var localVarHeaderParameter = {};
|
1152
|
+
var body;
|
1153
|
+
var vaultId;
|
1154
|
+
if (createVaultTagsRequest !== null && createVaultTagsRequest !== undefined) {
|
1155
|
+
if (createVaultTagsRequest instanceof CreateVaultTagsRequest_1.CreateVaultTagsRequest) {
|
1156
|
+
vaultId = createVaultTagsRequest.vaultId;
|
1157
|
+
body = createVaultTagsRequest.body;
|
1158
|
+
}
|
1159
|
+
else {
|
1160
|
+
vaultId = createVaultTagsRequest['vault_id'];
|
1161
|
+
body = createVaultTagsRequest['body'];
|
1162
|
+
}
|
1163
|
+
}
|
1164
|
+
if (vaultId === null || vaultId === undefined) {
|
1165
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling createVaultTags.');
|
1166
|
+
}
|
1167
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1168
|
+
options.data = body !== undefined ? body : {};
|
1169
|
+
options.pathParams = { 'vault_id': vaultId, };
|
1170
|
+
options.headers = localVarHeaderParameter;
|
1171
|
+
return options;
|
1172
|
+
},
|
1173
|
+
/**
|
1174
|
+
* 删除单个备份。
|
1175
|
+
*
|
1176
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1177
|
+
*/
|
1178
|
+
deleteBackup: function (deleteBackupRequest) {
|
1179
|
+
var options = {
|
1180
|
+
method: "DELETE",
|
1181
|
+
url: "/v3/{project_id}/backups/{backup_id}",
|
1182
|
+
contentType: "application/json",
|
1183
|
+
queryParams: {},
|
1184
|
+
pathParams: {},
|
1185
|
+
headers: {}
|
1186
|
+
};
|
1187
|
+
var localVarHeaderParameter = {};
|
1188
|
+
var backupId;
|
1189
|
+
if (deleteBackupRequest !== null && deleteBackupRequest !== undefined) {
|
1190
|
+
if (deleteBackupRequest instanceof DeleteBackupRequest_1.DeleteBackupRequest) {
|
1191
|
+
backupId = deleteBackupRequest.backupId;
|
1192
|
+
}
|
1193
|
+
else {
|
1194
|
+
backupId = deleteBackupRequest['backup_id'];
|
1195
|
+
}
|
1196
|
+
}
|
1197
|
+
if (backupId === null || backupId === undefined) {
|
1198
|
+
throw new RequiredError('backupId', 'Required parameter backupId was null or undefined when calling deleteBackup.');
|
1199
|
+
}
|
1200
|
+
options.pathParams = { 'backup_id': backupId, };
|
1201
|
+
options.headers = localVarHeaderParameter;
|
1202
|
+
return options;
|
1203
|
+
},
|
1204
|
+
/**
|
1205
|
+
* 删除指定的备份共享成员
|
1206
|
+
*
|
1207
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1208
|
+
*/
|
1209
|
+
deleteMember: function (deleteMemberRequest) {
|
1210
|
+
var options = {
|
1211
|
+
method: "DELETE",
|
1212
|
+
url: "/v3/{project_id}/backups/{backup_id}/members/{member_id}",
|
1213
|
+
contentType: "application/json",
|
1214
|
+
queryParams: {},
|
1215
|
+
pathParams: {},
|
1216
|
+
headers: {}
|
1217
|
+
};
|
1218
|
+
var localVarHeaderParameter = {};
|
1219
|
+
var backupId;
|
1220
|
+
var memberId;
|
1221
|
+
if (deleteMemberRequest !== null && deleteMemberRequest !== undefined) {
|
1222
|
+
if (deleteMemberRequest instanceof DeleteMemberRequest_1.DeleteMemberRequest) {
|
1223
|
+
backupId = deleteMemberRequest.backupId;
|
1224
|
+
memberId = deleteMemberRequest.memberId;
|
1225
|
+
}
|
1226
|
+
else {
|
1227
|
+
backupId = deleteMemberRequest['backup_id'];
|
1228
|
+
memberId = deleteMemberRequest['member_id'];
|
1229
|
+
}
|
1230
|
+
}
|
1231
|
+
if (backupId === null || backupId === undefined) {
|
1232
|
+
throw new RequiredError('backupId', 'Required parameter backupId was null or undefined when calling deleteMember.');
|
1233
|
+
}
|
1234
|
+
if (memberId === null || memberId === undefined) {
|
1235
|
+
throw new RequiredError('memberId', 'Required parameter memberId was null or undefined when calling deleteMember.');
|
1236
|
+
}
|
1237
|
+
options.pathParams = { 'backup_id': backupId, 'member_id': memberId, };
|
1238
|
+
options.headers = localVarHeaderParameter;
|
1239
|
+
return options;
|
1240
|
+
},
|
1241
|
+
/**
|
1242
|
+
* 删除策略
|
1243
|
+
*
|
1244
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1245
|
+
*/
|
1246
|
+
deletePolicy: function (deletePolicyRequest) {
|
1247
|
+
var options = {
|
1248
|
+
method: "DELETE",
|
1249
|
+
url: "/v3/{project_id}/policies/{policy_id}",
|
1250
|
+
contentType: "application/json",
|
1251
|
+
queryParams: {},
|
1252
|
+
pathParams: {},
|
1253
|
+
headers: {}
|
1254
|
+
};
|
1255
|
+
var localVarHeaderParameter = {};
|
1256
|
+
var policyId;
|
1257
|
+
if (deletePolicyRequest !== null && deletePolicyRequest !== undefined) {
|
1258
|
+
if (deletePolicyRequest instanceof DeletePolicyRequest_1.DeletePolicyRequest) {
|
1259
|
+
policyId = deletePolicyRequest.policyId;
|
1260
|
+
}
|
1261
|
+
else {
|
1262
|
+
policyId = deletePolicyRequest['policy_id'];
|
1263
|
+
}
|
1264
|
+
}
|
1265
|
+
if (policyId === null || policyId === undefined) {
|
1266
|
+
throw new RequiredError('policyId', 'Required parameter policyId was null or undefined when calling deletePolicy.');
|
1267
|
+
}
|
1268
|
+
options.pathParams = { 'policy_id': policyId, };
|
1269
|
+
options.headers = localVarHeaderParameter;
|
1270
|
+
return options;
|
1271
|
+
},
|
1272
|
+
/**
|
1273
|
+
* 删除存储库。若删除储存库,将一并删除存储库中的所有备份。
|
1274
|
+
*
|
1275
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1276
|
+
*/
|
1277
|
+
deleteVault: function (deleteVaultRequest) {
|
1278
|
+
var options = {
|
1279
|
+
method: "DELETE",
|
1280
|
+
url: "/v3/{project_id}/vaults/{vault_id}",
|
1281
|
+
contentType: "application/json",
|
1282
|
+
queryParams: {},
|
1283
|
+
pathParams: {},
|
1284
|
+
headers: {}
|
1285
|
+
};
|
1286
|
+
var localVarHeaderParameter = {};
|
1287
|
+
var vaultId;
|
1288
|
+
if (deleteVaultRequest !== null && deleteVaultRequest !== undefined) {
|
1289
|
+
if (deleteVaultRequest instanceof DeleteVaultRequest_1.DeleteVaultRequest) {
|
1290
|
+
vaultId = deleteVaultRequest.vaultId;
|
1291
|
+
}
|
1292
|
+
else {
|
1293
|
+
vaultId = deleteVaultRequest['vault_id'];
|
1294
|
+
}
|
1295
|
+
}
|
1296
|
+
if (vaultId === null || vaultId === undefined) {
|
1297
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling deleteVault.');
|
1298
|
+
}
|
1299
|
+
options.pathParams = { 'vault_id': vaultId, };
|
1300
|
+
options.headers = localVarHeaderParameter;
|
1301
|
+
return options;
|
1302
|
+
},
|
1303
|
+
/**
|
1304
|
+
* 幂等接口:删除时,如果删除的标签不存在,返回404。Key不能为空或者空字符串。
|
1305
|
+
*
|
1306
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1307
|
+
*/
|
1308
|
+
deleteVaultTag: function (deleteVaultTagRequest) {
|
1309
|
+
var options = {
|
1310
|
+
method: "DELETE",
|
1311
|
+
url: "/v3/{project_id}/vault/{vault_id}/tags/{key}",
|
1312
|
+
contentType: "application/json",
|
1313
|
+
queryParams: {},
|
1314
|
+
pathParams: {},
|
1315
|
+
headers: {}
|
1316
|
+
};
|
1317
|
+
var localVarHeaderParameter = {};
|
1318
|
+
var key;
|
1319
|
+
var vaultId;
|
1320
|
+
if (deleteVaultTagRequest !== null && deleteVaultTagRequest !== undefined) {
|
1321
|
+
if (deleteVaultTagRequest instanceof DeleteVaultTagRequest_1.DeleteVaultTagRequest) {
|
1322
|
+
key = deleteVaultTagRequest.key;
|
1323
|
+
vaultId = deleteVaultTagRequest.vaultId;
|
1324
|
+
}
|
1325
|
+
else {
|
1326
|
+
key = deleteVaultTagRequest['key'];
|
1327
|
+
vaultId = deleteVaultTagRequest['vault_id'];
|
1328
|
+
}
|
1329
|
+
}
|
1330
|
+
if (key === null || key === undefined) {
|
1331
|
+
throw new RequiredError('key', 'Required parameter key was null or undefined when calling deleteVaultTag.');
|
1332
|
+
}
|
1333
|
+
if (vaultId === null || vaultId === undefined) {
|
1334
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling deleteVaultTag.');
|
1335
|
+
}
|
1336
|
+
options.pathParams = { 'key': key, 'vault_id': vaultId, };
|
1337
|
+
options.headers = localVarHeaderParameter;
|
1338
|
+
return options;
|
1339
|
+
},
|
1340
|
+
/**
|
1341
|
+
* 存储库解除策略
|
1342
|
+
*
|
1343
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1344
|
+
*/
|
1345
|
+
disassociateVaultPolicy: function (disassociateVaultPolicyRequest) {
|
1346
|
+
var options = {
|
1347
|
+
method: "POST",
|
1348
|
+
url: "/v3/{project_id}/vaults/{vault_id}/dissociatepolicy",
|
1349
|
+
contentType: "application/json;charset=UTF-8",
|
1350
|
+
queryParams: {},
|
1351
|
+
pathParams: {},
|
1352
|
+
headers: {},
|
1353
|
+
data: {}
|
1354
|
+
};
|
1355
|
+
var localVarHeaderParameter = {};
|
1356
|
+
var body;
|
1357
|
+
var vaultId;
|
1358
|
+
if (disassociateVaultPolicyRequest !== null && disassociateVaultPolicyRequest !== undefined) {
|
1359
|
+
if (disassociateVaultPolicyRequest instanceof DisassociateVaultPolicyRequest_1.DisassociateVaultPolicyRequest) {
|
1360
|
+
vaultId = disassociateVaultPolicyRequest.vaultId;
|
1361
|
+
body = disassociateVaultPolicyRequest.body;
|
1362
|
+
}
|
1363
|
+
else {
|
1364
|
+
vaultId = disassociateVaultPolicyRequest['vault_id'];
|
1365
|
+
body = disassociateVaultPolicyRequest['body'];
|
1366
|
+
}
|
1367
|
+
}
|
1368
|
+
if (vaultId === null || vaultId === undefined) {
|
1369
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling disassociateVaultPolicy.');
|
1370
|
+
}
|
1371
|
+
if (body === null || body === undefined) {
|
1372
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
1373
|
+
}
|
1374
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1375
|
+
options.data = body !== undefined ? body : {};
|
1376
|
+
options.pathParams = { 'vault_id': vaultId, };
|
1377
|
+
options.headers = localVarHeaderParameter;
|
1378
|
+
return options;
|
1379
|
+
},
|
1380
|
+
/**
|
1381
|
+
* 同步线下混合云VMware备份副本
|
1382
|
+
*
|
1383
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1384
|
+
*/
|
1385
|
+
importBackup: function (importBackupRequest) {
|
1386
|
+
var options = {
|
1387
|
+
method: "POST",
|
1388
|
+
url: "/v3/{project_id}/backups/sync",
|
1389
|
+
contentType: "application/json;charset=UTF-8",
|
1390
|
+
queryParams: {},
|
1391
|
+
pathParams: {},
|
1392
|
+
headers: {},
|
1393
|
+
data: {}
|
1394
|
+
};
|
1395
|
+
var localVarHeaderParameter = {};
|
1396
|
+
var body;
|
1397
|
+
if (importBackupRequest !== null && importBackupRequest !== undefined) {
|
1398
|
+
if (importBackupRequest instanceof ImportBackupRequest_1.ImportBackupRequest) {
|
1399
|
+
body = importBackupRequest.body;
|
1400
|
+
}
|
1401
|
+
else {
|
1402
|
+
body = importBackupRequest['body'];
|
1403
|
+
}
|
1404
|
+
}
|
1405
|
+
if (body === null || body === undefined) {
|
1406
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
1407
|
+
}
|
1408
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1409
|
+
options.data = body !== undefined ? body : {};
|
1410
|
+
options.headers = localVarHeaderParameter;
|
1411
|
+
return options;
|
1412
|
+
},
|
1413
|
+
/**
|
1414
|
+
* 查询所有副本
|
1415
|
+
*
|
1416
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1417
|
+
*/
|
1418
|
+
listBackups: function (listBackupsRequest) {
|
1419
|
+
var options = {
|
1420
|
+
method: "GET",
|
1421
|
+
url: "/v3/{project_id}/backups",
|
1422
|
+
contentType: "application/json",
|
1423
|
+
queryParams: {},
|
1424
|
+
pathParams: {},
|
1425
|
+
headers: {}
|
1426
|
+
};
|
1427
|
+
var localVarHeaderParameter = {};
|
1428
|
+
var localVarQueryParameter = {};
|
1429
|
+
var checkpointId;
|
1430
|
+
var dec;
|
1431
|
+
var endTime;
|
1432
|
+
var imageType;
|
1433
|
+
var limit;
|
1434
|
+
var marker;
|
1435
|
+
var name;
|
1436
|
+
var offset;
|
1437
|
+
var resourceAz;
|
1438
|
+
var resourceId;
|
1439
|
+
var resourceName;
|
1440
|
+
var resourceType;
|
1441
|
+
var sort;
|
1442
|
+
var startTime;
|
1443
|
+
var status;
|
1444
|
+
var vaultId;
|
1445
|
+
var enterpriseProjectId;
|
1446
|
+
var ownType;
|
1447
|
+
var memberStatus;
|
1448
|
+
var parentId;
|
1449
|
+
var usedPercent;
|
1450
|
+
var showReplication;
|
1451
|
+
var incremental;
|
1452
|
+
if (listBackupsRequest !== null && listBackupsRequest !== undefined) {
|
1453
|
+
if (listBackupsRequest instanceof ListBackupsRequest_1.ListBackupsRequest) {
|
1454
|
+
checkpointId = listBackupsRequest.checkpointId;
|
1455
|
+
dec = listBackupsRequest.dec;
|
1456
|
+
endTime = listBackupsRequest.endTime;
|
1457
|
+
imageType = listBackupsRequest.imageType;
|
1458
|
+
limit = listBackupsRequest.limit;
|
1459
|
+
marker = listBackupsRequest.marker;
|
1460
|
+
name = listBackupsRequest.name;
|
1461
|
+
offset = listBackupsRequest.offset;
|
1462
|
+
resourceAz = listBackupsRequest.resourceAz;
|
1463
|
+
resourceId = listBackupsRequest.resourceId;
|
1464
|
+
resourceName = listBackupsRequest.resourceName;
|
1465
|
+
resourceType = listBackupsRequest.resourceType;
|
1466
|
+
sort = listBackupsRequest.sort;
|
1467
|
+
startTime = listBackupsRequest.startTime;
|
1468
|
+
status = listBackupsRequest.status;
|
1469
|
+
vaultId = listBackupsRequest.vaultId;
|
1470
|
+
enterpriseProjectId = listBackupsRequest.enterpriseProjectId;
|
1471
|
+
ownType = listBackupsRequest.ownType;
|
1472
|
+
memberStatus = listBackupsRequest.memberStatus;
|
1473
|
+
parentId = listBackupsRequest.parentId;
|
1474
|
+
usedPercent = listBackupsRequest.usedPercent;
|
1475
|
+
showReplication = listBackupsRequest.showReplication;
|
1476
|
+
incremental = listBackupsRequest.incremental;
|
1477
|
+
}
|
1478
|
+
else {
|
1479
|
+
checkpointId = listBackupsRequest['checkpoint_id'];
|
1480
|
+
dec = listBackupsRequest['dec'];
|
1481
|
+
endTime = listBackupsRequest['end_time'];
|
1482
|
+
imageType = listBackupsRequest['image_type'];
|
1483
|
+
limit = listBackupsRequest['limit'];
|
1484
|
+
marker = listBackupsRequest['marker'];
|
1485
|
+
name = listBackupsRequest['name'];
|
1486
|
+
offset = listBackupsRequest['offset'];
|
1487
|
+
resourceAz = listBackupsRequest['resource_az'];
|
1488
|
+
resourceId = listBackupsRequest['resource_id'];
|
1489
|
+
resourceName = listBackupsRequest['resource_name'];
|
1490
|
+
resourceType = listBackupsRequest['resource_type'];
|
1491
|
+
sort = listBackupsRequest['sort'];
|
1492
|
+
startTime = listBackupsRequest['start_time'];
|
1493
|
+
status = listBackupsRequest['status'];
|
1494
|
+
vaultId = listBackupsRequest['vault_id'];
|
1495
|
+
enterpriseProjectId = listBackupsRequest['enterprise_project_id'];
|
1496
|
+
ownType = listBackupsRequest['own_type'];
|
1497
|
+
memberStatus = listBackupsRequest['member_status'];
|
1498
|
+
parentId = listBackupsRequest['parent_id'];
|
1499
|
+
usedPercent = listBackupsRequest['used_percent'];
|
1500
|
+
showReplication = listBackupsRequest['show_replication'];
|
1501
|
+
incremental = listBackupsRequest['incremental'];
|
1502
|
+
}
|
1503
|
+
}
|
1504
|
+
if (checkpointId !== null && checkpointId !== undefined) {
|
1505
|
+
localVarQueryParameter['checkpoint_id'] = checkpointId;
|
1506
|
+
}
|
1507
|
+
if (dec !== null && dec !== undefined) {
|
1508
|
+
localVarQueryParameter['dec'] = dec;
|
1509
|
+
}
|
1510
|
+
if (endTime !== null && endTime !== undefined) {
|
1511
|
+
localVarQueryParameter['end_time'] = endTime;
|
1512
|
+
}
|
1513
|
+
if (imageType !== null && imageType !== undefined) {
|
1514
|
+
localVarQueryParameter['image_type'] = imageType;
|
1515
|
+
}
|
1516
|
+
if (limit !== null && limit !== undefined) {
|
1517
|
+
localVarQueryParameter['limit'] = limit;
|
1518
|
+
}
|
1519
|
+
if (marker !== null && marker !== undefined) {
|
1520
|
+
localVarQueryParameter['marker'] = marker;
|
1521
|
+
}
|
1522
|
+
if (name !== null && name !== undefined) {
|
1523
|
+
localVarQueryParameter['name'] = name;
|
1524
|
+
}
|
1525
|
+
if (offset !== null && offset !== undefined) {
|
1526
|
+
localVarQueryParameter['offset'] = offset;
|
1527
|
+
}
|
1528
|
+
if (resourceAz !== null && resourceAz !== undefined) {
|
1529
|
+
localVarQueryParameter['resource_az'] = resourceAz;
|
1530
|
+
}
|
1531
|
+
if (resourceId !== null && resourceId !== undefined) {
|
1532
|
+
localVarQueryParameter['resource_id'] = resourceId;
|
1533
|
+
}
|
1534
|
+
if (resourceName !== null && resourceName !== undefined) {
|
1535
|
+
localVarQueryParameter['resource_name'] = resourceName;
|
1536
|
+
}
|
1537
|
+
if (resourceType !== null && resourceType !== undefined) {
|
1538
|
+
localVarQueryParameter['resource_type'] = resourceType;
|
1539
|
+
}
|
1540
|
+
if (sort !== null && sort !== undefined) {
|
1541
|
+
localVarQueryParameter['sort'] = sort;
|
1542
|
+
}
|
1543
|
+
if (startTime !== null && startTime !== undefined) {
|
1544
|
+
localVarQueryParameter['start_time'] = startTime;
|
1545
|
+
}
|
1546
|
+
if (status !== null && status !== undefined) {
|
1547
|
+
localVarQueryParameter['status'] = status;
|
1548
|
+
}
|
1549
|
+
if (vaultId !== null && vaultId !== undefined) {
|
1550
|
+
localVarQueryParameter['vault_id'] = vaultId;
|
1551
|
+
}
|
1552
|
+
if (enterpriseProjectId !== null && enterpriseProjectId !== undefined) {
|
1553
|
+
localVarQueryParameter['enterprise_project_id'] = enterpriseProjectId;
|
1554
|
+
}
|
1555
|
+
if (ownType !== null && ownType !== undefined) {
|
1556
|
+
localVarQueryParameter['own_type'] = ownType;
|
1557
|
+
}
|
1558
|
+
if (memberStatus !== null && memberStatus !== undefined) {
|
1559
|
+
localVarQueryParameter['member_status'] = memberStatus;
|
1560
|
+
}
|
1561
|
+
if (parentId !== null && parentId !== undefined) {
|
1562
|
+
localVarQueryParameter['parent_id'] = parentId;
|
1563
|
+
}
|
1564
|
+
if (usedPercent !== null && usedPercent !== undefined) {
|
1565
|
+
localVarQueryParameter['used_percent'] = usedPercent;
|
1566
|
+
}
|
1567
|
+
if (showReplication !== null && showReplication !== undefined) {
|
1568
|
+
localVarQueryParameter['show_replication'] = showReplication;
|
1569
|
+
}
|
1570
|
+
if (incremental !== null && incremental !== undefined) {
|
1571
|
+
localVarQueryParameter['incremental'] = incremental;
|
1572
|
+
}
|
1573
|
+
options.queryParams = localVarQueryParameter;
|
1574
|
+
options.headers = localVarHeaderParameter;
|
1575
|
+
return options;
|
1576
|
+
},
|
1577
|
+
/**
|
1578
|
+
* 查询任务列表
|
1579
|
+
*
|
1580
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1581
|
+
*/
|
1582
|
+
listOpLogs: function (listOpLogsRequest) {
|
1583
|
+
var options = {
|
1584
|
+
method: "GET",
|
1585
|
+
url: "/v3/{project_id}/operation-logs",
|
1586
|
+
contentType: "application/json",
|
1587
|
+
queryParams: {},
|
1588
|
+
pathParams: {},
|
1589
|
+
headers: {}
|
1590
|
+
};
|
1591
|
+
var localVarHeaderParameter = {};
|
1592
|
+
var localVarQueryParameter = {};
|
1593
|
+
var endTime;
|
1594
|
+
var limit;
|
1595
|
+
var offset;
|
1596
|
+
var operationType;
|
1597
|
+
var providerId;
|
1598
|
+
var resourceId;
|
1599
|
+
var resourceName;
|
1600
|
+
var startTime;
|
1601
|
+
var status;
|
1602
|
+
var vaultId;
|
1603
|
+
var vaultName;
|
1604
|
+
var enterpriseProjectId;
|
1605
|
+
if (listOpLogsRequest !== null && listOpLogsRequest !== undefined) {
|
1606
|
+
if (listOpLogsRequest instanceof ListOpLogsRequest_1.ListOpLogsRequest) {
|
1607
|
+
endTime = listOpLogsRequest.endTime;
|
1608
|
+
limit = listOpLogsRequest.limit;
|
1609
|
+
offset = listOpLogsRequest.offset;
|
1610
|
+
operationType = listOpLogsRequest.operationType;
|
1611
|
+
providerId = listOpLogsRequest.providerId;
|
1612
|
+
resourceId = listOpLogsRequest.resourceId;
|
1613
|
+
resourceName = listOpLogsRequest.resourceName;
|
1614
|
+
startTime = listOpLogsRequest.startTime;
|
1615
|
+
status = listOpLogsRequest.status;
|
1616
|
+
vaultId = listOpLogsRequest.vaultId;
|
1617
|
+
vaultName = listOpLogsRequest.vaultName;
|
1618
|
+
enterpriseProjectId = listOpLogsRequest.enterpriseProjectId;
|
1619
|
+
}
|
1620
|
+
else {
|
1621
|
+
endTime = listOpLogsRequest['end_time'];
|
1622
|
+
limit = listOpLogsRequest['limit'];
|
1623
|
+
offset = listOpLogsRequest['offset'];
|
1624
|
+
operationType = listOpLogsRequest['operation_type'];
|
1625
|
+
providerId = listOpLogsRequest['provider_id'];
|
1626
|
+
resourceId = listOpLogsRequest['resource_id'];
|
1627
|
+
resourceName = listOpLogsRequest['resource_name'];
|
1628
|
+
startTime = listOpLogsRequest['start_time'];
|
1629
|
+
status = listOpLogsRequest['status'];
|
1630
|
+
vaultId = listOpLogsRequest['vault_id'];
|
1631
|
+
vaultName = listOpLogsRequest['vault_name'];
|
1632
|
+
enterpriseProjectId = listOpLogsRequest['enterprise_project_id'];
|
1633
|
+
}
|
1634
|
+
}
|
1635
|
+
if (endTime !== null && endTime !== undefined) {
|
1636
|
+
localVarQueryParameter['end_time'] = endTime;
|
1637
|
+
}
|
1638
|
+
if (limit !== null && limit !== undefined) {
|
1639
|
+
localVarQueryParameter['limit'] = limit;
|
1640
|
+
}
|
1641
|
+
if (offset !== null && offset !== undefined) {
|
1642
|
+
localVarQueryParameter['offset'] = offset;
|
1643
|
+
}
|
1644
|
+
if (operationType !== null && operationType !== undefined) {
|
1645
|
+
localVarQueryParameter['operation_type'] = operationType;
|
1646
|
+
}
|
1647
|
+
if (providerId !== null && providerId !== undefined) {
|
1648
|
+
localVarQueryParameter['provider_id'] = providerId;
|
1649
|
+
}
|
1650
|
+
if (resourceId !== null && resourceId !== undefined) {
|
1651
|
+
localVarQueryParameter['resource_id'] = resourceId;
|
1652
|
+
}
|
1653
|
+
if (resourceName !== null && resourceName !== undefined) {
|
1654
|
+
localVarQueryParameter['resource_name'] = resourceName;
|
1655
|
+
}
|
1656
|
+
if (startTime !== null && startTime !== undefined) {
|
1657
|
+
localVarQueryParameter['start_time'] = startTime;
|
1658
|
+
}
|
1659
|
+
if (status !== null && status !== undefined) {
|
1660
|
+
localVarQueryParameter['status'] = status;
|
1661
|
+
}
|
1662
|
+
if (vaultId !== null && vaultId !== undefined) {
|
1663
|
+
localVarQueryParameter['vault_id'] = vaultId;
|
1664
|
+
}
|
1665
|
+
if (vaultName !== null && vaultName !== undefined) {
|
1666
|
+
localVarQueryParameter['vault_name'] = vaultName;
|
1667
|
+
}
|
1668
|
+
if (enterpriseProjectId !== null && enterpriseProjectId !== undefined) {
|
1669
|
+
localVarQueryParameter['enterprise_project_id'] = enterpriseProjectId;
|
1670
|
+
}
|
1671
|
+
options.queryParams = localVarQueryParameter;
|
1672
|
+
options.headers = localVarHeaderParameter;
|
1673
|
+
return options;
|
1674
|
+
},
|
1675
|
+
/**
|
1676
|
+
* 查询策略列表
|
1677
|
+
*
|
1678
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1679
|
+
*/
|
1680
|
+
listPolicies: function (listPoliciesRequest) {
|
1681
|
+
var options = {
|
1682
|
+
method: "GET",
|
1683
|
+
url: "/v3/{project_id}/policies",
|
1684
|
+
contentType: "application/json",
|
1685
|
+
queryParams: {},
|
1686
|
+
pathParams: {},
|
1687
|
+
headers: {}
|
1688
|
+
};
|
1689
|
+
var localVarHeaderParameter = {};
|
1690
|
+
var localVarQueryParameter = {};
|
1691
|
+
var operationType;
|
1692
|
+
var vaultId;
|
1693
|
+
if (listPoliciesRequest !== null && listPoliciesRequest !== undefined) {
|
1694
|
+
if (listPoliciesRequest instanceof ListPoliciesRequest_1.ListPoliciesRequest) {
|
1695
|
+
operationType = listPoliciesRequest.operationType;
|
1696
|
+
vaultId = listPoliciesRequest.vaultId;
|
1697
|
+
}
|
1698
|
+
else {
|
1699
|
+
operationType = listPoliciesRequest['operation_type'];
|
1700
|
+
vaultId = listPoliciesRequest['vault_id'];
|
1701
|
+
}
|
1702
|
+
}
|
1703
|
+
if (operationType !== null && operationType !== undefined) {
|
1704
|
+
localVarQueryParameter['operation_type'] = operationType;
|
1705
|
+
}
|
1706
|
+
if (vaultId !== null && vaultId !== undefined) {
|
1707
|
+
localVarQueryParameter['vault_id'] = vaultId;
|
1708
|
+
}
|
1709
|
+
options.queryParams = localVarQueryParameter;
|
1710
|
+
options.headers = localVarHeaderParameter;
|
1711
|
+
return options;
|
1712
|
+
},
|
1713
|
+
/**
|
1714
|
+
* 查询可保护性资源列表
|
1715
|
+
*
|
1716
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1717
|
+
*/
|
1718
|
+
listProtectable: function (listProtectableRequest) {
|
1719
|
+
var options = {
|
1720
|
+
method: "GET",
|
1721
|
+
url: "/v3/{project_id}/protectables/{protectable_type}/instances",
|
1722
|
+
contentType: "application/json",
|
1723
|
+
queryParams: {},
|
1724
|
+
pathParams: {},
|
1725
|
+
headers: {}
|
1726
|
+
};
|
1727
|
+
var localVarHeaderParameter = {};
|
1728
|
+
var localVarQueryParameter = {};
|
1729
|
+
var protectableType;
|
1730
|
+
var limit;
|
1731
|
+
var marker;
|
1732
|
+
var name;
|
1733
|
+
var offset;
|
1734
|
+
var status;
|
1735
|
+
var id;
|
1736
|
+
var serverId;
|
1737
|
+
if (listProtectableRequest !== null && listProtectableRequest !== undefined) {
|
1738
|
+
if (listProtectableRequest instanceof ListProtectableRequest_1.ListProtectableRequest) {
|
1739
|
+
protectableType = listProtectableRequest.protectableType;
|
1740
|
+
limit = listProtectableRequest.limit;
|
1741
|
+
marker = listProtectableRequest.marker;
|
1742
|
+
name = listProtectableRequest.name;
|
1743
|
+
offset = listProtectableRequest.offset;
|
1744
|
+
status = listProtectableRequest.status;
|
1745
|
+
id = listProtectableRequest.id;
|
1746
|
+
serverId = listProtectableRequest.serverId;
|
1747
|
+
}
|
1748
|
+
else {
|
1749
|
+
protectableType = listProtectableRequest['protectable_type'];
|
1750
|
+
limit = listProtectableRequest['limit'];
|
1751
|
+
marker = listProtectableRequest['marker'];
|
1752
|
+
name = listProtectableRequest['name'];
|
1753
|
+
offset = listProtectableRequest['offset'];
|
1754
|
+
status = listProtectableRequest['status'];
|
1755
|
+
id = listProtectableRequest['id'];
|
1756
|
+
serverId = listProtectableRequest['server_id'];
|
1757
|
+
}
|
1758
|
+
}
|
1759
|
+
if (protectableType === null || protectableType === undefined) {
|
1760
|
+
throw new RequiredError('protectableType', 'Required parameter protectableType was null or undefined when calling listProtectable.');
|
1761
|
+
}
|
1762
|
+
if (limit !== null && limit !== undefined) {
|
1763
|
+
localVarQueryParameter['limit'] = limit;
|
1764
|
+
}
|
1765
|
+
if (marker !== null && marker !== undefined) {
|
1766
|
+
localVarQueryParameter['marker'] = marker;
|
1767
|
+
}
|
1768
|
+
if (name !== null && name !== undefined) {
|
1769
|
+
localVarQueryParameter['name'] = name;
|
1770
|
+
}
|
1771
|
+
if (offset !== null && offset !== undefined) {
|
1772
|
+
localVarQueryParameter['offset'] = offset;
|
1773
|
+
}
|
1774
|
+
if (status !== null && status !== undefined) {
|
1775
|
+
localVarQueryParameter['status'] = status;
|
1776
|
+
}
|
1777
|
+
if (id !== null && id !== undefined) {
|
1778
|
+
localVarQueryParameter['id'] = id;
|
1779
|
+
}
|
1780
|
+
if (serverId !== null && serverId !== undefined) {
|
1781
|
+
localVarQueryParameter['server_id'] = serverId;
|
1782
|
+
}
|
1783
|
+
options.queryParams = localVarQueryParameter;
|
1784
|
+
options.pathParams = { 'protectable_type': protectableType, };
|
1785
|
+
options.headers = localVarHeaderParameter;
|
1786
|
+
return options;
|
1787
|
+
},
|
1788
|
+
/**
|
1789
|
+
* 查询存储库列表
|
1790
|
+
*
|
1791
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1792
|
+
*/
|
1793
|
+
listVault: function (listVaultRequest) {
|
1794
|
+
var options = {
|
1795
|
+
method: "GET",
|
1796
|
+
url: "/v3/{project_id}/vaults",
|
1797
|
+
contentType: "application/json",
|
1798
|
+
queryParams: {},
|
1799
|
+
pathParams: {},
|
1800
|
+
headers: {}
|
1801
|
+
};
|
1802
|
+
var localVarHeaderParameter = {};
|
1803
|
+
var localVarQueryParameter = {};
|
1804
|
+
var limit;
|
1805
|
+
var name;
|
1806
|
+
var offset;
|
1807
|
+
var cloudType;
|
1808
|
+
var protectType;
|
1809
|
+
var objectType;
|
1810
|
+
var enterpriseProjectId;
|
1811
|
+
var id;
|
1812
|
+
var policyId;
|
1813
|
+
var status;
|
1814
|
+
var resourceIds;
|
1815
|
+
if (listVaultRequest !== null && listVaultRequest !== undefined) {
|
1816
|
+
if (listVaultRequest instanceof ListVaultRequest_1.ListVaultRequest) {
|
1817
|
+
limit = listVaultRequest.limit;
|
1818
|
+
name = listVaultRequest.name;
|
1819
|
+
offset = listVaultRequest.offset;
|
1820
|
+
cloudType = listVaultRequest.cloudType;
|
1821
|
+
protectType = listVaultRequest.protectType;
|
1822
|
+
objectType = listVaultRequest.objectType;
|
1823
|
+
enterpriseProjectId = listVaultRequest.enterpriseProjectId;
|
1824
|
+
id = listVaultRequest.id;
|
1825
|
+
policyId = listVaultRequest.policyId;
|
1826
|
+
status = listVaultRequest.status;
|
1827
|
+
resourceIds = listVaultRequest.resourceIds;
|
1828
|
+
}
|
1829
|
+
else {
|
1830
|
+
limit = listVaultRequest['limit'];
|
1831
|
+
name = listVaultRequest['name'];
|
1832
|
+
offset = listVaultRequest['offset'];
|
1833
|
+
cloudType = listVaultRequest['cloud_type'];
|
1834
|
+
protectType = listVaultRequest['protect_type'];
|
1835
|
+
objectType = listVaultRequest['object_type'];
|
1836
|
+
enterpriseProjectId = listVaultRequest['enterprise_project_id'];
|
1837
|
+
id = listVaultRequest['id'];
|
1838
|
+
policyId = listVaultRequest['policy_id'];
|
1839
|
+
status = listVaultRequest['status'];
|
1840
|
+
resourceIds = listVaultRequest['resource_ids'];
|
1841
|
+
}
|
1842
|
+
}
|
1843
|
+
if (limit !== null && limit !== undefined) {
|
1844
|
+
localVarQueryParameter['limit'] = limit;
|
1845
|
+
}
|
1846
|
+
if (name !== null && name !== undefined) {
|
1847
|
+
localVarQueryParameter['name'] = name;
|
1848
|
+
}
|
1849
|
+
if (offset !== null && offset !== undefined) {
|
1850
|
+
localVarQueryParameter['offset'] = offset;
|
1851
|
+
}
|
1852
|
+
if (cloudType !== null && cloudType !== undefined) {
|
1853
|
+
localVarQueryParameter['cloud_type'] = cloudType;
|
1854
|
+
}
|
1855
|
+
if (protectType !== null && protectType !== undefined) {
|
1856
|
+
localVarQueryParameter['protect_type'] = protectType;
|
1857
|
+
}
|
1858
|
+
if (objectType !== null && objectType !== undefined) {
|
1859
|
+
localVarQueryParameter['object_type'] = objectType;
|
1860
|
+
}
|
1861
|
+
if (enterpriseProjectId !== null && enterpriseProjectId !== undefined) {
|
1862
|
+
localVarQueryParameter['enterprise_project_id'] = enterpriseProjectId;
|
1863
|
+
}
|
1864
|
+
if (id !== null && id !== undefined) {
|
1865
|
+
localVarQueryParameter['id'] = id;
|
1866
|
+
}
|
1867
|
+
if (policyId !== null && policyId !== undefined) {
|
1868
|
+
localVarQueryParameter['policy_id'] = policyId;
|
1869
|
+
}
|
1870
|
+
if (status !== null && status !== undefined) {
|
1871
|
+
localVarQueryParameter['status'] = status;
|
1872
|
+
}
|
1873
|
+
if (resourceIds !== null && resourceIds !== undefined) {
|
1874
|
+
localVarQueryParameter['resource_ids'] = resourceIds;
|
1875
|
+
}
|
1876
|
+
options.queryParams = localVarQueryParameter;
|
1877
|
+
options.headers = localVarHeaderParameter;
|
1878
|
+
return options;
|
1879
|
+
},
|
1880
|
+
/**
|
1881
|
+
* 支持资源迁移到另一个存储库,不删除备份。
|
1882
|
+
*
|
1883
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1884
|
+
*/
|
1885
|
+
migrateVaultResource: function (migrateVaultResourceRequest) {
|
1886
|
+
var options = {
|
1887
|
+
method: "POST",
|
1888
|
+
url: "/v3/{project_id}/vaults/{vault_id}/migrateresources",
|
1889
|
+
contentType: "application/json;charset=UTF-8",
|
1890
|
+
queryParams: {},
|
1891
|
+
pathParams: {},
|
1892
|
+
headers: {},
|
1893
|
+
data: {}
|
1894
|
+
};
|
1895
|
+
var localVarHeaderParameter = {};
|
1896
|
+
var body;
|
1897
|
+
var vaultId;
|
1898
|
+
if (migrateVaultResourceRequest !== null && migrateVaultResourceRequest !== undefined) {
|
1899
|
+
if (migrateVaultResourceRequest instanceof MigrateVaultResourceRequest_1.MigrateVaultResourceRequest) {
|
1900
|
+
vaultId = migrateVaultResourceRequest.vaultId;
|
1901
|
+
body = migrateVaultResourceRequest.body;
|
1902
|
+
}
|
1903
|
+
else {
|
1904
|
+
vaultId = migrateVaultResourceRequest['vault_id'];
|
1905
|
+
body = migrateVaultResourceRequest['body'];
|
1906
|
+
}
|
1907
|
+
}
|
1908
|
+
if (vaultId === null || vaultId === undefined) {
|
1909
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling migrateVaultResource.');
|
1910
|
+
}
|
1911
|
+
if (body === null || body === undefined) {
|
1912
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
1913
|
+
}
|
1914
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1915
|
+
options.data = body !== undefined ? body : {};
|
1916
|
+
options.pathParams = { 'vault_id': vaultId, };
|
1917
|
+
options.headers = localVarHeaderParameter;
|
1918
|
+
return options;
|
1919
|
+
},
|
1920
|
+
/**
|
1921
|
+
* 移除存储库中的资源,若移除资源,将一并删除该资源在保管库中的备份
|
1922
|
+
*
|
1923
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1924
|
+
*/
|
1925
|
+
removeVaultResource: function (removeVaultResourceRequest) {
|
1926
|
+
var options = {
|
1927
|
+
method: "POST",
|
1928
|
+
url: "/v3/{project_id}/vaults/{vault_id}/removeresources",
|
1929
|
+
contentType: "application/json;charset=UTF-8",
|
1930
|
+
queryParams: {},
|
1931
|
+
pathParams: {},
|
1932
|
+
headers: {},
|
1933
|
+
data: {}
|
1934
|
+
};
|
1935
|
+
var localVarHeaderParameter = {};
|
1936
|
+
var body;
|
1937
|
+
var vaultId;
|
1938
|
+
if (removeVaultResourceRequest !== null && removeVaultResourceRequest !== undefined) {
|
1939
|
+
if (removeVaultResourceRequest instanceof RemoveVaultResourceRequest_1.RemoveVaultResourceRequest) {
|
1940
|
+
vaultId = removeVaultResourceRequest.vaultId;
|
1941
|
+
body = removeVaultResourceRequest.body;
|
1942
|
+
}
|
1943
|
+
else {
|
1944
|
+
vaultId = removeVaultResourceRequest['vault_id'];
|
1945
|
+
body = removeVaultResourceRequest['body'];
|
1946
|
+
}
|
1947
|
+
}
|
1948
|
+
if (vaultId === null || vaultId === undefined) {
|
1949
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling removeVaultResource.');
|
1950
|
+
}
|
1951
|
+
if (body === null || body === undefined) {
|
1952
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
1953
|
+
}
|
1954
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1955
|
+
options.data = body !== undefined ? body : {};
|
1956
|
+
options.pathParams = { 'vault_id': vaultId, };
|
1957
|
+
options.headers = localVarHeaderParameter;
|
1958
|
+
return options;
|
1959
|
+
},
|
1960
|
+
/**
|
1961
|
+
* 恢复备份数据
|
1962
|
+
*
|
1963
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1964
|
+
*/
|
1965
|
+
restoreBackup: function (restoreBackupRequest) {
|
1966
|
+
var options = {
|
1967
|
+
method: "POST",
|
1968
|
+
url: "/v3/{project_id}/backups/{backup_id}/restore",
|
1969
|
+
contentType: "application/json;charset=UTF-8",
|
1970
|
+
queryParams: {},
|
1971
|
+
pathParams: {},
|
1972
|
+
headers: {},
|
1973
|
+
data: {}
|
1974
|
+
};
|
1975
|
+
var localVarHeaderParameter = {};
|
1976
|
+
var body;
|
1977
|
+
var backupId;
|
1978
|
+
if (restoreBackupRequest !== null && restoreBackupRequest !== undefined) {
|
1979
|
+
if (restoreBackupRequest instanceof RestoreBackupRequest_1.RestoreBackupRequest) {
|
1980
|
+
backupId = restoreBackupRequest.backupId;
|
1981
|
+
body = restoreBackupRequest.body;
|
1982
|
+
}
|
1983
|
+
else {
|
1984
|
+
backupId = restoreBackupRequest['backup_id'];
|
1985
|
+
body = restoreBackupRequest['body'];
|
1986
|
+
}
|
1987
|
+
}
|
1988
|
+
if (backupId === null || backupId === undefined) {
|
1989
|
+
throw new RequiredError('backupId', 'Required parameter backupId was null or undefined when calling restoreBackup.');
|
1990
|
+
}
|
1991
|
+
if (body === null || body === undefined) {
|
1992
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
1993
|
+
}
|
1994
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
1995
|
+
options.data = body !== undefined ? body : {};
|
1996
|
+
options.pathParams = { 'backup_id': backupId, };
|
1997
|
+
options.headers = localVarHeaderParameter;
|
1998
|
+
return options;
|
1999
|
+
},
|
2000
|
+
/**
|
2001
|
+
* 根据指定id查询单个副本。
|
2002
|
+
*
|
2003
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2004
|
+
*/
|
2005
|
+
showBackup: function (showBackupRequest) {
|
2006
|
+
var options = {
|
2007
|
+
method: "GET",
|
2008
|
+
url: "/v3/{project_id}/backups/{backup_id}",
|
2009
|
+
contentType: "application/json",
|
2010
|
+
queryParams: {},
|
2011
|
+
pathParams: {},
|
2012
|
+
headers: {}
|
2013
|
+
};
|
2014
|
+
var localVarHeaderParameter = {};
|
2015
|
+
var backupId;
|
2016
|
+
if (showBackupRequest !== null && showBackupRequest !== undefined) {
|
2017
|
+
if (showBackupRequest instanceof ShowBackupRequest_1.ShowBackupRequest) {
|
2018
|
+
backupId = showBackupRequest.backupId;
|
2019
|
+
}
|
2020
|
+
else {
|
2021
|
+
backupId = showBackupRequest['backup_id'];
|
2022
|
+
}
|
2023
|
+
}
|
2024
|
+
if (backupId === null || backupId === undefined) {
|
2025
|
+
throw new RequiredError('backupId', 'Required parameter backupId was null or undefined when calling showBackup.');
|
2026
|
+
}
|
2027
|
+
options.pathParams = { 'backup_id': backupId, };
|
2028
|
+
options.headers = localVarHeaderParameter;
|
2029
|
+
return options;
|
2030
|
+
},
|
2031
|
+
/**
|
2032
|
+
* 根据还原点ID查询指定还原点
|
2033
|
+
*
|
2034
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2035
|
+
*/
|
2036
|
+
showCheckpoint: function (showCheckpointRequest) {
|
2037
|
+
var options = {
|
2038
|
+
method: "GET",
|
2039
|
+
url: "/v3/{project_id}/checkpoints/{checkpoint_id}",
|
2040
|
+
contentType: "application/json",
|
2041
|
+
queryParams: {},
|
2042
|
+
pathParams: {},
|
2043
|
+
headers: {}
|
2044
|
+
};
|
2045
|
+
var localVarHeaderParameter = {};
|
2046
|
+
var checkpointId;
|
2047
|
+
if (showCheckpointRequest !== null && showCheckpointRequest !== undefined) {
|
2048
|
+
if (showCheckpointRequest instanceof ShowCheckpointRequest_1.ShowCheckpointRequest) {
|
2049
|
+
checkpointId = showCheckpointRequest.checkpointId;
|
2050
|
+
}
|
2051
|
+
else {
|
2052
|
+
checkpointId = showCheckpointRequest['checkpoint_id'];
|
2053
|
+
}
|
2054
|
+
}
|
2055
|
+
if (checkpointId === null || checkpointId === undefined) {
|
2056
|
+
throw new RequiredError('checkpointId', 'Required parameter checkpointId was null or undefined when calling showCheckpoint.');
|
2057
|
+
}
|
2058
|
+
options.pathParams = { 'checkpoint_id': checkpointId, };
|
2059
|
+
options.headers = localVarHeaderParameter;
|
2060
|
+
return options;
|
2061
|
+
},
|
2062
|
+
/**
|
2063
|
+
* 获取备份成员的详情
|
2064
|
+
*
|
2065
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2066
|
+
*/
|
2067
|
+
showMemberDetail: function (showMemberDetailRequest) {
|
2068
|
+
var options = {
|
2069
|
+
method: "GET",
|
2070
|
+
url: "/v3/{project_id}/backups/{backup_id}/members/{member_id}",
|
2071
|
+
contentType: "application/json",
|
2072
|
+
queryParams: {},
|
2073
|
+
pathParams: {},
|
2074
|
+
headers: {}
|
2075
|
+
};
|
2076
|
+
var localVarHeaderParameter = {};
|
2077
|
+
var backupId;
|
2078
|
+
var memberId;
|
2079
|
+
if (showMemberDetailRequest !== null && showMemberDetailRequest !== undefined) {
|
2080
|
+
if (showMemberDetailRequest instanceof ShowMemberDetailRequest_1.ShowMemberDetailRequest) {
|
2081
|
+
backupId = showMemberDetailRequest.backupId;
|
2082
|
+
memberId = showMemberDetailRequest.memberId;
|
2083
|
+
}
|
2084
|
+
else {
|
2085
|
+
backupId = showMemberDetailRequest['backup_id'];
|
2086
|
+
memberId = showMemberDetailRequest['member_id'];
|
2087
|
+
}
|
2088
|
+
}
|
2089
|
+
if (backupId === null || backupId === undefined) {
|
2090
|
+
throw new RequiredError('backupId', 'Required parameter backupId was null or undefined when calling showMemberDetail.');
|
2091
|
+
}
|
2092
|
+
if (memberId === null || memberId === undefined) {
|
2093
|
+
throw new RequiredError('memberId', 'Required parameter memberId was null or undefined when calling showMemberDetail.');
|
2094
|
+
}
|
2095
|
+
options.pathParams = { 'backup_id': backupId, 'member_id': memberId, };
|
2096
|
+
options.headers = localVarHeaderParameter;
|
2097
|
+
return options;
|
2098
|
+
},
|
2099
|
+
/**
|
2100
|
+
* 获取备份共享成员的列表信息
|
2101
|
+
*
|
2102
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2103
|
+
*/
|
2104
|
+
showMembersDetail: function (showMembersDetailRequest) {
|
2105
|
+
var options = {
|
2106
|
+
method: "GET",
|
2107
|
+
url: "/v3/{project_id}/backups/{backup_id}/members",
|
2108
|
+
contentType: "application/json",
|
2109
|
+
queryParams: {},
|
2110
|
+
pathParams: {},
|
2111
|
+
headers: {}
|
2112
|
+
};
|
2113
|
+
var localVarHeaderParameter = {};
|
2114
|
+
var localVarQueryParameter = {};
|
2115
|
+
var backupId;
|
2116
|
+
var destProjectId;
|
2117
|
+
var imageId;
|
2118
|
+
var status;
|
2119
|
+
var vaultId;
|
2120
|
+
var limit;
|
2121
|
+
var marker;
|
2122
|
+
var offset;
|
2123
|
+
var sort;
|
2124
|
+
if (showMembersDetailRequest !== null && showMembersDetailRequest !== undefined) {
|
2125
|
+
if (showMembersDetailRequest instanceof ShowMembersDetailRequest_1.ShowMembersDetailRequest) {
|
2126
|
+
backupId = showMembersDetailRequest.backupId;
|
2127
|
+
destProjectId = showMembersDetailRequest.destProjectId;
|
2128
|
+
imageId = showMembersDetailRequest.imageId;
|
2129
|
+
status = showMembersDetailRequest.status;
|
2130
|
+
vaultId = showMembersDetailRequest.vaultId;
|
2131
|
+
limit = showMembersDetailRequest.limit;
|
2132
|
+
marker = showMembersDetailRequest.marker;
|
2133
|
+
offset = showMembersDetailRequest.offset;
|
2134
|
+
sort = showMembersDetailRequest.sort;
|
2135
|
+
}
|
2136
|
+
else {
|
2137
|
+
backupId = showMembersDetailRequest['backup_id'];
|
2138
|
+
destProjectId = showMembersDetailRequest['dest_project_id'];
|
2139
|
+
imageId = showMembersDetailRequest['image_id'];
|
2140
|
+
status = showMembersDetailRequest['status'];
|
2141
|
+
vaultId = showMembersDetailRequest['vault_id'];
|
2142
|
+
limit = showMembersDetailRequest['limit'];
|
2143
|
+
marker = showMembersDetailRequest['marker'];
|
2144
|
+
offset = showMembersDetailRequest['offset'];
|
2145
|
+
sort = showMembersDetailRequest['sort'];
|
2146
|
+
}
|
2147
|
+
}
|
2148
|
+
if (backupId === null || backupId === undefined) {
|
2149
|
+
throw new RequiredError('backupId', 'Required parameter backupId was null or undefined when calling showMembersDetail.');
|
2150
|
+
}
|
2151
|
+
if (destProjectId !== null && destProjectId !== undefined) {
|
2152
|
+
localVarQueryParameter['dest_project_id'] = destProjectId;
|
2153
|
+
}
|
2154
|
+
if (imageId !== null && imageId !== undefined) {
|
2155
|
+
localVarQueryParameter['image_id'] = imageId;
|
2156
|
+
}
|
2157
|
+
if (status !== null && status !== undefined) {
|
2158
|
+
localVarQueryParameter['status'] = status;
|
2159
|
+
}
|
2160
|
+
if (vaultId !== null && vaultId !== undefined) {
|
2161
|
+
localVarQueryParameter['vault_id'] = vaultId;
|
2162
|
+
}
|
2163
|
+
if (limit !== null && limit !== undefined) {
|
2164
|
+
localVarQueryParameter['limit'] = limit;
|
2165
|
+
}
|
2166
|
+
if (marker !== null && marker !== undefined) {
|
2167
|
+
localVarQueryParameter['marker'] = marker;
|
2168
|
+
}
|
2169
|
+
if (offset !== null && offset !== undefined) {
|
2170
|
+
localVarQueryParameter['offset'] = offset;
|
2171
|
+
}
|
2172
|
+
if (sort !== null && sort !== undefined) {
|
2173
|
+
localVarQueryParameter['sort'] = sort;
|
2174
|
+
}
|
2175
|
+
options.queryParams = localVarQueryParameter;
|
2176
|
+
options.pathParams = { 'backup_id': backupId, };
|
2177
|
+
options.headers = localVarHeaderParameter;
|
2178
|
+
return options;
|
2179
|
+
},
|
2180
|
+
/**
|
2181
|
+
* 根据指定任务ID查询任务
|
2182
|
+
*
|
2183
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2184
|
+
*/
|
2185
|
+
showOpLog: function (showOpLogRequest) {
|
2186
|
+
var options = {
|
2187
|
+
method: "GET",
|
2188
|
+
url: "/v3/{project_id}/operation-logs/{operation_log_id}",
|
2189
|
+
contentType: "application/json",
|
2190
|
+
queryParams: {},
|
2191
|
+
pathParams: {},
|
2192
|
+
headers: {}
|
2193
|
+
};
|
2194
|
+
var localVarHeaderParameter = {};
|
2195
|
+
var operationLogId;
|
2196
|
+
if (showOpLogRequest !== null && showOpLogRequest !== undefined) {
|
2197
|
+
if (showOpLogRequest instanceof ShowOpLogRequest_1.ShowOpLogRequest) {
|
2198
|
+
operationLogId = showOpLogRequest.operationLogId;
|
2199
|
+
}
|
2200
|
+
else {
|
2201
|
+
operationLogId = showOpLogRequest['operation_log_id'];
|
2202
|
+
}
|
2203
|
+
}
|
2204
|
+
if (operationLogId === null || operationLogId === undefined) {
|
2205
|
+
throw new RequiredError('operationLogId', 'Required parameter operationLogId was null or undefined when calling showOpLog.');
|
2206
|
+
}
|
2207
|
+
options.pathParams = { 'operation_log_id': operationLogId, };
|
2208
|
+
options.headers = localVarHeaderParameter;
|
2209
|
+
return options;
|
2210
|
+
},
|
2211
|
+
/**
|
2212
|
+
* 查询单个策略
|
2213
|
+
*
|
2214
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2215
|
+
*/
|
2216
|
+
showPolicy: function (showPolicyRequest) {
|
2217
|
+
var options = {
|
2218
|
+
method: "GET",
|
2219
|
+
url: "/v3/{project_id}/policies/{policy_id}",
|
2220
|
+
contentType: "application/json",
|
2221
|
+
queryParams: {},
|
2222
|
+
pathParams: {},
|
2223
|
+
headers: {}
|
2224
|
+
};
|
2225
|
+
var localVarHeaderParameter = {};
|
2226
|
+
var policyId;
|
2227
|
+
if (showPolicyRequest !== null && showPolicyRequest !== undefined) {
|
2228
|
+
if (showPolicyRequest instanceof ShowPolicyRequest_1.ShowPolicyRequest) {
|
2229
|
+
policyId = showPolicyRequest.policyId;
|
2230
|
+
}
|
2231
|
+
else {
|
2232
|
+
policyId = showPolicyRequest['policy_id'];
|
2233
|
+
}
|
2234
|
+
}
|
2235
|
+
if (policyId === null || policyId === undefined) {
|
2236
|
+
throw new RequiredError('policyId', 'Required parameter policyId was null or undefined when calling showPolicy.');
|
2237
|
+
}
|
2238
|
+
options.pathParams = { 'policy_id': policyId, };
|
2239
|
+
options.headers = localVarHeaderParameter;
|
2240
|
+
return options;
|
2241
|
+
},
|
2242
|
+
/**
|
2243
|
+
* 根据ID查询可保护性资源
|
2244
|
+
*
|
2245
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2246
|
+
*/
|
2247
|
+
showProtectable: function (showProtectableRequest) {
|
2248
|
+
var options = {
|
2249
|
+
method: "GET",
|
2250
|
+
url: "/v3/{project_id}/protectables/{protectable_type}/instances/{instance_id}",
|
2251
|
+
contentType: "application/json",
|
2252
|
+
queryParams: {},
|
2253
|
+
pathParams: {},
|
2254
|
+
headers: {}
|
2255
|
+
};
|
2256
|
+
var localVarHeaderParameter = {};
|
2257
|
+
var instanceId;
|
2258
|
+
var protectableType;
|
2259
|
+
if (showProtectableRequest !== null && showProtectableRequest !== undefined) {
|
2260
|
+
if (showProtectableRequest instanceof ShowProtectableRequest_1.ShowProtectableRequest) {
|
2261
|
+
instanceId = showProtectableRequest.instanceId;
|
2262
|
+
protectableType = showProtectableRequest.protectableType;
|
2263
|
+
}
|
2264
|
+
else {
|
2265
|
+
instanceId = showProtectableRequest['instance_id'];
|
2266
|
+
protectableType = showProtectableRequest['protectable_type'];
|
2267
|
+
}
|
2268
|
+
}
|
2269
|
+
if (instanceId === null || instanceId === undefined) {
|
2270
|
+
throw new RequiredError('instanceId', 'Required parameter instanceId was null or undefined when calling showProtectable.');
|
2271
|
+
}
|
2272
|
+
if (protectableType === null || protectableType === undefined) {
|
2273
|
+
throw new RequiredError('protectableType', 'Required parameter protectableType was null or undefined when calling showProtectable.');
|
2274
|
+
}
|
2275
|
+
options.pathParams = { 'instance_id': instanceId, 'protectable_type': protectableType, };
|
2276
|
+
options.headers = localVarHeaderParameter;
|
2277
|
+
return options;
|
2278
|
+
},
|
2279
|
+
/**
|
2280
|
+
* 查询本区域的复制能力
|
2281
|
+
*
|
2282
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2283
|
+
*/
|
2284
|
+
showReplicationCapabilities: function () {
|
2285
|
+
var options = {
|
2286
|
+
method: "GET",
|
2287
|
+
url: "/v3/{project_id}/replication-capabilities",
|
2288
|
+
contentType: "application/json",
|
2289
|
+
queryParams: {},
|
2290
|
+
pathParams: {},
|
2291
|
+
headers: {}
|
2292
|
+
};
|
2293
|
+
var localVarHeaderParameter = {};
|
2294
|
+
options.headers = localVarHeaderParameter;
|
2295
|
+
return options;
|
2296
|
+
},
|
2297
|
+
/**
|
2298
|
+
* 根据ID查询指定存储库
|
2299
|
+
*
|
2300
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2301
|
+
*/
|
2302
|
+
showVault: function (showVaultRequest) {
|
2303
|
+
var options = {
|
2304
|
+
method: "GET",
|
2305
|
+
url: "/v3/{project_id}/vaults/{vault_id}",
|
2306
|
+
contentType: "application/json",
|
2307
|
+
queryParams: {},
|
2308
|
+
pathParams: {},
|
2309
|
+
headers: {}
|
2310
|
+
};
|
2311
|
+
var localVarHeaderParameter = {};
|
2312
|
+
var vaultId;
|
2313
|
+
if (showVaultRequest !== null && showVaultRequest !== undefined) {
|
2314
|
+
if (showVaultRequest instanceof ShowVaultRequest_1.ShowVaultRequest) {
|
2315
|
+
vaultId = showVaultRequest.vaultId;
|
2316
|
+
}
|
2317
|
+
else {
|
2318
|
+
vaultId = showVaultRequest['vault_id'];
|
2319
|
+
}
|
2320
|
+
}
|
2321
|
+
if (vaultId === null || vaultId === undefined) {
|
2322
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling showVault.');
|
2323
|
+
}
|
2324
|
+
options.pathParams = { 'vault_id': vaultId, };
|
2325
|
+
options.headers = localVarHeaderParameter;
|
2326
|
+
return options;
|
2327
|
+
},
|
2328
|
+
/**
|
2329
|
+
* 查询租户在指定Region和实例类型的所有标签集合
|
2330
|
+
* 标签管理服务需要能够列出当前租户全部已使用的标签集合,为各服务Console打标签和过滤实例时提供标签联想功能
|
2331
|
+
*
|
2332
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2333
|
+
*/
|
2334
|
+
showVaultProjectTag: function () {
|
2335
|
+
var options = {
|
2336
|
+
method: "GET",
|
2337
|
+
url: "/v3/{project_id}/vault/tags",
|
2338
|
+
contentType: "application/json",
|
2339
|
+
queryParams: {},
|
2340
|
+
pathParams: {},
|
2341
|
+
headers: {}
|
2342
|
+
};
|
2343
|
+
var localVarHeaderParameter = {};
|
2344
|
+
options.headers = localVarHeaderParameter;
|
2345
|
+
return options;
|
2346
|
+
},
|
2347
|
+
/**
|
2348
|
+
* 使用标签过滤实例
|
2349
|
+
* 标签管理服务需要提供按标签过滤各服务实例并汇总显示在列表中,需要各服务提供查询能力
|
2350
|
+
*
|
2351
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2352
|
+
*/
|
2353
|
+
showVaultResourceInstances: function (showVaultResourceInstancesRequest) {
|
2354
|
+
var options = {
|
2355
|
+
method: "POST",
|
2356
|
+
url: "/v3/{project_id}/vault/resource_instances/action",
|
2357
|
+
contentType: "application/json;charset=UTF-8",
|
2358
|
+
queryParams: {},
|
2359
|
+
pathParams: {},
|
2360
|
+
headers: {},
|
2361
|
+
data: {}
|
2362
|
+
};
|
2363
|
+
var localVarHeaderParameter = {};
|
2364
|
+
var body;
|
2365
|
+
if (showVaultResourceInstancesRequest !== null && showVaultResourceInstancesRequest !== undefined) {
|
2366
|
+
if (showVaultResourceInstancesRequest instanceof ShowVaultResourceInstancesRequest_1.ShowVaultResourceInstancesRequest) {
|
2367
|
+
body = showVaultResourceInstancesRequest.body;
|
2368
|
+
}
|
2369
|
+
else {
|
2370
|
+
body = showVaultResourceInstancesRequest['body'];
|
2371
|
+
}
|
2372
|
+
}
|
2373
|
+
if (body === null || body === undefined) {
|
2374
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
2375
|
+
}
|
2376
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
2377
|
+
options.data = body !== undefined ? body : {};
|
2378
|
+
options.headers = localVarHeaderParameter;
|
2379
|
+
return options;
|
2380
|
+
},
|
2381
|
+
/**
|
2382
|
+
* 查询指定实例的标签信息
|
2383
|
+
* 标签管理服务需要使用该接口查询指定实例的全部标签数据
|
2384
|
+
*
|
2385
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2386
|
+
*/
|
2387
|
+
showVaultTag: function (showVaultTagRequest) {
|
2388
|
+
var options = {
|
2389
|
+
method: "GET",
|
2390
|
+
url: "/v3/{project_id}/vault/{vault_id}/tags",
|
2391
|
+
contentType: "application/json",
|
2392
|
+
queryParams: {},
|
2393
|
+
pathParams: {},
|
2394
|
+
headers: {}
|
2395
|
+
};
|
2396
|
+
var localVarHeaderParameter = {};
|
2397
|
+
var vaultId;
|
2398
|
+
if (showVaultTagRequest !== null && showVaultTagRequest !== undefined) {
|
2399
|
+
if (showVaultTagRequest instanceof ShowVaultTagRequest_1.ShowVaultTagRequest) {
|
2400
|
+
vaultId = showVaultTagRequest.vaultId;
|
2401
|
+
}
|
2402
|
+
else {
|
2403
|
+
vaultId = showVaultTagRequest['vault_id'];
|
2404
|
+
}
|
2405
|
+
}
|
2406
|
+
if (vaultId === null || vaultId === undefined) {
|
2407
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling showVaultTag.');
|
2408
|
+
}
|
2409
|
+
options.pathParams = { 'vault_id': vaultId, };
|
2410
|
+
options.headers = localVarHeaderParameter;
|
2411
|
+
return options;
|
2412
|
+
},
|
2413
|
+
/**
|
2414
|
+
* 更新备份共享成员的状态,需要接收方执行此API。
|
2415
|
+
*
|
2416
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2417
|
+
*/
|
2418
|
+
updateMemberStatus: function (updateMemberStatusRequest) {
|
2419
|
+
var options = {
|
2420
|
+
method: "PUT",
|
2421
|
+
url: "/v3/{project_id}/backups/{backup_id}/members/{member_id}",
|
2422
|
+
contentType: "application/json;charset=UTF-8",
|
2423
|
+
queryParams: {},
|
2424
|
+
pathParams: {},
|
2425
|
+
headers: {},
|
2426
|
+
data: {}
|
2427
|
+
};
|
2428
|
+
var localVarHeaderParameter = {};
|
2429
|
+
var body;
|
2430
|
+
var memberId;
|
2431
|
+
var backupId;
|
2432
|
+
if (updateMemberStatusRequest !== null && updateMemberStatusRequest !== undefined) {
|
2433
|
+
if (updateMemberStatusRequest instanceof UpdateMemberStatusRequest_1.UpdateMemberStatusRequest) {
|
2434
|
+
memberId = updateMemberStatusRequest.memberId;
|
2435
|
+
backupId = updateMemberStatusRequest.backupId;
|
2436
|
+
body = updateMemberStatusRequest.body;
|
2437
|
+
}
|
2438
|
+
else {
|
2439
|
+
memberId = updateMemberStatusRequest['member_id'];
|
2440
|
+
backupId = updateMemberStatusRequest['backup_id'];
|
2441
|
+
body = updateMemberStatusRequest['body'];
|
2442
|
+
}
|
2443
|
+
}
|
2444
|
+
if (memberId === null || memberId === undefined) {
|
2445
|
+
throw new RequiredError('memberId', 'Required parameter memberId was null or undefined when calling updateMemberStatus.');
|
2446
|
+
}
|
2447
|
+
if (backupId === null || backupId === undefined) {
|
2448
|
+
throw new RequiredError('backupId', 'Required parameter backupId was null or undefined when calling updateMemberStatus.');
|
2449
|
+
}
|
2450
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
2451
|
+
options.data = body !== undefined ? body : {};
|
2452
|
+
options.pathParams = { 'member_id': memberId, 'backup_id': backupId, };
|
2453
|
+
options.headers = localVarHeaderParameter;
|
2454
|
+
return options;
|
2455
|
+
},
|
2456
|
+
/**
|
2457
|
+
* 修改策略
|
2458
|
+
*
|
2459
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2460
|
+
*/
|
2461
|
+
updatePolicy: function (updatePolicyRequest) {
|
2462
|
+
var options = {
|
2463
|
+
method: "PUT",
|
2464
|
+
url: "/v3/{project_id}/policies/{policy_id}",
|
2465
|
+
contentType: "application/json;charset=UTF-8",
|
2466
|
+
queryParams: {},
|
2467
|
+
pathParams: {},
|
2468
|
+
headers: {},
|
2469
|
+
data: {}
|
2470
|
+
};
|
2471
|
+
var localVarHeaderParameter = {};
|
2472
|
+
var body;
|
2473
|
+
var policyId;
|
2474
|
+
if (updatePolicyRequest !== null && updatePolicyRequest !== undefined) {
|
2475
|
+
if (updatePolicyRequest instanceof UpdatePolicyRequest_1.UpdatePolicyRequest) {
|
2476
|
+
policyId = updatePolicyRequest.policyId;
|
2477
|
+
body = updatePolicyRequest.body;
|
2478
|
+
}
|
2479
|
+
else {
|
2480
|
+
policyId = updatePolicyRequest['policy_id'];
|
2481
|
+
body = updatePolicyRequest['body'];
|
2482
|
+
}
|
2483
|
+
}
|
2484
|
+
if (policyId === null || policyId === undefined) {
|
2485
|
+
throw new RequiredError('policyId', 'Required parameter policyId was null or undefined when calling updatePolicy.');
|
2486
|
+
}
|
2487
|
+
if (body === null || body === undefined) {
|
2488
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
2489
|
+
}
|
2490
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
2491
|
+
options.data = body !== undefined ? body : {};
|
2492
|
+
options.pathParams = { 'policy_id': policyId, };
|
2493
|
+
options.headers = localVarHeaderParameter;
|
2494
|
+
return options;
|
2495
|
+
},
|
2496
|
+
/**
|
2497
|
+
* 根据存储库ID修改存储库
|
2498
|
+
*
|
2499
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
2500
|
+
*/
|
2501
|
+
updateVault: function (updateVaultRequest) {
|
2502
|
+
var options = {
|
2503
|
+
method: "PUT",
|
2504
|
+
url: "/v3/{project_id}/vaults/{vault_id}",
|
2505
|
+
contentType: "application/json;charset=UTF-8",
|
2506
|
+
queryParams: {},
|
2507
|
+
pathParams: {},
|
2508
|
+
headers: {},
|
2509
|
+
data: {}
|
2510
|
+
};
|
2511
|
+
var localVarHeaderParameter = {};
|
2512
|
+
var body;
|
2513
|
+
var vaultId;
|
2514
|
+
if (updateVaultRequest !== null && updateVaultRequest !== undefined) {
|
2515
|
+
if (updateVaultRequest instanceof UpdateVaultRequest_1.UpdateVaultRequest) {
|
2516
|
+
vaultId = updateVaultRequest.vaultId;
|
2517
|
+
body = updateVaultRequest.body;
|
2518
|
+
}
|
2519
|
+
else {
|
2520
|
+
vaultId = updateVaultRequest['vault_id'];
|
2521
|
+
body = updateVaultRequest['body'];
|
2522
|
+
}
|
2523
|
+
}
|
2524
|
+
if (vaultId === null || vaultId === undefined) {
|
2525
|
+
throw new RequiredError('vaultId', 'Required parameter vaultId was null or undefined when calling updateVault.');
|
2526
|
+
}
|
2527
|
+
if (body === null || body === undefined) {
|
2528
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
|
2529
|
+
}
|
2530
|
+
localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
|
2531
|
+
options.data = body !== undefined ? body : {};
|
2532
|
+
options.pathParams = { 'vault_id': vaultId, };
|
2533
|
+
options.headers = localVarHeaderParameter;
|
2534
|
+
return options;
|
2535
|
+
},
|
2536
|
+
};
|
2537
|
+
};
|
2538
|
+
exports.ParamCreater = ParamCreater;
|
2539
|
+
function newClient(client) {
|
2540
|
+
return new CbrClient(client);
|
2541
|
+
}
|
2542
|
+
/**
|
2543
|
+
*
|
2544
|
+
* @export
|
2545
|
+
* @class RequiredError
|
2546
|
+
* @extends {Error}
|
2547
|
+
*/
|
2548
|
+
var RequiredError = /** @class */ (function (_super) {
|
2549
|
+
__extends(RequiredError, _super);
|
2550
|
+
function RequiredError(field, msg) {
|
2551
|
+
var _this = _super.call(this, msg) || this;
|
2552
|
+
_this.field = field;
|
2553
|
+
_this.name = "RequiredError";
|
2554
|
+
return _this;
|
2555
|
+
}
|
2556
|
+
return RequiredError;
|
2557
|
+
}(Error));
|
2558
|
+
exports.RequiredError = RequiredError;
|