@azure/keyvault-admin 4.6.1-alpha.20250225.1 → 4.7.0-alpha.20250227.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/backupClient.d.ts +130 -3
- package/dist/commonjs/backupClient.d.ts.map +1 -1
- package/dist/commonjs/backupClient.js +123 -30
- package/dist/commonjs/backupClient.js.map +1 -1
- package/dist/commonjs/backupClientModels.d.ts +15 -3
- package/dist/commonjs/backupClientModels.d.ts.map +1 -1
- package/dist/commonjs/backupClientModels.js.map +1 -1
- package/dist/commonjs/constants.d.ts +2 -2
- package/dist/commonjs/constants.d.ts.map +1 -1
- package/dist/commonjs/constants.js +2 -2
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/commonjs/generated/api/index.d.ts +2 -2
- package/dist/commonjs/generated/api/index.d.ts.map +1 -1
- package/dist/commonjs/generated/api/index.js +11 -10
- package/dist/commonjs/generated/api/index.js.map +1 -1
- package/dist/commonjs/generated/api/keyVaultContext.d.ts +4 -1
- package/dist/commonjs/generated/api/keyVaultContext.d.ts.map +1 -1
- package/dist/commonjs/generated/api/keyVaultContext.js +4 -4
- package/dist/commonjs/generated/api/keyVaultContext.js.map +1 -1
- package/dist/commonjs/generated/api/operations.d.ts +42 -38
- package/dist/commonjs/generated/api/operations.d.ts.map +1 -1
- package/dist/commonjs/generated/api/operations.js +188 -145
- package/dist/commonjs/generated/api/operations.js.map +1 -1
- package/dist/commonjs/generated/api/options.d.ts +34 -42
- package/dist/commonjs/generated/api/options.d.ts.map +1 -1
- package/dist/commonjs/generated/api/options.js.map +1 -1
- package/dist/commonjs/generated/api/roleAssignments/index.d.ts +12 -12
- package/dist/commonjs/generated/api/roleAssignments/index.d.ts.map +1 -1
- package/dist/commonjs/generated/api/roleAssignments/index.js +66 -51
- package/dist/commonjs/generated/api/roleAssignments/index.js.map +1 -1
- package/dist/commonjs/generated/api/roleDefinitions/index.d.ts +12 -12
- package/dist/commonjs/generated/api/roleDefinitions/index.d.ts.map +1 -1
- package/dist/commonjs/generated/api/roleDefinitions/index.js +66 -51
- package/dist/commonjs/generated/api/roleDefinitions/index.js.map +1 -1
- package/dist/commonjs/generated/classic/roleAssignments/index.d.ts +8 -14
- package/dist/commonjs/generated/classic/roleAssignments/index.d.ts.map +1 -1
- package/dist/commonjs/generated/classic/roleAssignments/index.js +7 -8
- package/dist/commonjs/generated/classic/roleAssignments/index.js.map +1 -1
- package/dist/commonjs/generated/classic/roleDefinitions/index.d.ts +8 -14
- package/dist/commonjs/generated/classic/roleDefinitions/index.d.ts.map +1 -1
- package/dist/commonjs/generated/classic/roleDefinitions/index.js +7 -8
- package/dist/commonjs/generated/classic/roleDefinitions/index.js.map +1 -1
- package/dist/commonjs/generated/index.d.ts +2 -2
- package/dist/commonjs/generated/index.d.ts.map +1 -1
- package/dist/commonjs/generated/index.js +2 -2
- package/dist/commonjs/generated/index.js.map +1 -1
- package/dist/commonjs/generated/keyVaultClient.d.ts +27 -25
- package/dist/commonjs/generated/keyVaultClient.d.ts.map +1 -1
- package/dist/commonjs/generated/keyVaultClient.js +39 -35
- package/dist/commonjs/generated/keyVaultClient.js.map +1 -1
- package/dist/commonjs/generated/models/index.d.ts +1 -1
- package/dist/commonjs/generated/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/models/index.js +2 -2
- package/dist/commonjs/generated/models/index.js.map +1 -1
- package/dist/commonjs/generated/models/models.d.ts +90 -78
- package/dist/commonjs/generated/models/models.d.ts.map +1 -1
- package/dist/commonjs/generated/models/models.js +78 -70
- package/dist/commonjs/generated/models/models.js.map +1 -1
- package/dist/commonjs/generated/restorePollerHelpers.js +8 -8
- package/dist/commonjs/generated/restorePollerHelpers.js.map +1 -1
- package/dist/commonjs/lro/shim.d.ts +7 -0
- package/dist/commonjs/lro/shim.d.ts.map +1 -1
- package/dist/commonjs/lro/shim.js +17 -1
- package/dist/commonjs/lro/shim.js.map +1 -1
- package/dist/esm/backupClient.d.ts +130 -3
- package/dist/esm/backupClient.d.ts.map +1 -1
- package/dist/esm/backupClient.js +124 -31
- package/dist/esm/backupClient.js.map +1 -1
- package/dist/esm/backupClientModels.d.ts +15 -3
- package/dist/esm/backupClientModels.d.ts.map +1 -1
- package/dist/esm/backupClientModels.js.map +1 -1
- package/dist/esm/constants.d.ts +2 -2
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.js +2 -2
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/generated/api/index.d.ts +2 -2
- package/dist/esm/generated/api/index.d.ts.map +1 -1
- package/dist/esm/generated/api/index.js +1 -1
- package/dist/esm/generated/api/index.js.map +1 -1
- package/dist/esm/generated/api/keyVaultContext.d.ts +4 -1
- package/dist/esm/generated/api/keyVaultContext.d.ts.map +1 -1
- package/dist/esm/generated/api/keyVaultContext.js +4 -4
- package/dist/esm/generated/api/keyVaultContext.js.map +1 -1
- package/dist/esm/generated/api/operations.d.ts +42 -38
- package/dist/esm/generated/api/operations.d.ts.map +1 -1
- package/dist/esm/generated/api/operations.js +159 -119
- package/dist/esm/generated/api/operations.js.map +1 -1
- package/dist/esm/generated/api/options.d.ts +34 -42
- package/dist/esm/generated/api/options.d.ts.map +1 -1
- package/dist/esm/generated/api/options.js.map +1 -1
- package/dist/esm/generated/api/roleAssignments/index.d.ts +12 -12
- package/dist/esm/generated/api/roleAssignments/index.d.ts.map +1 -1
- package/dist/esm/generated/api/roleAssignments/index.js +58 -43
- package/dist/esm/generated/api/roleAssignments/index.js.map +1 -1
- package/dist/esm/generated/api/roleDefinitions/index.d.ts +12 -12
- package/dist/esm/generated/api/roleDefinitions/index.d.ts.map +1 -1
- package/dist/esm/generated/api/roleDefinitions/index.js +58 -43
- package/dist/esm/generated/api/roleDefinitions/index.js.map +1 -1
- package/dist/esm/generated/classic/roleAssignments/index.d.ts +8 -14
- package/dist/esm/generated/classic/roleAssignments/index.d.ts.map +1 -1
- package/dist/esm/generated/classic/roleAssignments/index.js +7 -7
- package/dist/esm/generated/classic/roleAssignments/index.js.map +1 -1
- package/dist/esm/generated/classic/roleDefinitions/index.d.ts +8 -14
- package/dist/esm/generated/classic/roleDefinitions/index.d.ts.map +1 -1
- package/dist/esm/generated/classic/roleDefinitions/index.js +7 -7
- package/dist/esm/generated/classic/roleDefinitions/index.js.map +1 -1
- package/dist/esm/generated/index.d.ts +2 -2
- package/dist/esm/generated/index.d.ts.map +1 -1
- package/dist/esm/generated/index.js +1 -1
- package/dist/esm/generated/index.js.map +1 -1
- package/dist/esm/generated/keyVaultClient.d.ts +27 -25
- package/dist/esm/generated/keyVaultClient.d.ts.map +1 -1
- package/dist/esm/generated/keyVaultClient.js +42 -38
- package/dist/esm/generated/keyVaultClient.js.map +1 -1
- package/dist/esm/generated/models/index.d.ts +1 -1
- package/dist/esm/generated/models/index.d.ts.map +1 -1
- package/dist/esm/generated/models/index.js +1 -1
- package/dist/esm/generated/models/index.js.map +1 -1
- package/dist/esm/generated/models/models.d.ts +90 -78
- package/dist/esm/generated/models/models.d.ts.map +1 -1
- package/dist/esm/generated/models/models.js +69 -61
- package/dist/esm/generated/models/models.js.map +1 -1
- package/dist/esm/generated/restorePollerHelpers.js +9 -9
- package/dist/esm/generated/restorePollerHelpers.js.map +1 -1
- package/dist/esm/lro/shim.d.ts +7 -0
- package/dist/esm/lro/shim.d.ts.map +1 -1
- package/dist/esm/lro/shim.js +16 -1
- package/dist/esm/lro/shim.js.map +1 -1
- package/package.json +1 -1
- package/dist/commonjs/generated/helpers/serializerHelpers.d.ts +0 -3
- package/dist/commonjs/generated/helpers/serializerHelpers.d.ts.map +0 -1
- package/dist/commonjs/generated/helpers/serializerHelpers.js +0 -28
- package/dist/commonjs/generated/helpers/serializerHelpers.js.map +0 -1
- package/dist/esm/generated/helpers/serializerHelpers.d.ts +0 -3
- package/dist/esm/generated/helpers/serializerHelpers.d.ts.map +0 -1
- package/dist/esm/generated/helpers/serializerHelpers.js +0 -25
- package/dist/esm/generated/helpers/serializerHelpers.js.map +0 -1
|
@@ -2,237 +2,280 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports._fullBackupStatusSend = _fullBackupStatusSend;
|
|
6
|
-
exports._fullBackupStatusDeserialize = _fullBackupStatusDeserialize;
|
|
7
|
-
exports.fullBackupStatus = fullBackupStatus;
|
|
8
|
-
exports._fullBackupSend = _fullBackupSend;
|
|
9
|
-
exports._fullBackupDeserialize = _fullBackupDeserialize;
|
|
10
|
-
exports.fullBackup = fullBackup;
|
|
11
|
-
exports._preFullBackupSend = _preFullBackupSend;
|
|
12
|
-
exports._preFullBackupDeserialize = _preFullBackupDeserialize;
|
|
13
|
-
exports.preFullBackup = preFullBackup;
|
|
14
|
-
exports._restoreStatusSend = _restoreStatusSend;
|
|
15
|
-
exports._restoreStatusDeserialize = _restoreStatusDeserialize;
|
|
16
|
-
exports.restoreStatus = restoreStatus;
|
|
17
|
-
exports._preFullRestoreOperationSend = _preFullRestoreOperationSend;
|
|
18
|
-
exports._preFullRestoreOperationDeserialize = _preFullRestoreOperationDeserialize;
|
|
19
|
-
exports.preFullRestoreOperation = preFullRestoreOperation;
|
|
20
|
-
exports._fullRestoreOperationSend = _fullRestoreOperationSend;
|
|
21
|
-
exports._fullRestoreOperationDeserialize = _fullRestoreOperationDeserialize;
|
|
22
|
-
exports.fullRestoreOperation = fullRestoreOperation;
|
|
23
|
-
exports._selectiveKeyRestoreOperationSend = _selectiveKeyRestoreOperationSend;
|
|
24
|
-
exports._selectiveKeyRestoreOperationDeserialize = _selectiveKeyRestoreOperationDeserialize;
|
|
25
|
-
exports.selectiveKeyRestoreOperation = selectiveKeyRestoreOperation;
|
|
26
|
-
exports._updateSettingSend = _updateSettingSend;
|
|
27
|
-
exports._updateSettingDeserialize = _updateSettingDeserialize;
|
|
28
|
-
exports.updateSetting = updateSetting;
|
|
29
|
-
exports._getSettingSend = _getSettingSend;
|
|
30
|
-
exports._getSettingDeserialize = _getSettingDeserialize;
|
|
31
|
-
exports.getSetting = getSetting;
|
|
32
5
|
exports._getSettingsSend = _getSettingsSend;
|
|
33
6
|
exports._getSettingsDeserialize = _getSettingsDeserialize;
|
|
34
7
|
exports.getSettings = getSettings;
|
|
8
|
+
exports._getSettingSend = _getSettingSend;
|
|
9
|
+
exports._getSettingDeserialize = _getSettingDeserialize;
|
|
10
|
+
exports.getSetting = getSetting;
|
|
11
|
+
exports._updateSettingSend = _updateSettingSend;
|
|
12
|
+
exports._updateSettingDeserialize = _updateSettingDeserialize;
|
|
13
|
+
exports.updateSetting = updateSetting;
|
|
14
|
+
exports._selectiveKeyRestoreOperationSend = _selectiveKeyRestoreOperationSend;
|
|
15
|
+
exports._selectiveKeyRestoreOperationDeserialize = _selectiveKeyRestoreOperationDeserialize;
|
|
16
|
+
exports.selectiveKeyRestoreOperation = selectiveKeyRestoreOperation;
|
|
17
|
+
exports._selectiveKeyRestoreStatusSend = _selectiveKeyRestoreStatusSend;
|
|
18
|
+
exports._selectiveKeyRestoreStatusDeserialize = _selectiveKeyRestoreStatusDeserialize;
|
|
19
|
+
exports.selectiveKeyRestoreStatus = selectiveKeyRestoreStatus;
|
|
20
|
+
exports._fullRestoreOperationSend = _fullRestoreOperationSend;
|
|
21
|
+
exports._fullRestoreOperationDeserialize = _fullRestoreOperationDeserialize;
|
|
22
|
+
exports.fullRestoreOperation = fullRestoreOperation;
|
|
23
|
+
exports._preFullRestoreOperationSend = _preFullRestoreOperationSend;
|
|
24
|
+
exports._preFullRestoreOperationDeserialize = _preFullRestoreOperationDeserialize;
|
|
25
|
+
exports.preFullRestoreOperation = preFullRestoreOperation;
|
|
26
|
+
exports._restoreStatusSend = _restoreStatusSend;
|
|
27
|
+
exports._restoreStatusDeserialize = _restoreStatusDeserialize;
|
|
28
|
+
exports.restoreStatus = restoreStatus;
|
|
29
|
+
exports._preFullBackupSend = _preFullBackupSend;
|
|
30
|
+
exports._preFullBackupDeserialize = _preFullBackupDeserialize;
|
|
31
|
+
exports.preFullBackup = preFullBackup;
|
|
32
|
+
exports._fullBackupSend = _fullBackupSend;
|
|
33
|
+
exports._fullBackupDeserialize = _fullBackupDeserialize;
|
|
34
|
+
exports.fullBackup = fullBackup;
|
|
35
|
+
exports._fullBackupStatusSend = _fullBackupStatusSend;
|
|
36
|
+
exports._fullBackupStatusDeserialize = _fullBackupStatusDeserialize;
|
|
37
|
+
exports.fullBackupStatus = fullBackupStatus;
|
|
35
38
|
const models_js_1 = require("../models/models.js");
|
|
36
39
|
const pollingHelpers_js_1 = require("../static-helpers/pollingHelpers.js");
|
|
37
40
|
const core_client_1 = require("@azure-rest/core-client");
|
|
38
|
-
function
|
|
41
|
+
function _getSettingsSend(context, options = { requestOptions: {} }) {
|
|
42
|
+
var _a;
|
|
39
43
|
return context
|
|
40
|
-
.path("/
|
|
41
|
-
.get(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)));
|
|
44
|
+
.path("/settings")
|
|
45
|
+
.get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
42
46
|
}
|
|
43
|
-
async function
|
|
47
|
+
async function _getSettingsDeserialize(result) {
|
|
44
48
|
const expectedStatuses = ["200"];
|
|
45
49
|
if (!expectedStatuses.includes(result.status)) {
|
|
46
|
-
|
|
50
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
51
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
52
|
+
throw error;
|
|
47
53
|
}
|
|
48
|
-
return (0, models_js_1.
|
|
54
|
+
return (0, models_js_1.settingsListResultDeserializer)(result.body);
|
|
49
55
|
}
|
|
50
|
-
/**
|
|
51
|
-
async function
|
|
52
|
-
const result = await
|
|
53
|
-
return
|
|
56
|
+
/** Retrieves a list of all the available account settings that can be configured. */
|
|
57
|
+
async function getSettings(context, options = { requestOptions: {} }) {
|
|
58
|
+
const result = await _getSettingsSend(context, options);
|
|
59
|
+
return _getSettingsDeserialize(result);
|
|
54
60
|
}
|
|
55
|
-
function
|
|
61
|
+
function _getSettingSend(context, settingName, options = { requestOptions: {} }) {
|
|
62
|
+
var _a;
|
|
56
63
|
return context
|
|
57
|
-
.path("/
|
|
58
|
-
.
|
|
59
|
-
? options["azureStorageBlobContainerUri"]
|
|
60
|
-
: (0, models_js_1.sASTokenParameterSerializer)(options["azureStorageBlobContainerUri"]) }));
|
|
64
|
+
.path("/settings/{setting-name}", settingName)
|
|
65
|
+
.get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
61
66
|
}
|
|
62
|
-
async function
|
|
63
|
-
const expectedStatuses = ["
|
|
67
|
+
async function _getSettingDeserialize(result) {
|
|
68
|
+
const expectedStatuses = ["200"];
|
|
64
69
|
if (!expectedStatuses.includes(result.status)) {
|
|
65
|
-
|
|
70
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
71
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
72
|
+
throw error;
|
|
66
73
|
}
|
|
67
|
-
return (0, models_js_1.
|
|
74
|
+
return (0, models_js_1.settingDeserializer)(result.body);
|
|
68
75
|
}
|
|
69
|
-
/**
|
|
70
|
-
function
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
74
|
-
getInitialResponse: () => _fullBackupSend(context, options),
|
|
75
|
-
resourceLocationConfig: "azure-async-operation",
|
|
76
|
-
});
|
|
76
|
+
/** Retrieves the setting object of a specified setting name. */
|
|
77
|
+
async function getSetting(context, settingName, options = { requestOptions: {} }) {
|
|
78
|
+
const result = await _getSettingSend(context, settingName, options);
|
|
79
|
+
return _getSettingDeserialize(result);
|
|
77
80
|
}
|
|
78
|
-
function
|
|
81
|
+
function _updateSettingSend(context, settingName, parameters, options = { requestOptions: {} }) {
|
|
82
|
+
var _a;
|
|
79
83
|
return context
|
|
80
|
-
.path("/
|
|
81
|
-
.
|
|
82
|
-
? options["preBackupOperationParameters"]
|
|
83
|
-
: (0, models_js_1.preBackupOperationParametersSerializer)(options["preBackupOperationParameters"]) }));
|
|
84
|
+
.path("/settings/{setting-name}", settingName)
|
|
85
|
+
.patch(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion }, body: (0, models_js_1.updateSettingRequestSerializer)(parameters) }));
|
|
84
86
|
}
|
|
85
|
-
async function
|
|
87
|
+
async function _updateSettingDeserialize(result) {
|
|
88
|
+
const expectedStatuses = ["200"];
|
|
89
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
90
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
91
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
92
|
+
throw error;
|
|
93
|
+
}
|
|
94
|
+
return (0, models_js_1.settingDeserializer)(result.body);
|
|
95
|
+
}
|
|
96
|
+
/** Description of the pool setting to be updated */
|
|
97
|
+
async function updateSetting(context, settingName, parameters, options = { requestOptions: {} }) {
|
|
98
|
+
const result = await _updateSettingSend(context, settingName, parameters, options);
|
|
99
|
+
return _updateSettingDeserialize(result);
|
|
100
|
+
}
|
|
101
|
+
function _selectiveKeyRestoreOperationSend(context, keyName, restoreBlobDetails, options = { requestOptions: {} }) {
|
|
102
|
+
var _a;
|
|
103
|
+
return context
|
|
104
|
+
.path("/keys/{keyName}/restore", keyName)
|
|
105
|
+
.put(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion }, body: (0, models_js_1.selectiveKeyRestoreOperationParametersSerializer)(restoreBlobDetails) }));
|
|
106
|
+
}
|
|
107
|
+
async function _selectiveKeyRestoreOperationDeserialize(result) {
|
|
86
108
|
const expectedStatuses = ["202", "200"];
|
|
87
109
|
if (!expectedStatuses.includes(result.status)) {
|
|
88
|
-
|
|
110
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
111
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
112
|
+
throw error;
|
|
89
113
|
}
|
|
90
|
-
return (0, models_js_1.
|
|
114
|
+
return (0, models_js_1.selectiveKeyRestoreOperationDeserializer)(result.body);
|
|
91
115
|
}
|
|
92
|
-
/**
|
|
93
|
-
function
|
|
94
|
-
return (0, pollingHelpers_js_1.getLongRunningPoller)(context,
|
|
116
|
+
/** Restores all key versions of a given key using user supplied SAS token pointing to a previously stored Azure Blob storage backup folder */
|
|
117
|
+
function selectiveKeyRestoreOperation(context, keyName, restoreBlobDetails, options = { requestOptions: {} }) {
|
|
118
|
+
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _selectiveKeyRestoreOperationDeserialize, ["202", "200"], {
|
|
95
119
|
updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
96
120
|
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
97
|
-
getInitialResponse: () =>
|
|
121
|
+
getInitialResponse: () => _selectiveKeyRestoreOperationSend(context, keyName, restoreBlobDetails, options),
|
|
98
122
|
resourceLocationConfig: "azure-async-operation",
|
|
99
123
|
});
|
|
100
124
|
}
|
|
101
|
-
function
|
|
125
|
+
function _selectiveKeyRestoreStatusSend(context, jobId, options = { requestOptions: {} }) {
|
|
126
|
+
var _a;
|
|
102
127
|
return context
|
|
103
128
|
.path("/restore/{jobId}/pending", jobId)
|
|
104
|
-
.get(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)));
|
|
129
|
+
.get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
105
130
|
}
|
|
106
|
-
async function
|
|
131
|
+
async function _selectiveKeyRestoreStatusDeserialize(result) {
|
|
107
132
|
const expectedStatuses = ["200"];
|
|
108
133
|
if (!expectedStatuses.includes(result.status)) {
|
|
109
|
-
|
|
134
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
135
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
136
|
+
throw error;
|
|
110
137
|
}
|
|
111
|
-
return (0, models_js_1.
|
|
138
|
+
return (0, models_js_1.selectiveKeyRestoreOperationDeserializer)(result.body);
|
|
112
139
|
}
|
|
113
|
-
/** Returns the status of restore operation */
|
|
114
|
-
async function
|
|
115
|
-
const result = await
|
|
116
|
-
return
|
|
140
|
+
/** Returns the status of the selective key restore operation */
|
|
141
|
+
async function selectiveKeyRestoreStatus(context, jobId, options = { requestOptions: {} }) {
|
|
142
|
+
const result = await _selectiveKeyRestoreStatusSend(context, jobId, options);
|
|
143
|
+
return _selectiveKeyRestoreStatusDeserialize(result);
|
|
117
144
|
}
|
|
118
|
-
function
|
|
145
|
+
function _fullRestoreOperationSend(context, restoreBlobDetails, options = { requestOptions: {} }) {
|
|
146
|
+
var _a;
|
|
119
147
|
return context
|
|
120
|
-
.path("/
|
|
121
|
-
.put(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), {
|
|
122
|
-
? options["preRestoreOperationParameters"]
|
|
123
|
-
: (0, models_js_1.preRestoreOperationParametersSerializer)(options["preRestoreOperationParameters"]) }));
|
|
148
|
+
.path("/restore")
|
|
149
|
+
.put(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion }, body: (0, models_js_1.restoreOperationParametersSerializer)(restoreBlobDetails) }));
|
|
124
150
|
}
|
|
125
|
-
async function
|
|
151
|
+
async function _fullRestoreOperationDeserialize(result) {
|
|
126
152
|
const expectedStatuses = ["202", "200"];
|
|
127
153
|
if (!expectedStatuses.includes(result.status)) {
|
|
128
|
-
|
|
154
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
155
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
156
|
+
throw error;
|
|
129
157
|
}
|
|
130
158
|
return (0, models_js_1.restoreOperationDeserializer)(result.body);
|
|
131
159
|
}
|
|
132
|
-
/**
|
|
133
|
-
function
|
|
134
|
-
return (0, pollingHelpers_js_1.getLongRunningPoller)(context,
|
|
160
|
+
/** Restores all key materials using the SAS token pointing to a previously stored Azure Blob storage backup folder */
|
|
161
|
+
function fullRestoreOperation(context, restoreBlobDetails, options = { requestOptions: {} }) {
|
|
162
|
+
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _fullRestoreOperationDeserialize, ["202", "200"], {
|
|
135
163
|
updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
136
164
|
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
137
|
-
getInitialResponse: () =>
|
|
165
|
+
getInitialResponse: () => _fullRestoreOperationSend(context, restoreBlobDetails, options),
|
|
138
166
|
resourceLocationConfig: "azure-async-operation",
|
|
139
167
|
});
|
|
140
168
|
}
|
|
141
|
-
function
|
|
169
|
+
function _preFullRestoreOperationSend(context, preRestoreOperationParameters, options = { requestOptions: {} }) {
|
|
170
|
+
var _a;
|
|
142
171
|
return context
|
|
143
|
-
.path("/
|
|
144
|
-
.put(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), {
|
|
145
|
-
? options["restoreBlobDetails"]
|
|
146
|
-
: (0, models_js_1.restoreOperationParametersSerializer)(options["restoreBlobDetails"]) }));
|
|
172
|
+
.path("/prerestore")
|
|
173
|
+
.put(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion }, body: (0, models_js_1.preRestoreOperationParametersSerializer)(preRestoreOperationParameters) }));
|
|
147
174
|
}
|
|
148
|
-
async function
|
|
175
|
+
async function _preFullRestoreOperationDeserialize(result) {
|
|
149
176
|
const expectedStatuses = ["202", "200"];
|
|
150
177
|
if (!expectedStatuses.includes(result.status)) {
|
|
151
|
-
|
|
178
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
179
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
180
|
+
throw error;
|
|
152
181
|
}
|
|
153
182
|
return (0, models_js_1.restoreOperationDeserializer)(result.body);
|
|
154
183
|
}
|
|
155
|
-
/**
|
|
156
|
-
function
|
|
157
|
-
return (0, pollingHelpers_js_1.getLongRunningPoller)(context,
|
|
184
|
+
/** Pre-restore operation for checking whether the customer can perform a full restore operation. */
|
|
185
|
+
function preFullRestoreOperation(context, preRestoreOperationParameters, options = { requestOptions: {} }) {
|
|
186
|
+
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _preFullRestoreOperationDeserialize, ["202", "200"], {
|
|
158
187
|
updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
159
188
|
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
160
|
-
getInitialResponse: () =>
|
|
189
|
+
getInitialResponse: () => _preFullRestoreOperationSend(context, preRestoreOperationParameters, options),
|
|
161
190
|
resourceLocationConfig: "azure-async-operation",
|
|
162
191
|
});
|
|
163
192
|
}
|
|
164
|
-
function
|
|
193
|
+
function _restoreStatusSend(context, jobId, options = { requestOptions: {} }) {
|
|
194
|
+
var _a;
|
|
165
195
|
return context
|
|
166
|
-
.path("/
|
|
167
|
-
.
|
|
168
|
-
? options["restoreBlobDetails"]
|
|
169
|
-
: (0, models_js_1.selectiveKeyRestoreOperationParametersSerializer)(options["restoreBlobDetails"]) }));
|
|
196
|
+
.path("/restore/{jobId}/pending", jobId)
|
|
197
|
+
.get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
170
198
|
}
|
|
171
|
-
async function
|
|
172
|
-
const expectedStatuses = ["
|
|
199
|
+
async function _restoreStatusDeserialize(result) {
|
|
200
|
+
const expectedStatuses = ["200"];
|
|
173
201
|
if (!expectedStatuses.includes(result.status)) {
|
|
174
|
-
|
|
202
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
203
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
204
|
+
throw error;
|
|
175
205
|
}
|
|
176
206
|
return (0, models_js_1.restoreOperationDeserializer)(result.body);
|
|
177
207
|
}
|
|
178
|
-
/**
|
|
179
|
-
function
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
183
|
-
getInitialResponse: () => _selectiveKeyRestoreOperationSend(context, keyName, options),
|
|
184
|
-
resourceLocationConfig: "azure-async-operation",
|
|
185
|
-
});
|
|
208
|
+
/** Returns the status of restore operation */
|
|
209
|
+
async function restoreStatus(context, jobId, options = { requestOptions: {} }) {
|
|
210
|
+
const result = await _restoreStatusSend(context, jobId, options);
|
|
211
|
+
return _restoreStatusDeserialize(result);
|
|
186
212
|
}
|
|
187
|
-
function
|
|
213
|
+
function _preFullBackupSend(context, preBackupOperationParameters, options = { requestOptions: {} }) {
|
|
214
|
+
var _a;
|
|
188
215
|
return context
|
|
189
|
-
.path("/
|
|
190
|
-
.
|
|
216
|
+
.path("/prebackup")
|
|
217
|
+
.post(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion }, body: (0, models_js_1.preBackupOperationParametersSerializer)(preBackupOperationParameters) }));
|
|
191
218
|
}
|
|
192
|
-
async function
|
|
193
|
-
const expectedStatuses = ["200"];
|
|
219
|
+
async function _preFullBackupDeserialize(result) {
|
|
220
|
+
const expectedStatuses = ["202", "200"];
|
|
194
221
|
if (!expectedStatuses.includes(result.status)) {
|
|
195
|
-
|
|
222
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
223
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
224
|
+
throw error;
|
|
196
225
|
}
|
|
197
|
-
return (0, models_js_1.
|
|
226
|
+
return (0, models_js_1.fullBackupOperationDeserializer)(result.body);
|
|
198
227
|
}
|
|
199
|
-
/**
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
228
|
+
/** Pre-backup operation for checking whether the customer can perform a full backup operation. */
|
|
229
|
+
function preFullBackup(context, preBackupOperationParameters, options = { requestOptions: {} }) {
|
|
230
|
+
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _preFullBackupDeserialize, ["202", "200"], {
|
|
231
|
+
updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
232
|
+
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
233
|
+
getInitialResponse: () => _preFullBackupSend(context, preBackupOperationParameters, options),
|
|
234
|
+
resourceLocationConfig: "azure-async-operation",
|
|
235
|
+
});
|
|
203
236
|
}
|
|
204
|
-
function
|
|
237
|
+
function _fullBackupSend(context, azureStorageBlobContainerUri, options = { requestOptions: {} }) {
|
|
238
|
+
var _a;
|
|
205
239
|
return context
|
|
206
|
-
.path("/
|
|
207
|
-
.
|
|
240
|
+
.path("/backup")
|
|
241
|
+
.post(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion }, body: (0, models_js_1.sASTokenParameterSerializer)(azureStorageBlobContainerUri) }));
|
|
208
242
|
}
|
|
209
|
-
async function
|
|
210
|
-
const expectedStatuses = ["200"];
|
|
243
|
+
async function _fullBackupDeserialize(result) {
|
|
244
|
+
const expectedStatuses = ["202", "200"];
|
|
211
245
|
if (!expectedStatuses.includes(result.status)) {
|
|
212
|
-
|
|
246
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
247
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
248
|
+
throw error;
|
|
213
249
|
}
|
|
214
|
-
return (0, models_js_1.
|
|
250
|
+
return (0, models_js_1.fullBackupOperationDeserializer)(result.body);
|
|
215
251
|
}
|
|
216
|
-
/**
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
252
|
+
/** Creates a full backup using a user-provided SAS token to an Azure blob storage container. */
|
|
253
|
+
function fullBackup(context, azureStorageBlobContainerUri, options = { requestOptions: {} }) {
|
|
254
|
+
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _fullBackupDeserialize, ["202", "200"], {
|
|
255
|
+
updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
256
|
+
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
257
|
+
getInitialResponse: () => _fullBackupSend(context, azureStorageBlobContainerUri, options),
|
|
258
|
+
resourceLocationConfig: "azure-async-operation",
|
|
259
|
+
});
|
|
220
260
|
}
|
|
221
|
-
function
|
|
261
|
+
function _fullBackupStatusSend(context, jobId, options = { requestOptions: {} }) {
|
|
262
|
+
var _a;
|
|
222
263
|
return context
|
|
223
|
-
.path("/
|
|
224
|
-
.get(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)));
|
|
264
|
+
.path("/backup/{jobId}/pending", jobId)
|
|
265
|
+
.get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
225
266
|
}
|
|
226
|
-
async function
|
|
267
|
+
async function _fullBackupStatusDeserialize(result) {
|
|
227
268
|
const expectedStatuses = ["200"];
|
|
228
269
|
if (!expectedStatuses.includes(result.status)) {
|
|
229
|
-
|
|
270
|
+
const error = (0, core_client_1.createRestError)(result);
|
|
271
|
+
error.details = (0, models_js_1.keyVaultErrorDeserializer)(result.body);
|
|
272
|
+
throw error;
|
|
230
273
|
}
|
|
231
|
-
return (0, models_js_1.
|
|
274
|
+
return (0, models_js_1.fullBackupOperationDeserializer)(result.body);
|
|
232
275
|
}
|
|
233
|
-
/**
|
|
234
|
-
async function
|
|
235
|
-
const result = await
|
|
236
|
-
return
|
|
276
|
+
/** Returns the status of full backup operation */
|
|
277
|
+
async function fullBackupStatus(context, jobId, options = { requestOptions: {} }) {
|
|
278
|
+
const result = await _fullBackupStatusSend(context, jobId, options);
|
|
279
|
+
return _fullBackupStatusDeserialize(result);
|
|
237
280
|
}
|
|
238
281
|
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/generated/api/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAyClC,sDAQC;AAED,oEASC;AAGD,4CAOC;AAED,0CAYC;AAED,wDASC;AAGD,gCAUC;AAED,gDAcC;AAED,8DASC;AAGD,sCAeC;AAED,gDAQC;AAED,8DASC;AAGD,sCAOC;AAED,oEAcC;AAED,kFASC;AAGD,0DAeC;AAED,8DAYC;AAED,4EASC;AAGD,oDAeC;AAED,8EA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CAAC;AACzC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n KeyVaultContext as Client,\n FullBackupOptionalParams,\n FullBackupStatusOptionalParams,\n FullRestoreOperationOptionalParams,\n GetSettingOptionalParams,\n GetSettingsOptionalParams,\n PreFullBackupOptionalParams,\n PreFullRestoreOperationOptionalParams,\n RestoreStatusOptionalParams,\n SelectiveKeyRestoreOperationOptionalParams,\n UpdateSettingOptionalParams,\n} from \"./index.js\";\nimport {\n FullBackupOperation,\n fullBackupOperationDeserializer,\n sASTokenParameterSerializer,\n preBackupOperationParametersSerializer,\n RestoreOperation,\n restoreOperationDeserializer,\n preRestoreOperationParametersSerializer,\n restoreOperationParametersSerializer,\n selectiveKeyRestoreOperationParametersSerializer,\n UpdateSettingRequest,\n updateSettingRequestSerializer,\n Setting,\n settingDeserializer,\n SettingsListResult,\n settingsListResultDeserializer,\n} from \"../models/models.js\";\nimport { getLongRunningPoller } from \"../static-helpers/pollingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _fullBackupStatusSend(\n context: Client,\n jobId: string,\n options: FullBackupStatusOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/backup/{jobId}/pending\", jobId)\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _fullBackupStatusDeserialize(\n result: PathUncheckedResponse,\n): Promise<FullBackupOperation> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return fullBackupOperationDeserializer(result.body);\n}\n\n/** Returns the status of full backup operation */\nexport async function fullBackupStatus(\n context: Client,\n jobId: string,\n options: FullBackupStatusOptionalParams = { requestOptions: {} },\n): Promise<FullBackupOperation> {\n const result = await _fullBackupStatusSend(context, jobId, options);\n return _fullBackupStatusDeserialize(result);\n}\n\nexport function _fullBackupSend(\n context: Client,\n options: FullBackupOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/backup\")\n .post({\n ...operationOptionsToRequestParameters(options),\n body: !options[\"azureStorageBlobContainerUri\"]\n ? options[\"azureStorageBlobContainerUri\"]\n : sASTokenParameterSerializer(options[\"azureStorageBlobContainerUri\"]),\n });\n}\n\nexport async function _fullBackupDeserialize(\n result: PathUncheckedResponse,\n): Promise<FullBackupOperation> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return fullBackupOperationDeserializer(result.body);\n}\n\n/** Creates a full backup using a user-provided SAS token to an Azure blob storage container. */\nexport function fullBackup(\n context: Client,\n options: FullBackupOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<FullBackupOperation>, FullBackupOperation> {\n return getLongRunningPoller(context, _fullBackupDeserialize, [\"202\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _fullBackupSend(context, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<FullBackupOperation>, FullBackupOperation>;\n}\n\nexport function _preFullBackupSend(\n context: Client,\n options: PreFullBackupOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/prebackup\")\n .post({\n ...operationOptionsToRequestParameters(options),\n body: !options[\"preBackupOperationParameters\"]\n ? options[\"preBackupOperationParameters\"]\n : preBackupOperationParametersSerializer(\n options[\"preBackupOperationParameters\"],\n ),\n });\n}\n\nexport async function _preFullBackupDeserialize(\n result: PathUncheckedResponse,\n): Promise<FullBackupOperation> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return fullBackupOperationDeserializer(result.body);\n}\n\n/** Pre-backup operation for checking whether the customer can perform a full backup operation. */\nexport function preFullBackup(\n context: Client,\n options: PreFullBackupOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<FullBackupOperation>, FullBackupOperation> {\n return getLongRunningPoller(\n context,\n _preFullBackupDeserialize,\n [\"202\", \"200\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _preFullBackupSend(context, options),\n resourceLocationConfig: \"azure-async-operation\",\n },\n ) as PollerLike<OperationState<FullBackupOperation>, FullBackupOperation>;\n}\n\nexport function _restoreStatusSend(\n context: Client,\n jobId: string,\n options: RestoreStatusOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/restore/{jobId}/pending\", jobId)\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _restoreStatusDeserialize(\n result: PathUncheckedResponse,\n): Promise<RestoreOperation> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return restoreOperationDeserializer(result.body);\n}\n\n/** Returns the status of restore operation */\nexport async function restoreStatus(\n context: Client,\n jobId: string,\n options: RestoreStatusOptionalParams = { requestOptions: {} },\n): Promise<RestoreOperation> {\n const result = await _restoreStatusSend(context, jobId, options);\n return _restoreStatusDeserialize(result);\n}\n\nexport function _preFullRestoreOperationSend(\n context: Client,\n options: PreFullRestoreOperationOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/prerestore\")\n .put({\n ...operationOptionsToRequestParameters(options),\n body: !options[\"preRestoreOperationParameters\"]\n ? options[\"preRestoreOperationParameters\"]\n : preRestoreOperationParametersSerializer(\n options[\"preRestoreOperationParameters\"],\n ),\n });\n}\n\nexport async function _preFullRestoreOperationDeserialize(\n result: PathUncheckedResponse,\n): Promise<RestoreOperation> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return restoreOperationDeserializer(result.body);\n}\n\n/** Pre-restore operation for checking whether the customer can perform a full restore operation. */\nexport function preFullRestoreOperation(\n context: Client,\n options: PreFullRestoreOperationOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<RestoreOperation>, RestoreOperation> {\n return getLongRunningPoller(\n context,\n _preFullRestoreOperationDeserialize,\n [\"202\", \"200\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _preFullRestoreOperationSend(context, options),\n resourceLocationConfig: \"azure-async-operation\",\n },\n ) as PollerLike<OperationState<RestoreOperation>, RestoreOperation>;\n}\n\nexport function _fullRestoreOperationSend(\n context: Client,\n options: FullRestoreOperationOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/restore\")\n .put({\n ...operationOptionsToRequestParameters(options),\n body: !options[\"restoreBlobDetails\"]\n ? options[\"restoreBlobDetails\"]\n : restoreOperationParametersSerializer(options[\"restoreBlobDetails\"]),\n });\n}\n\nexport async function _fullRestoreOperationDeserialize(\n result: PathUncheckedResponse,\n): Promise<RestoreOperation> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return restoreOperationDeserializer(result.body);\n}\n\n/** Restores all key materials using the SAS token pointing to a previously stored Azure Blob storage backup folder */\nexport function fullRestoreOperation(\n context: Client,\n options: FullRestoreOperationOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<RestoreOperation>, RestoreOperation> {\n return getLongRunningPoller(\n context,\n _fullRestoreOperationDeserialize,\n [\"202\", \"200\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _fullRestoreOperationSend(context, options),\n resourceLocationConfig: \"azure-async-operation\",\n },\n ) as PollerLike<OperationState<RestoreOperation>, RestoreOperation>;\n}\n\nexport function _selectiveKeyRestoreOperationSend(\n context: Client,\n keyName: string,\n options: SelectiveKeyRestoreOperationOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/keys/{keyName}/restore\", keyName)\n .put({\n ...operationOptionsToRequestParameters(options),\n body: !options[\"restoreBlobDetails\"]\n ? options[\"restoreBlobDetails\"]\n : selectiveKeyRestoreOperationParametersSerializer(\n options[\"restoreBlobDetails\"],\n ),\n });\n}\n\nexport async function _selectiveKeyRestoreOperationDeserialize(\n result: PathUncheckedResponse,\n): Promise<RestoreOperation> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return restoreOperationDeserializer(result.body);\n}\n\n/** Restores all key versions of a given key using user supplied SAS token pointing to a previously stored Azure Blob storage backup folder */\nexport function selectiveKeyRestoreOperation(\n context: Client,\n keyName: string,\n options: SelectiveKeyRestoreOperationOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<RestoreOperation>, RestoreOperation> {\n return getLongRunningPoller(\n context,\n _selectiveKeyRestoreOperationDeserialize,\n [\"202\", \"200\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _selectiveKeyRestoreOperationSend(context, keyName, options),\n resourceLocationConfig: \"azure-async-operation\",\n },\n ) as PollerLike<OperationState<RestoreOperation>, RestoreOperation>;\n}\n\nexport function _updateSettingSend(\n context: Client,\n settingName: string,\n parameters: UpdateSettingRequest,\n options: UpdateSettingOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/settings/{setting-name}\", settingName)\n .patch({\n ...operationOptionsToRequestParameters(options),\n body: updateSettingRequestSerializer(parameters),\n });\n}\n\nexport async function _updateSettingDeserialize(\n result: PathUncheckedResponse,\n): Promise<Setting> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return settingDeserializer(result.body);\n}\n\n/** Description of the pool setting to be updated */\nexport async function updateSetting(\n context: Client,\n settingName: string,\n parameters: UpdateSettingRequest,\n options: UpdateSettingOptionalParams = { requestOptions: {} },\n): Promise<Setting> {\n const result = await _updateSettingSend(\n context,\n settingName,\n parameters,\n options,\n );\n return _updateSettingDeserialize(result);\n}\n\nexport function _getSettingSend(\n context: Client,\n settingName: string,\n options: GetSettingOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/settings/{setting-name}\", settingName)\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _getSettingDeserialize(\n result: PathUncheckedResponse,\n): Promise<Setting> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return settingDeserializer(result.body);\n}\n\n/** Retrieves the setting object of a specified setting name. */\nexport async function getSetting(\n context: Client,\n settingName: string,\n options: GetSettingOptionalParams = { requestOptions: {} },\n): Promise<Setting> {\n const result = await _getSettingSend(context, settingName, options);\n return _getSettingDeserialize(result);\n}\n\nexport function _getSettingsSend(\n context: Client,\n options: GetSettingsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/settings\")\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _getSettingsDeserialize(\n result: PathUncheckedResponse,\n): Promise<SettingsListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return settingsListResultDeserializer(result.body);\n}\n\n/** Retrieves a list of all the available account settings that can be configured. */\nexport async function getSettings(\n context: Client,\n options: GetSettingsOptionalParams = { requestOptions: {} },\n): Promise<SettingsListResult> {\n const result = await _getSettingsSend(context, options);\n return _getSettingsDeserialize(result);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/generated/api/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkDlC,4CAcC;AAED,0DAWC;AAGD,kCAMC;AAED,0CAeC;AAED,wDAWC;AAGD,gCAOC;AAED,gDAkBC;AAED,8DAWC;AAGD,sCAaC;AAED,8EAoBC;AAED,4FAWC;AAGD,oEA6BC;AAED,wEAeC;AAED,sFAWC;AAGD,8DAOC;AAED,8DAiBC;AAED,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E,uBAAuB;KAChD,CAAyE,CAAC;AAC7E,CAAC;AAED,SAAgB,qBAAqB,CACnC,OAAe,EACf,KAAa,EACb,UAA0C,EAAE,cAAc,EAAE,EAAE,EAAE;;IAEhE,OAAO,OAAO;SACX,IAAI,CAAC,yBAAyB,EAAE,KAAK,CAAC;SACtC,GAAG,iCACC,IAAA,iDAAmC,EAAC,OAAO,CAAC,KAC/C,OAAO,kBACL,MAAM,EAAE,kBAAkB,IACvB,MAAA,OAAO,CAAC,cAAc,0CAAE,OAAO,GAEpC,eAAe,EAAE,EAAE,aAAa,EAAE,OAAO,CAAC,UAAU,EAAE,IACtD,CAAC;AACP,CAAC;AAEM,KAAK,UAAU,4BAA4B,CAChD,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,IAAA,qCAAyB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAA,2CAA+B,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC;AAED,kDAAkD;AAC3C,KAAK,UAAU,gBAAgB,CACpC,OAAe,EACf,KAAa,EACb,UAA0C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEhE,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACpE,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n KeyVaultContext as Client,\n FullBackupOptionalParams,\n FullBackupStatusOptionalParams,\n FullRestoreOperationOptionalParams,\n GetSettingOptionalParams,\n GetSettingsOptionalParams,\n PreFullBackupOptionalParams,\n PreFullRestoreOperationOptionalParams,\n RestoreStatusOptionalParams,\n SelectiveKeyRestoreOperationOptionalParams,\n SelectiveKeyRestoreStatusOptionalParams,\n UpdateSettingOptionalParams,\n} from \"./index.js\";\nimport {\n FullBackupOperation,\n fullBackupOperationDeserializer,\n keyVaultErrorDeserializer,\n SASTokenParameter,\n sASTokenParameterSerializer,\n PreBackupOperationParameters,\n preBackupOperationParametersSerializer,\n RestoreOperation,\n restoreOperationDeserializer,\n PreRestoreOperationParameters,\n preRestoreOperationParametersSerializer,\n RestoreOperationParameters,\n restoreOperationParametersSerializer,\n SelectiveKeyRestoreOperation,\n selectiveKeyRestoreOperationDeserializer,\n SelectiveKeyRestoreOperationParameters,\n selectiveKeyRestoreOperationParametersSerializer,\n UpdateSettingRequest,\n updateSettingRequestSerializer,\n Setting,\n settingDeserializer,\n SettingsListResult,\n settingsListResultDeserializer,\n} from \"../models/models.js\";\nimport { getLongRunningPoller } from \"../static-helpers/pollingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _getSettingsSend(\n context: Client,\n options: GetSettingsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/settings\")\n .get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n });\n}\n\nexport async function _getSettingsDeserialize(\n result: PathUncheckedResponse,\n): Promise<SettingsListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return settingsListResultDeserializer(result.body);\n}\n\n/** Retrieves a list of all the available account settings that can be configured. */\nexport async function getSettings(\n context: Client,\n options: GetSettingsOptionalParams = { requestOptions: {} },\n): Promise<SettingsListResult> {\n const result = await _getSettingsSend(context, options);\n return _getSettingsDeserialize(result);\n}\n\nexport function _getSettingSend(\n context: Client,\n settingName: string,\n options: GetSettingOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/settings/{setting-name}\", settingName)\n .get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n });\n}\n\nexport async function _getSettingDeserialize(\n result: PathUncheckedResponse,\n): Promise<Setting> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return settingDeserializer(result.body);\n}\n\n/** Retrieves the setting object of a specified setting name. */\nexport async function getSetting(\n context: Client,\n settingName: string,\n options: GetSettingOptionalParams = { requestOptions: {} },\n): Promise<Setting> {\n const result = await _getSettingSend(context, settingName, options);\n return _getSettingDeserialize(result);\n}\n\nexport function _updateSettingSend(\n context: Client,\n settingName: string,\n parameters: UpdateSettingRequest,\n options: UpdateSettingOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/settings/{setting-name}\", settingName)\n .patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n body: updateSettingRequestSerializer(parameters),\n });\n}\n\nexport async function _updateSettingDeserialize(\n result: PathUncheckedResponse,\n): Promise<Setting> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return settingDeserializer(result.body);\n}\n\n/** Description of the pool setting to be updated */\nexport async function updateSetting(\n context: Client,\n settingName: string,\n parameters: UpdateSettingRequest,\n options: UpdateSettingOptionalParams = { requestOptions: {} },\n): Promise<Setting> {\n const result = await _updateSettingSend(\n context,\n settingName,\n parameters,\n options,\n );\n return _updateSettingDeserialize(result);\n}\n\nexport function _selectiveKeyRestoreOperationSend(\n context: Client,\n keyName: string,\n restoreBlobDetails: SelectiveKeyRestoreOperationParameters,\n options: SelectiveKeyRestoreOperationOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/keys/{keyName}/restore\", keyName)\n .put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n body: selectiveKeyRestoreOperationParametersSerializer(\n restoreBlobDetails,\n ),\n });\n}\n\nexport async function _selectiveKeyRestoreOperationDeserialize(\n result: PathUncheckedResponse,\n): Promise<SelectiveKeyRestoreOperation> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return selectiveKeyRestoreOperationDeserializer(result.body);\n}\n\n/** Restores all key versions of a given key using user supplied SAS token pointing to a previously stored Azure Blob storage backup folder */\nexport function selectiveKeyRestoreOperation(\n context: Client,\n keyName: string,\n restoreBlobDetails: SelectiveKeyRestoreOperationParameters,\n options: SelectiveKeyRestoreOperationOptionalParams = { requestOptions: {} },\n): PollerLike<\n OperationState<SelectiveKeyRestoreOperation>,\n SelectiveKeyRestoreOperation\n> {\n return getLongRunningPoller(\n context,\n _selectiveKeyRestoreOperationDeserialize,\n [\"202\", \"200\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _selectiveKeyRestoreOperationSend(\n context,\n keyName,\n restoreBlobDetails,\n options,\n ),\n resourceLocationConfig: \"azure-async-operation\",\n },\n ) as PollerLike<\n OperationState<SelectiveKeyRestoreOperation>,\n SelectiveKeyRestoreOperation\n >;\n}\n\nexport function _selectiveKeyRestoreStatusSend(\n context: Client,\n jobId: string,\n options: SelectiveKeyRestoreStatusOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/restore/{jobId}/pending\", jobId)\n .get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n });\n}\n\nexport async function _selectiveKeyRestoreStatusDeserialize(\n result: PathUncheckedResponse,\n): Promise<SelectiveKeyRestoreOperation> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return selectiveKeyRestoreOperationDeserializer(result.body);\n}\n\n/** Returns the status of the selective key restore operation */\nexport async function selectiveKeyRestoreStatus(\n context: Client,\n jobId: string,\n options: SelectiveKeyRestoreStatusOptionalParams = { requestOptions: {} },\n): Promise<SelectiveKeyRestoreOperation> {\n const result = await _selectiveKeyRestoreStatusSend(context, jobId, options);\n return _selectiveKeyRestoreStatusDeserialize(result);\n}\n\nexport function _fullRestoreOperationSend(\n context: Client,\n restoreBlobDetails: RestoreOperationParameters,\n options: FullRestoreOperationOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/restore\")\n .put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n body: restoreOperationParametersSerializer(restoreBlobDetails),\n });\n}\n\nexport async function _fullRestoreOperationDeserialize(\n result: PathUncheckedResponse,\n): Promise<RestoreOperation> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return restoreOperationDeserializer(result.body);\n}\n\n/** Restores all key materials using the SAS token pointing to a previously stored Azure Blob storage backup folder */\nexport function fullRestoreOperation(\n context: Client,\n restoreBlobDetails: RestoreOperationParameters,\n options: FullRestoreOperationOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<RestoreOperation>, RestoreOperation> {\n return getLongRunningPoller(\n context,\n _fullRestoreOperationDeserialize,\n [\"202\", \"200\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _fullRestoreOperationSend(context, restoreBlobDetails, options),\n resourceLocationConfig: \"azure-async-operation\",\n },\n ) as PollerLike<OperationState<RestoreOperation>, RestoreOperation>;\n}\n\nexport function _preFullRestoreOperationSend(\n context: Client,\n preRestoreOperationParameters: PreRestoreOperationParameters,\n options: PreFullRestoreOperationOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/prerestore\")\n .put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n body: preRestoreOperationParametersSerializer(\n preRestoreOperationParameters,\n ),\n });\n}\n\nexport async function _preFullRestoreOperationDeserialize(\n result: PathUncheckedResponse,\n): Promise<RestoreOperation> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return restoreOperationDeserializer(result.body);\n}\n\n/** Pre-restore operation for checking whether the customer can perform a full restore operation. */\nexport function preFullRestoreOperation(\n context: Client,\n preRestoreOperationParameters: PreRestoreOperationParameters,\n options: PreFullRestoreOperationOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<RestoreOperation>, RestoreOperation> {\n return getLongRunningPoller(\n context,\n _preFullRestoreOperationDeserialize,\n [\"202\", \"200\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _preFullRestoreOperationSend(\n context,\n preRestoreOperationParameters,\n options,\n ),\n resourceLocationConfig: \"azure-async-operation\",\n },\n ) as PollerLike<OperationState<RestoreOperation>, RestoreOperation>;\n}\n\nexport function _restoreStatusSend(\n context: Client,\n jobId: string,\n options: RestoreStatusOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/restore/{jobId}/pending\", jobId)\n .get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n });\n}\n\nexport async function _restoreStatusDeserialize(\n result: PathUncheckedResponse,\n): Promise<RestoreOperation> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return restoreOperationDeserializer(result.body);\n}\n\n/** Returns the status of restore operation */\nexport async function restoreStatus(\n context: Client,\n jobId: string,\n options: RestoreStatusOptionalParams = { requestOptions: {} },\n): Promise<RestoreOperation> {\n const result = await _restoreStatusSend(context, jobId, options);\n return _restoreStatusDeserialize(result);\n}\n\nexport function _preFullBackupSend(\n context: Client,\n preBackupOperationParameters: PreBackupOperationParameters,\n options: PreFullBackupOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/prebackup\")\n .post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n body: preBackupOperationParametersSerializer(\n preBackupOperationParameters,\n ),\n });\n}\n\nexport async function _preFullBackupDeserialize(\n result: PathUncheckedResponse,\n): Promise<FullBackupOperation> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return fullBackupOperationDeserializer(result.body);\n}\n\n/** Pre-backup operation for checking whether the customer can perform a full backup operation. */\nexport function preFullBackup(\n context: Client,\n preBackupOperationParameters: PreBackupOperationParameters,\n options: PreFullBackupOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<FullBackupOperation>, FullBackupOperation> {\n return getLongRunningPoller(\n context,\n _preFullBackupDeserialize,\n [\"202\", \"200\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _preFullBackupSend(context, preBackupOperationParameters, options),\n resourceLocationConfig: \"azure-async-operation\",\n },\n ) as PollerLike<OperationState<FullBackupOperation>, FullBackupOperation>;\n}\n\nexport function _fullBackupSend(\n context: Client,\n azureStorageBlobContainerUri: SASTokenParameter,\n options: FullBackupOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/backup\")\n .post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n body: sASTokenParameterSerializer(azureStorageBlobContainerUri),\n });\n}\n\nexport async function _fullBackupDeserialize(\n result: PathUncheckedResponse,\n): Promise<FullBackupOperation> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return fullBackupOperationDeserializer(result.body);\n}\n\n/** Creates a full backup using a user-provided SAS token to an Azure blob storage container. */\nexport function fullBackup(\n context: Client,\n azureStorageBlobContainerUri: SASTokenParameter,\n options: FullBackupOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<FullBackupOperation>, FullBackupOperation> {\n return getLongRunningPoller(context, _fullBackupDeserialize, [\"202\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _fullBackupSend(context, azureStorageBlobContainerUri, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<FullBackupOperation>, FullBackupOperation>;\n}\n\nexport function _fullBackupStatusSend(\n context: Client,\n jobId: string,\n options: FullBackupStatusOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/backup/{jobId}/pending\", jobId)\n .get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n queryParameters: { \"api-version\": context.apiVersion },\n });\n}\n\nexport async function _fullBackupStatusDeserialize(\n result: PathUncheckedResponse,\n): Promise<FullBackupOperation> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return fullBackupOperationDeserializer(result.body);\n}\n\n/** Returns the status of full backup operation */\nexport async function fullBackupStatus(\n context: Client,\n jobId: string,\n options: FullBackupStatusOptionalParams = { requestOptions: {} },\n): Promise<FullBackupOperation> {\n const result = await _fullBackupStatusSend(context, jobId, options);\n return _fullBackupStatusDeserialize(result);\n}\n"]}
|