@azure/keyvault-certificates 4.9.1-alpha.20250225.1 → 4.10.0-alpha.20250226.2
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/browser/certificatesModels.d.ts +10 -2
- package/dist/browser/certificatesModels.d.ts.map +1 -1
- package/dist/browser/certificatesModels.js +1 -1
- package/dist/browser/certificatesModels.js.map +1 -1
- package/dist/browser/constants.d.ts.map +1 -1
- package/dist/browser/constants.js +1 -1
- package/dist/browser/constants.js.map +1 -1
- package/dist/browser/generated/api/index.d.ts +2 -2
- package/dist/browser/generated/api/index.d.ts.map +1 -1
- package/dist/browser/generated/api/index.js +1 -1
- package/dist/browser/generated/api/index.js.map +1 -1
- package/dist/browser/generated/api/keyVaultContext.d.ts +4 -1
- package/dist/browser/generated/api/keyVaultContext.d.ts.map +1 -1
- package/dist/browser/generated/api/keyVaultContext.js +4 -4
- package/dist/browser/generated/api/keyVaultContext.js.map +1 -1
- package/dist/browser/generated/api/operations.d.ts +104 -104
- package/dist/browser/generated/api/operations.d.ts.map +1 -1
- package/dist/browser/generated/api/operations.js +358 -269
- package/dist/browser/generated/api/operations.js.map +1 -1
- package/dist/browser/generated/api/options.d.ts +36 -36
- package/dist/browser/generated/api/options.d.ts.map +1 -1
- package/dist/browser/generated/api/options.js.map +1 -1
- package/dist/browser/generated/index.d.ts +2 -2
- package/dist/browser/generated/index.d.ts.map +1 -1
- package/dist/browser/generated/index.js.map +1 -1
- package/dist/browser/generated/keyVaultClient.d.ts +54 -54
- package/dist/browser/generated/keyVaultClient.d.ts.map +1 -1
- package/dist/browser/generated/keyVaultClient.js +81 -81
- package/dist/browser/generated/keyVaultClient.js.map +1 -1
- package/dist/browser/generated/models/index.d.ts +1 -1
- package/dist/browser/generated/models/index.d.ts.map +1 -1
- package/dist/browser/generated/models/index.js.map +1 -1
- package/dist/browser/generated/models/models.d.ts +35 -7
- package/dist/browser/generated/models/models.d.ts.map +1 -1
- package/dist/browser/generated/models/models.js +19 -5
- package/dist/browser/generated/models/models.js.map +1 -1
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/lro/create/operation.d.ts.map +1 -1
- package/dist/browser/lro/create/operation.js +1 -0
- package/dist/browser/lro/create/operation.js.map +1 -1
- package/dist/browser/transformations.d.ts +1 -1
- package/dist/browser/transformations.d.ts.map +1 -1
- package/dist/browser/transformations.js +3 -0
- package/dist/browser/transformations.js.map +1 -1
- package/dist/commonjs/certificatesModels.d.ts +10 -2
- package/dist/commonjs/certificatesModels.d.ts.map +1 -1
- package/dist/commonjs/certificatesModels.js +1 -1
- package/dist/commonjs/certificatesModels.js.map +1 -1
- package/dist/commonjs/constants.d.ts.map +1 -1
- package/dist/commonjs/constants.js +1 -1
- 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 +27 -27
- 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 +104 -104
- package/dist/commonjs/generated/api/operations.d.ts.map +1 -1
- package/dist/commonjs/generated/api/operations.js +435 -346
- package/dist/commonjs/generated/api/operations.js.map +1 -1
- package/dist/commonjs/generated/api/options.d.ts +36 -36
- 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/index.d.ts +2 -2
- package/dist/commonjs/generated/index.d.ts.map +1 -1
- package/dist/commonjs/generated/index.js.map +1 -1
- package/dist/commonjs/generated/keyVaultClient.d.ts +54 -54
- package/dist/commonjs/generated/keyVaultClient.d.ts.map +1 -1
- package/dist/commonjs/generated/keyVaultClient.js +80 -80
- 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.map +1 -1
- package/dist/commonjs/generated/models/models.d.ts +35 -7
- package/dist/commonjs/generated/models/models.d.ts.map +1 -1
- package/dist/commonjs/generated/models/models.js +21 -6
- package/dist/commonjs/generated/models/models.js.map +1 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +1 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lro/create/operation.d.ts.map +1 -1
- package/dist/commonjs/lro/create/operation.js +1 -0
- package/dist/commonjs/lro/create/operation.js.map +1 -1
- package/dist/commonjs/transformations.d.ts +1 -1
- package/dist/commonjs/transformations.d.ts.map +1 -1
- package/dist/commonjs/transformations.js +3 -0
- package/dist/commonjs/transformations.js.map +1 -1
- package/dist/esm/certificatesModels.d.ts +10 -2
- package/dist/esm/certificatesModels.d.ts.map +1 -1
- package/dist/esm/certificatesModels.js +1 -1
- package/dist/esm/certificatesModels.js.map +1 -1
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.js +1 -1
- 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 +104 -104
- package/dist/esm/generated/api/operations.d.ts.map +1 -1
- package/dist/esm/generated/api/operations.js +358 -269
- package/dist/esm/generated/api/operations.js.map +1 -1
- package/dist/esm/generated/api/options.d.ts +36 -36
- 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/index.d.ts +2 -2
- package/dist/esm/generated/index.d.ts.map +1 -1
- package/dist/esm/generated/index.js.map +1 -1
- package/dist/esm/generated/keyVaultClient.d.ts +54 -54
- package/dist/esm/generated/keyVaultClient.d.ts.map +1 -1
- package/dist/esm/generated/keyVaultClient.js +81 -81
- 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.map +1 -1
- package/dist/esm/generated/models/models.d.ts +35 -7
- package/dist/esm/generated/models/models.d.ts.map +1 -1
- package/dist/esm/generated/models/models.js +19 -5
- package/dist/esm/generated/models/models.js.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lro/create/operation.d.ts.map +1 -1
- package/dist/esm/lro/create/operation.js +1 -0
- package/dist/esm/lro/create/operation.js.map +1 -1
- package/dist/esm/transformations.d.ts +1 -1
- package/dist/esm/transformations.d.ts.map +1 -1
- package/dist/esm/transformations.js +3 -0
- package/dist/esm/transformations.js.map +1 -1
- package/dist/react-native/certificatesModels.d.ts +10 -2
- package/dist/react-native/certificatesModels.d.ts.map +1 -1
- package/dist/react-native/certificatesModels.js +1 -1
- package/dist/react-native/certificatesModels.js.map +1 -1
- package/dist/react-native/constants.d.ts.map +1 -1
- package/dist/react-native/constants.js +1 -1
- package/dist/react-native/constants.js.map +1 -1
- package/dist/react-native/generated/api/index.d.ts +2 -2
- package/dist/react-native/generated/api/index.d.ts.map +1 -1
- package/dist/react-native/generated/api/index.js +1 -1
- package/dist/react-native/generated/api/index.js.map +1 -1
- package/dist/react-native/generated/api/keyVaultContext.d.ts +4 -1
- package/dist/react-native/generated/api/keyVaultContext.d.ts.map +1 -1
- package/dist/react-native/generated/api/keyVaultContext.js +4 -4
- package/dist/react-native/generated/api/keyVaultContext.js.map +1 -1
- package/dist/react-native/generated/api/operations.d.ts +104 -104
- package/dist/react-native/generated/api/operations.d.ts.map +1 -1
- package/dist/react-native/generated/api/operations.js +358 -269
- package/dist/react-native/generated/api/operations.js.map +1 -1
- package/dist/react-native/generated/api/options.d.ts +36 -36
- package/dist/react-native/generated/api/options.d.ts.map +1 -1
- package/dist/react-native/generated/api/options.js.map +1 -1
- package/dist/react-native/generated/index.d.ts +2 -2
- package/dist/react-native/generated/index.d.ts.map +1 -1
- package/dist/react-native/generated/index.js.map +1 -1
- package/dist/react-native/generated/keyVaultClient.d.ts +54 -54
- package/dist/react-native/generated/keyVaultClient.d.ts.map +1 -1
- package/dist/react-native/generated/keyVaultClient.js +81 -81
- package/dist/react-native/generated/keyVaultClient.js.map +1 -1
- package/dist/react-native/generated/models/index.d.ts +1 -1
- package/dist/react-native/generated/models/index.d.ts.map +1 -1
- package/dist/react-native/generated/models/index.js.map +1 -1
- package/dist/react-native/generated/models/models.d.ts +35 -7
- package/dist/react-native/generated/models/models.d.ts.map +1 -1
- package/dist/react-native/generated/models/models.js +19 -5
- package/dist/react-native/generated/models/models.js.map +1 -1
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/lro/create/operation.d.ts.map +1 -1
- package/dist/react-native/lro/create/operation.js +1 -0
- package/dist/react-native/lro/create/operation.js.map +1 -1
- package/dist/react-native/transformations.d.ts +1 -1
- package/dist/react-native/transformations.d.ts.map +1 -1
- package/dist/react-native/transformations.js +3 -0
- package/dist/react-native/transformations.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/generated/helpers/serializerHelpers.d.ts +0 -3
- package/dist/browser/generated/helpers/serializerHelpers.d.ts.map +0 -1
- package/dist/browser/generated/helpers/serializerHelpers.js +0 -25
- package/dist/browser/generated/helpers/serializerHelpers.js.map +0 -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
- package/dist/react-native/generated/helpers/serializerHelpers.d.ts +0 -3
- package/dist/react-native/generated/helpers/serializerHelpers.d.ts.map +0 -1
- package/dist/react-native/generated/helpers/serializerHelpers.js +0 -25
- package/dist/react-native/generated/helpers/serializerHelpers.js.map +0 -1
|
@@ -1,238 +1,283 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { _certificateListResultDeserializer, deletedCertificateBundleDeserializer, certificatePolicySerializer, certificatePolicyDeserializer, contactsSerializer, contactsDeserializer, _certificateIssuerListResultDeserializer, certificateIssuerSetParametersSerializer, issuerBundleDeserializer, certificateIssuerUpdateParametersSerializer, certificateCreateParametersSerializer, certificateOperationDeserializer, certificateImportParametersSerializer, certificateBundleDeserializer, certificateUpdateParametersSerializer, certificateOperationUpdateParameterSerializer, certificateMergeParametersSerializer, backupCertificateResultDeserializer, certificateRestoreParametersSerializer, _deletedCertificateListResultDeserializer, } from "../models/models.js";
|
|
3
|
+
import { _certificateListResultDeserializer, keyVaultErrorDeserializer, deletedCertificateBundleDeserializer, certificatePolicySerializer, certificatePolicyDeserializer, contactsSerializer, contactsDeserializer, _certificateIssuerListResultDeserializer, certificateIssuerSetParametersSerializer, issuerBundleDeserializer, certificateIssuerUpdateParametersSerializer, certificateCreateParametersSerializer, certificateOperationDeserializer, certificateImportParametersSerializer, certificateBundleDeserializer, certificateUpdateParametersSerializer, certificateOperationUpdateParameterSerializer, certificateMergeParametersSerializer, backupCertificateResultDeserializer, certificateRestoreParametersSerializer, _deletedCertificateListResultDeserializer, } from "../models/models.js";
|
|
4
4
|
import { buildPagedAsyncIterator, } from "../static-helpers/pagingHelpers.js";
|
|
5
5
|
import { createRestError, operationOptionsToRequestParameters, } from "@azure-rest/core-client";
|
|
6
|
-
export function
|
|
6
|
+
export function _recoverDeletedCertificateSend(context, certificateName, options = { requestOptions: {} }) {
|
|
7
|
+
var _a;
|
|
7
8
|
return context
|
|
8
|
-
.path("/
|
|
9
|
-
.
|
|
10
|
-
maxresults: options === null || options === void 0 ? void 0 : options.maxresults,
|
|
11
|
-
includePending: options === null || options === void 0 ? void 0 : options.includePending,
|
|
12
|
-
} }));
|
|
9
|
+
.path("/deletedcertificates/{certificate-name}/recover", certificateName)
|
|
10
|
+
.post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
13
11
|
}
|
|
14
|
-
export async function
|
|
12
|
+
export async function _recoverDeletedCertificateDeserialize(result) {
|
|
15
13
|
const expectedStatuses = ["200"];
|
|
16
14
|
if (!expectedStatuses.includes(result.status)) {
|
|
17
|
-
|
|
15
|
+
const error = createRestError(result);
|
|
16
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
17
|
+
throw error;
|
|
18
18
|
}
|
|
19
|
-
return
|
|
19
|
+
return certificateBundleDeserializer(result.body);
|
|
20
20
|
}
|
|
21
|
-
/** The
|
|
22
|
-
export function
|
|
23
|
-
|
|
21
|
+
/** The RecoverDeletedCertificate operation performs the reversal of the Delete operation. The operation is applicable in vaults enabled for soft-delete, and must be issued during the retention interval (available in the deleted certificate's attributes). This operation requires the certificates/recover permission. */
|
|
22
|
+
export async function recoverDeletedCertificate(context, certificateName, options = { requestOptions: {} }) {
|
|
23
|
+
const result = await _recoverDeletedCertificateSend(context, certificateName, options);
|
|
24
|
+
return _recoverDeletedCertificateDeserialize(result);
|
|
24
25
|
}
|
|
25
|
-
export function
|
|
26
|
+
export function _purgeDeletedCertificateSend(context, certificateName, options = { requestOptions: {} }) {
|
|
27
|
+
var _a;
|
|
26
28
|
return context
|
|
27
|
-
.path("/
|
|
28
|
-
.delete(Object.assign({}, operationOptionsToRequestParameters(options)));
|
|
29
|
+
.path("/deletedcertificates/{certificate-name}", certificateName)
|
|
30
|
+
.delete(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
29
31
|
}
|
|
30
|
-
export async function
|
|
31
|
-
const expectedStatuses = ["
|
|
32
|
+
export async function _purgeDeletedCertificateDeserialize(result) {
|
|
33
|
+
const expectedStatuses = ["204"];
|
|
32
34
|
if (!expectedStatuses.includes(result.status)) {
|
|
33
|
-
|
|
35
|
+
const error = createRestError(result);
|
|
36
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
37
|
+
throw error;
|
|
34
38
|
}
|
|
35
|
-
return
|
|
39
|
+
return;
|
|
36
40
|
}
|
|
37
|
-
/**
|
|
38
|
-
export async function
|
|
39
|
-
const result = await
|
|
40
|
-
return
|
|
41
|
+
/** The PurgeDeletedCertificate operation performs an irreversible deletion of the specified certificate, without possibility for recovery. The operation is not available if the recovery level does not specify 'Purgeable'. This operation requires the certificate/purge permission. */
|
|
42
|
+
export async function purgeDeletedCertificate(context, certificateName, options = { requestOptions: {} }) {
|
|
43
|
+
const result = await _purgeDeletedCertificateSend(context, certificateName, options);
|
|
44
|
+
return _purgeDeletedCertificateDeserialize(result);
|
|
41
45
|
}
|
|
42
|
-
export function
|
|
46
|
+
export function _getDeletedCertificateSend(context, certificateName, options = { requestOptions: {} }) {
|
|
47
|
+
var _a;
|
|
43
48
|
return context
|
|
44
|
-
.path("/
|
|
45
|
-
.
|
|
49
|
+
.path("/deletedcertificates/{certificate-name}", certificateName)
|
|
50
|
+
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
46
51
|
}
|
|
47
|
-
export async function
|
|
52
|
+
export async function _getDeletedCertificateDeserialize(result) {
|
|
48
53
|
const expectedStatuses = ["200"];
|
|
49
54
|
if (!expectedStatuses.includes(result.status)) {
|
|
50
|
-
|
|
55
|
+
const error = createRestError(result);
|
|
56
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
57
|
+
throw error;
|
|
51
58
|
}
|
|
52
|
-
return
|
|
59
|
+
return deletedCertificateBundleDeserializer(result.body);
|
|
53
60
|
}
|
|
54
|
-
/**
|
|
55
|
-
export async function
|
|
56
|
-
const result = await
|
|
57
|
-
return
|
|
61
|
+
/** The GetDeletedCertificate operation retrieves the deleted certificate information plus its attributes, such as retention interval, scheduled permanent deletion and the current deletion recovery level. This operation requires the certificates/get permission. */
|
|
62
|
+
export async function getDeletedCertificate(context, certificateName, options = { requestOptions: {} }) {
|
|
63
|
+
const result = await _getDeletedCertificateSend(context, certificateName, options);
|
|
64
|
+
return _getDeletedCertificateDeserialize(result);
|
|
58
65
|
}
|
|
59
|
-
export function
|
|
66
|
+
export function _getDeletedCertificatesSend(context, options = { requestOptions: {} }) {
|
|
67
|
+
var _a;
|
|
60
68
|
return context
|
|
61
|
-
.path("/
|
|
62
|
-
.get(Object.assign({}, operationOptionsToRequestParameters(options)))
|
|
69
|
+
.path("/deletedcertificates")
|
|
70
|
+
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: {
|
|
71
|
+
"api-version": context.apiVersion,
|
|
72
|
+
maxresults: options === null || options === void 0 ? void 0 : options.maxresults,
|
|
73
|
+
includePending: options === null || options === void 0 ? void 0 : options.includePending,
|
|
74
|
+
} }));
|
|
63
75
|
}
|
|
64
|
-
export async function
|
|
76
|
+
export async function _getDeletedCertificatesDeserialize(result) {
|
|
65
77
|
const expectedStatuses = ["200"];
|
|
66
78
|
if (!expectedStatuses.includes(result.status)) {
|
|
67
|
-
|
|
79
|
+
const error = createRestError(result);
|
|
80
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
81
|
+
throw error;
|
|
68
82
|
}
|
|
69
|
-
return
|
|
83
|
+
return _deletedCertificateListResultDeserializer(result.body);
|
|
70
84
|
}
|
|
71
|
-
/** The
|
|
72
|
-
export
|
|
73
|
-
|
|
74
|
-
return _getCertificateContactsDeserialize(result);
|
|
85
|
+
/** The GetDeletedCertificates operation retrieves the certificates in the current vault which are in a deleted state and ready for recovery or purging. This operation includes deletion-specific information. This operation requires the certificates/get/list permission. This operation can only be enabled on soft-delete enabled vaults. */
|
|
86
|
+
export function getDeletedCertificates(context, options = { requestOptions: {} }) {
|
|
87
|
+
return buildPagedAsyncIterator(context, () => _getDeletedCertificatesSend(context, options), _getDeletedCertificatesDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
75
88
|
}
|
|
76
|
-
export function
|
|
89
|
+
export function _restoreCertificateSend(context, parameters, options = { requestOptions: {} }) {
|
|
90
|
+
var _a;
|
|
77
91
|
return context
|
|
78
|
-
.path("/certificates/
|
|
79
|
-
.
|
|
92
|
+
.path("/certificates/restore")
|
|
93
|
+
.post(Object.assign(Object.assign({}, 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: certificateRestoreParametersSerializer(parameters) }));
|
|
80
94
|
}
|
|
81
|
-
export async function
|
|
95
|
+
export async function _restoreCertificateDeserialize(result) {
|
|
82
96
|
const expectedStatuses = ["200"];
|
|
83
97
|
if (!expectedStatuses.includes(result.status)) {
|
|
84
|
-
|
|
98
|
+
const error = createRestError(result);
|
|
99
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
100
|
+
throw error;
|
|
85
101
|
}
|
|
86
|
-
return
|
|
102
|
+
return certificateBundleDeserializer(result.body);
|
|
87
103
|
}
|
|
88
|
-
/**
|
|
89
|
-
export async function
|
|
90
|
-
const result = await
|
|
91
|
-
return
|
|
104
|
+
/** Restores a backed up certificate, and all its versions, to a vault. This operation requires the certificates/restore permission. */
|
|
105
|
+
export async function restoreCertificate(context, parameters, options = { requestOptions: {} }) {
|
|
106
|
+
const result = await _restoreCertificateSend(context, parameters, options);
|
|
107
|
+
return _restoreCertificateDeserialize(result);
|
|
92
108
|
}
|
|
93
|
-
export function
|
|
109
|
+
export function _backupCertificateSend(context, certificateName, options = { requestOptions: {} }) {
|
|
110
|
+
var _a;
|
|
94
111
|
return context
|
|
95
|
-
.path("/certificates/
|
|
96
|
-
.
|
|
112
|
+
.path("/certificates/{certificate-name}/backup", certificateName)
|
|
113
|
+
.post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
97
114
|
}
|
|
98
|
-
export async function
|
|
115
|
+
export async function _backupCertificateDeserialize(result) {
|
|
99
116
|
const expectedStatuses = ["200"];
|
|
100
117
|
if (!expectedStatuses.includes(result.status)) {
|
|
101
|
-
|
|
118
|
+
const error = createRestError(result);
|
|
119
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
120
|
+
throw error;
|
|
102
121
|
}
|
|
103
|
-
return
|
|
122
|
+
return backupCertificateResultDeserializer(result.body);
|
|
104
123
|
}
|
|
105
|
-
/**
|
|
106
|
-
export function
|
|
107
|
-
|
|
124
|
+
/** Requests that a backup of the specified certificate be downloaded to the client. All versions of the certificate will be downloaded. This operation requires the certificates/backup permission. */
|
|
125
|
+
export async function backupCertificate(context, certificateName, options = { requestOptions: {} }) {
|
|
126
|
+
const result = await _backupCertificateSend(context, certificateName, options);
|
|
127
|
+
return _backupCertificateDeserialize(result);
|
|
108
128
|
}
|
|
109
|
-
export function
|
|
129
|
+
export function _mergeCertificateSend(context, certificateName, parameters, options = { requestOptions: {} }) {
|
|
130
|
+
var _a;
|
|
110
131
|
return context
|
|
111
|
-
.path("/certificates/
|
|
112
|
-
.
|
|
132
|
+
.path("/certificates/{certificate-name}/pending/merge", certificateName)
|
|
133
|
+
.post(Object.assign(Object.assign({}, 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: certificateMergeParametersSerializer(parameters) }));
|
|
113
134
|
}
|
|
114
|
-
export async function
|
|
115
|
-
const expectedStatuses = ["
|
|
135
|
+
export async function _mergeCertificateDeserialize(result) {
|
|
136
|
+
const expectedStatuses = ["201"];
|
|
116
137
|
if (!expectedStatuses.includes(result.status)) {
|
|
117
|
-
|
|
138
|
+
const error = createRestError(result);
|
|
139
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
140
|
+
throw error;
|
|
118
141
|
}
|
|
119
|
-
return
|
|
142
|
+
return certificateBundleDeserializer(result.body);
|
|
120
143
|
}
|
|
121
|
-
/** The
|
|
122
|
-
export async function
|
|
123
|
-
const result = await
|
|
124
|
-
return
|
|
144
|
+
/** The MergeCertificate operation performs the merging of a certificate or certificate chain with a key pair currently available in the service. This operation requires the certificates/create permission. */
|
|
145
|
+
export async function mergeCertificate(context, certificateName, parameters, options = { requestOptions: {} }) {
|
|
146
|
+
const result = await _mergeCertificateSend(context, certificateName, parameters, options);
|
|
147
|
+
return _mergeCertificateDeserialize(result);
|
|
125
148
|
}
|
|
126
|
-
export function
|
|
149
|
+
export function _deleteCertificateOperationSend(context, certificateName, options = { requestOptions: {} }) {
|
|
150
|
+
var _a;
|
|
127
151
|
return context
|
|
128
|
-
.path("/certificates/
|
|
129
|
-
.
|
|
152
|
+
.path("/certificates/{certificate-name}/pending", certificateName)
|
|
153
|
+
.delete(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
130
154
|
}
|
|
131
|
-
export async function
|
|
155
|
+
export async function _deleteCertificateOperationDeserialize(result) {
|
|
132
156
|
const expectedStatuses = ["200"];
|
|
133
157
|
if (!expectedStatuses.includes(result.status)) {
|
|
134
|
-
|
|
158
|
+
const error = createRestError(result);
|
|
159
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
160
|
+
throw error;
|
|
135
161
|
}
|
|
136
|
-
return
|
|
162
|
+
return certificateOperationDeserializer(result.body);
|
|
137
163
|
}
|
|
138
|
-
/**
|
|
139
|
-
export async function
|
|
140
|
-
const result = await
|
|
141
|
-
return
|
|
164
|
+
/** Deletes the creation operation for a specified certificate that is in the process of being created. The certificate is no longer created. This operation requires the certificates/update permission. */
|
|
165
|
+
export async function deleteCertificateOperation(context, certificateName, options = { requestOptions: {} }) {
|
|
166
|
+
const result = await _deleteCertificateOperationSend(context, certificateName, options);
|
|
167
|
+
return _deleteCertificateOperationDeserialize(result);
|
|
142
168
|
}
|
|
143
|
-
export function
|
|
169
|
+
export function _getCertificateOperationSend(context, certificateName, options = { requestOptions: {} }) {
|
|
170
|
+
var _a;
|
|
144
171
|
return context
|
|
145
|
-
.path("/certificates/
|
|
146
|
-
.get(Object.assign({}, operationOptionsToRequestParameters(options)));
|
|
172
|
+
.path("/certificates/{certificate-name}/pending", certificateName)
|
|
173
|
+
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
147
174
|
}
|
|
148
|
-
export async function
|
|
175
|
+
export async function _getCertificateOperationDeserialize(result) {
|
|
149
176
|
const expectedStatuses = ["200"];
|
|
150
177
|
if (!expectedStatuses.includes(result.status)) {
|
|
151
|
-
|
|
178
|
+
const error = createRestError(result);
|
|
179
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
180
|
+
throw error;
|
|
152
181
|
}
|
|
153
|
-
return
|
|
182
|
+
return certificateOperationDeserializer(result.body);
|
|
154
183
|
}
|
|
155
|
-
/**
|
|
156
|
-
export async function
|
|
157
|
-
const result = await
|
|
158
|
-
return
|
|
184
|
+
/** Gets the creation operation associated with a specified certificate. This operation requires the certificates/get permission. */
|
|
185
|
+
export async function getCertificateOperation(context, certificateName, options = { requestOptions: {} }) {
|
|
186
|
+
const result = await _getCertificateOperationSend(context, certificateName, options);
|
|
187
|
+
return _getCertificateOperationDeserialize(result);
|
|
159
188
|
}
|
|
160
|
-
export function
|
|
189
|
+
export function _updateCertificateOperationSend(context, certificateName, certificateOperation, options = { requestOptions: {} }) {
|
|
190
|
+
var _a;
|
|
161
191
|
return context
|
|
162
|
-
.path("/certificates/
|
|
163
|
-
.
|
|
192
|
+
.path("/certificates/{certificate-name}/pending", certificateName)
|
|
193
|
+
.patch(Object.assign(Object.assign({}, 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: certificateOperationUpdateParameterSerializer(certificateOperation) }));
|
|
164
194
|
}
|
|
165
|
-
export async function
|
|
195
|
+
export async function _updateCertificateOperationDeserialize(result) {
|
|
166
196
|
const expectedStatuses = ["200"];
|
|
167
197
|
if (!expectedStatuses.includes(result.status)) {
|
|
168
|
-
|
|
198
|
+
const error = createRestError(result);
|
|
199
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
200
|
+
throw error;
|
|
169
201
|
}
|
|
170
|
-
return
|
|
202
|
+
return certificateOperationDeserializer(result.body);
|
|
171
203
|
}
|
|
172
|
-
/**
|
|
173
|
-
export async function
|
|
174
|
-
const result = await
|
|
175
|
-
return
|
|
204
|
+
/** Updates a certificate creation operation that is already in progress. This operation requires the certificates/update permission. */
|
|
205
|
+
export async function updateCertificateOperation(context, certificateName, certificateOperation, options = { requestOptions: {} }) {
|
|
206
|
+
const result = await _updateCertificateOperationSend(context, certificateName, certificateOperation, options);
|
|
207
|
+
return _updateCertificateOperationDeserialize(result);
|
|
176
208
|
}
|
|
177
|
-
export function
|
|
209
|
+
export function _getCertificateSend(context, certificateName, certificateVersion, options = { requestOptions: {} }) {
|
|
210
|
+
var _a;
|
|
178
211
|
return context
|
|
179
|
-
.path("/certificates/{certificate-name}/
|
|
180
|
-
.
|
|
212
|
+
.path("/certificates/{certificate-name}/{certificate-version}", certificateName, certificateVersion)
|
|
213
|
+
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
181
214
|
}
|
|
182
|
-
export async function
|
|
183
|
-
const expectedStatuses = ["
|
|
215
|
+
export async function _getCertificateDeserialize(result) {
|
|
216
|
+
const expectedStatuses = ["200"];
|
|
184
217
|
if (!expectedStatuses.includes(result.status)) {
|
|
185
|
-
|
|
218
|
+
const error = createRestError(result);
|
|
219
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
220
|
+
throw error;
|
|
186
221
|
}
|
|
187
|
-
return
|
|
222
|
+
return certificateBundleDeserializer(result.body);
|
|
188
223
|
}
|
|
189
|
-
/**
|
|
190
|
-
export async function
|
|
191
|
-
const result = await
|
|
192
|
-
return
|
|
224
|
+
/** Gets information about a specific certificate. This operation requires the certificates/get permission. */
|
|
225
|
+
export async function getCertificate(context, certificateName, certificateVersion, options = { requestOptions: {} }) {
|
|
226
|
+
const result = await _getCertificateSend(context, certificateName, certificateVersion, options);
|
|
227
|
+
return _getCertificateDeserialize(result);
|
|
193
228
|
}
|
|
194
|
-
export function
|
|
229
|
+
export function _updateCertificateSend(context, certificateName, certificateVersion, parameters, options = { requestOptions: {} }) {
|
|
230
|
+
var _a;
|
|
195
231
|
return context
|
|
196
|
-
.path("/certificates/{certificate-name}/
|
|
197
|
-
.
|
|
232
|
+
.path("/certificates/{certificate-name}/{certificate-version}", certificateName, certificateVersion)
|
|
233
|
+
.patch(Object.assign(Object.assign({}, 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: certificateUpdateParametersSerializer(parameters) }));
|
|
198
234
|
}
|
|
199
|
-
export async function
|
|
235
|
+
export async function _updateCertificateDeserialize(result) {
|
|
200
236
|
const expectedStatuses = ["200"];
|
|
201
237
|
if (!expectedStatuses.includes(result.status)) {
|
|
202
|
-
|
|
238
|
+
const error = createRestError(result);
|
|
239
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
240
|
+
throw error;
|
|
203
241
|
}
|
|
204
242
|
return certificateBundleDeserializer(result.body);
|
|
205
243
|
}
|
|
206
|
-
/**
|
|
207
|
-
export async function
|
|
208
|
-
const result = await
|
|
209
|
-
return
|
|
244
|
+
/** The UpdateCertificate operation applies the specified update on the given certificate; the only elements updated are the certificate's attributes. This operation requires the certificates/update permission. */
|
|
245
|
+
export async function updateCertificate(context, certificateName, certificateVersion, parameters, options = { requestOptions: {} }) {
|
|
246
|
+
const result = await _updateCertificateSend(context, certificateName, certificateVersion, parameters, options);
|
|
247
|
+
return _updateCertificateDeserialize(result);
|
|
210
248
|
}
|
|
211
|
-
export function
|
|
249
|
+
export function _updateCertificatePolicySend(context, certificateName, certificatePolicy, options = { requestOptions: {} }) {
|
|
250
|
+
var _a;
|
|
212
251
|
return context
|
|
213
|
-
.path("/certificates/{certificate-name}/
|
|
214
|
-
.
|
|
252
|
+
.path("/certificates/{certificate-name}/policy", certificateName)
|
|
253
|
+
.patch(Object.assign(Object.assign({}, 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: certificatePolicySerializer(certificatePolicy) }));
|
|
215
254
|
}
|
|
216
|
-
export async function
|
|
255
|
+
export async function _updateCertificatePolicyDeserialize(result) {
|
|
217
256
|
const expectedStatuses = ["200"];
|
|
218
257
|
if (!expectedStatuses.includes(result.status)) {
|
|
219
|
-
|
|
258
|
+
const error = createRestError(result);
|
|
259
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
260
|
+
throw error;
|
|
220
261
|
}
|
|
221
|
-
return
|
|
262
|
+
return certificatePolicyDeserializer(result.body);
|
|
222
263
|
}
|
|
223
|
-
/**
|
|
224
|
-
export function
|
|
225
|
-
|
|
264
|
+
/** Set specified members in the certificate policy. Leave others as null. This operation requires the certificates/update permission. */
|
|
265
|
+
export async function updateCertificatePolicy(context, certificateName, certificatePolicy, options = { requestOptions: {} }) {
|
|
266
|
+
const result = await _updateCertificatePolicySend(context, certificateName, certificatePolicy, options);
|
|
267
|
+
return _updateCertificatePolicyDeserialize(result);
|
|
226
268
|
}
|
|
227
269
|
export function _getCertificatePolicySend(context, certificateName, options = { requestOptions: {} }) {
|
|
270
|
+
var _a;
|
|
228
271
|
return context
|
|
229
272
|
.path("/certificates/{certificate-name}/policy", certificateName)
|
|
230
|
-
.get(Object.assign({}, operationOptionsToRequestParameters(options)));
|
|
273
|
+
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
231
274
|
}
|
|
232
275
|
export async function _getCertificatePolicyDeserialize(result) {
|
|
233
276
|
const expectedStatuses = ["200"];
|
|
234
277
|
if (!expectedStatuses.includes(result.status)) {
|
|
235
|
-
|
|
278
|
+
const error = createRestError(result);
|
|
279
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
280
|
+
throw error;
|
|
236
281
|
}
|
|
237
282
|
return certificatePolicyDeserializer(result.body);
|
|
238
283
|
}
|
|
@@ -241,227 +286,271 @@ export async function getCertificatePolicy(context, certificateName, options = {
|
|
|
241
286
|
const result = await _getCertificatePolicySend(context, certificateName, options);
|
|
242
287
|
return _getCertificatePolicyDeserialize(result);
|
|
243
288
|
}
|
|
244
|
-
export function
|
|
289
|
+
export function _getCertificateVersionsSend(context, certificateName, options = { requestOptions: {} }) {
|
|
290
|
+
var _a;
|
|
245
291
|
return context
|
|
246
|
-
.path("/certificates/{certificate-name}/
|
|
247
|
-
.
|
|
292
|
+
.path("/certificates/{certificate-name}/versions", certificateName)
|
|
293
|
+
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: {
|
|
294
|
+
"api-version": context.apiVersion,
|
|
295
|
+
maxresults: options === null || options === void 0 ? void 0 : options.maxresults,
|
|
296
|
+
} }));
|
|
248
297
|
}
|
|
249
|
-
export async function
|
|
298
|
+
export async function _getCertificateVersionsDeserialize(result) {
|
|
250
299
|
const expectedStatuses = ["200"];
|
|
251
300
|
if (!expectedStatuses.includes(result.status)) {
|
|
252
|
-
|
|
301
|
+
const error = createRestError(result);
|
|
302
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
303
|
+
throw error;
|
|
253
304
|
}
|
|
254
|
-
return
|
|
305
|
+
return _certificateListResultDeserializer(result.body);
|
|
255
306
|
}
|
|
256
|
-
/**
|
|
257
|
-
export
|
|
258
|
-
|
|
259
|
-
return _updateCertificatePolicyDeserialize(result);
|
|
307
|
+
/** The GetCertificateVersions operation returns the versions of a certificate in the specified key vault. This operation requires the certificates/list permission. */
|
|
308
|
+
export function getCertificateVersions(context, certificateName, options = { requestOptions: {} }) {
|
|
309
|
+
return buildPagedAsyncIterator(context, () => _getCertificateVersionsSend(context, certificateName, options), _getCertificateVersionsDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
260
310
|
}
|
|
261
|
-
export function
|
|
311
|
+
export function _importCertificateSend(context, certificateName, parameters, options = { requestOptions: {} }) {
|
|
312
|
+
var _a;
|
|
262
313
|
return context
|
|
263
|
-
.path("/certificates/{certificate-name}/
|
|
264
|
-
.
|
|
314
|
+
.path("/certificates/{certificate-name}/import", certificateName)
|
|
315
|
+
.post(Object.assign(Object.assign({}, 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: certificateImportParametersSerializer(parameters) }));
|
|
265
316
|
}
|
|
266
|
-
export async function
|
|
317
|
+
export async function _importCertificateDeserialize(result) {
|
|
267
318
|
const expectedStatuses = ["200"];
|
|
268
319
|
if (!expectedStatuses.includes(result.status)) {
|
|
269
|
-
|
|
320
|
+
const error = createRestError(result);
|
|
321
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
322
|
+
throw error;
|
|
270
323
|
}
|
|
271
324
|
return certificateBundleDeserializer(result.body);
|
|
272
325
|
}
|
|
273
|
-
/**
|
|
274
|
-
export async function
|
|
275
|
-
const result = await
|
|
276
|
-
return
|
|
326
|
+
/** Imports an existing valid certificate, containing a private key, into Azure Key Vault. This operation requires the certificates/import permission. The certificate to be imported can be in either PFX or PEM format. If the certificate is in PEM format the PEM file must contain the key as well as x509 certificates. Key Vault will only accept a key in PKCS#8 format. */
|
|
327
|
+
export async function importCertificate(context, certificateName, parameters, options = { requestOptions: {} }) {
|
|
328
|
+
const result = await _importCertificateSend(context, certificateName, parameters, options);
|
|
329
|
+
return _importCertificateDeserialize(result);
|
|
277
330
|
}
|
|
278
|
-
export function
|
|
331
|
+
export function _createCertificateSend(context, certificateName, parameters, options = { requestOptions: {} }) {
|
|
332
|
+
var _a;
|
|
279
333
|
return context
|
|
280
|
-
.path("/certificates/{certificate-name}/
|
|
281
|
-
.
|
|
334
|
+
.path("/certificates/{certificate-name}/create", certificateName)
|
|
335
|
+
.post(Object.assign(Object.assign({}, 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: certificateCreateParametersSerializer(parameters) }));
|
|
282
336
|
}
|
|
283
|
-
export async function
|
|
284
|
-
const expectedStatuses = ["
|
|
337
|
+
export async function _createCertificateDeserialize(result) {
|
|
338
|
+
const expectedStatuses = ["202"];
|
|
285
339
|
if (!expectedStatuses.includes(result.status)) {
|
|
286
|
-
|
|
340
|
+
const error = createRestError(result);
|
|
341
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
342
|
+
throw error;
|
|
287
343
|
}
|
|
288
|
-
return
|
|
344
|
+
return certificateOperationDeserializer(result.body);
|
|
289
345
|
}
|
|
290
|
-
/**
|
|
291
|
-
export async function
|
|
292
|
-
const result = await
|
|
293
|
-
return
|
|
346
|
+
/** If this is the first version, the certificate resource is created. This operation requires the certificates/create permission. */
|
|
347
|
+
export async function createCertificate(context, certificateName, parameters, options = { requestOptions: {} }) {
|
|
348
|
+
const result = await _createCertificateSend(context, certificateName, parameters, options);
|
|
349
|
+
return _createCertificateDeserialize(result);
|
|
294
350
|
}
|
|
295
|
-
export function
|
|
351
|
+
export function _deleteCertificateIssuerSend(context, issuerName, options = { requestOptions: {} }) {
|
|
352
|
+
var _a;
|
|
296
353
|
return context
|
|
297
|
-
.path("/certificates/{
|
|
298
|
-
.
|
|
354
|
+
.path("/certificates/issuers/{issuer-name}", issuerName)
|
|
355
|
+
.delete(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
299
356
|
}
|
|
300
|
-
export async function
|
|
357
|
+
export async function _deleteCertificateIssuerDeserialize(result) {
|
|
301
358
|
const expectedStatuses = ["200"];
|
|
302
359
|
if (!expectedStatuses.includes(result.status)) {
|
|
303
|
-
|
|
360
|
+
const error = createRestError(result);
|
|
361
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
362
|
+
throw error;
|
|
304
363
|
}
|
|
305
|
-
return
|
|
364
|
+
return issuerBundleDeserializer(result.body);
|
|
306
365
|
}
|
|
307
|
-
/**
|
|
308
|
-
export async function
|
|
309
|
-
const result = await
|
|
310
|
-
return
|
|
366
|
+
/** The DeleteCertificateIssuer operation permanently removes the specified certificate issuer from the vault. This operation requires the certificates/manageissuers/deleteissuers permission. */
|
|
367
|
+
export async function deleteCertificateIssuer(context, issuerName, options = { requestOptions: {} }) {
|
|
368
|
+
const result = await _deleteCertificateIssuerSend(context, issuerName, options);
|
|
369
|
+
return _deleteCertificateIssuerDeserialize(result);
|
|
311
370
|
}
|
|
312
|
-
export function
|
|
371
|
+
export function _getCertificateIssuerSend(context, issuerName, options = { requestOptions: {} }) {
|
|
372
|
+
var _a;
|
|
313
373
|
return context
|
|
314
|
-
.path("/certificates/{
|
|
315
|
-
.get(Object.assign({}, operationOptionsToRequestParameters(options)));
|
|
374
|
+
.path("/certificates/issuers/{issuer-name}", issuerName)
|
|
375
|
+
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
316
376
|
}
|
|
317
|
-
export async function
|
|
377
|
+
export async function _getCertificateIssuerDeserialize(result) {
|
|
318
378
|
const expectedStatuses = ["200"];
|
|
319
379
|
if (!expectedStatuses.includes(result.status)) {
|
|
320
|
-
|
|
380
|
+
const error = createRestError(result);
|
|
381
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
382
|
+
throw error;
|
|
321
383
|
}
|
|
322
|
-
return
|
|
384
|
+
return issuerBundleDeserializer(result.body);
|
|
323
385
|
}
|
|
324
|
-
/**
|
|
325
|
-
export async function
|
|
326
|
-
const result = await
|
|
327
|
-
return
|
|
386
|
+
/** The GetCertificateIssuer operation returns the specified certificate issuer resources in the specified key vault. This operation requires the certificates/manageissuers/getissuers permission. */
|
|
387
|
+
export async function getCertificateIssuer(context, issuerName, options = { requestOptions: {} }) {
|
|
388
|
+
const result = await _getCertificateIssuerSend(context, issuerName, options);
|
|
389
|
+
return _getCertificateIssuerDeserialize(result);
|
|
328
390
|
}
|
|
329
|
-
export function
|
|
391
|
+
export function _updateCertificateIssuerSend(context, issuerName, parameter, options = { requestOptions: {} }) {
|
|
392
|
+
var _a;
|
|
330
393
|
return context
|
|
331
|
-
.path("/certificates/{
|
|
332
|
-
.
|
|
394
|
+
.path("/certificates/issuers/{issuer-name}", issuerName)
|
|
395
|
+
.patch(Object.assign(Object.assign({}, 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: certificateIssuerUpdateParametersSerializer(parameter) }));
|
|
333
396
|
}
|
|
334
|
-
export async function
|
|
397
|
+
export async function _updateCertificateIssuerDeserialize(result) {
|
|
335
398
|
const expectedStatuses = ["200"];
|
|
336
399
|
if (!expectedStatuses.includes(result.status)) {
|
|
337
|
-
|
|
400
|
+
const error = createRestError(result);
|
|
401
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
402
|
+
throw error;
|
|
338
403
|
}
|
|
339
|
-
return
|
|
404
|
+
return issuerBundleDeserializer(result.body);
|
|
340
405
|
}
|
|
341
|
-
/**
|
|
342
|
-
export async function
|
|
343
|
-
const result = await
|
|
344
|
-
return
|
|
406
|
+
/** The UpdateCertificateIssuer operation performs an update on the specified certificate issuer entity. This operation requires the certificates/setissuers permission. */
|
|
407
|
+
export async function updateCertificateIssuer(context, issuerName, parameter, options = { requestOptions: {} }) {
|
|
408
|
+
const result = await _updateCertificateIssuerSend(context, issuerName, parameter, options);
|
|
409
|
+
return _updateCertificateIssuerDeserialize(result);
|
|
345
410
|
}
|
|
346
|
-
export function
|
|
411
|
+
export function _setCertificateIssuerSend(context, issuerName, parameter, options = { requestOptions: {} }) {
|
|
412
|
+
var _a;
|
|
347
413
|
return context
|
|
348
|
-
.path("/certificates/{
|
|
349
|
-
.
|
|
414
|
+
.path("/certificates/issuers/{issuer-name}", issuerName)
|
|
415
|
+
.put(Object.assign(Object.assign({}, 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: certificateIssuerSetParametersSerializer(parameter) }));
|
|
350
416
|
}
|
|
351
|
-
export async function
|
|
352
|
-
const expectedStatuses = ["
|
|
417
|
+
export async function _setCertificateIssuerDeserialize(result) {
|
|
418
|
+
const expectedStatuses = ["200"];
|
|
353
419
|
if (!expectedStatuses.includes(result.status)) {
|
|
354
|
-
|
|
420
|
+
const error = createRestError(result);
|
|
421
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
422
|
+
throw error;
|
|
355
423
|
}
|
|
356
|
-
return
|
|
424
|
+
return issuerBundleDeserializer(result.body);
|
|
357
425
|
}
|
|
358
|
-
/** The
|
|
359
|
-
export async function
|
|
360
|
-
const result = await
|
|
361
|
-
return
|
|
426
|
+
/** The SetCertificateIssuer operation adds or updates the specified certificate issuer. This operation requires the certificates/setissuers permission. */
|
|
427
|
+
export async function setCertificateIssuer(context, issuerName, parameter, options = { requestOptions: {} }) {
|
|
428
|
+
const result = await _setCertificateIssuerSend(context, issuerName, parameter, options);
|
|
429
|
+
return _setCertificateIssuerDeserialize(result);
|
|
362
430
|
}
|
|
363
|
-
export function
|
|
431
|
+
export function _getCertificateIssuersSend(context, options = { requestOptions: {} }) {
|
|
432
|
+
var _a;
|
|
364
433
|
return context
|
|
365
|
-
.path("/certificates/
|
|
366
|
-
.
|
|
434
|
+
.path("/certificates/issuers")
|
|
435
|
+
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: {
|
|
436
|
+
"api-version": context.apiVersion,
|
|
437
|
+
maxresults: options === null || options === void 0 ? void 0 : options.maxresults,
|
|
438
|
+
} }));
|
|
367
439
|
}
|
|
368
|
-
export async function
|
|
440
|
+
export async function _getCertificateIssuersDeserialize(result) {
|
|
369
441
|
const expectedStatuses = ["200"];
|
|
370
442
|
if (!expectedStatuses.includes(result.status)) {
|
|
371
|
-
|
|
443
|
+
const error = createRestError(result);
|
|
444
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
445
|
+
throw error;
|
|
372
446
|
}
|
|
373
|
-
return
|
|
447
|
+
return _certificateIssuerListResultDeserializer(result.body);
|
|
374
448
|
}
|
|
375
|
-
/**
|
|
376
|
-
export
|
|
377
|
-
|
|
378
|
-
return _backupCertificateDeserialize(result);
|
|
449
|
+
/** The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault. This operation requires the certificates/manageissuers/getissuers permission. */
|
|
450
|
+
export function getCertificateIssuers(context, options = { requestOptions: {} }) {
|
|
451
|
+
return buildPagedAsyncIterator(context, () => _getCertificateIssuersSend(context, options), _getCertificateIssuersDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
379
452
|
}
|
|
380
|
-
export function
|
|
453
|
+
export function _deleteCertificateContactsSend(context, options = { requestOptions: {} }) {
|
|
454
|
+
var _a;
|
|
381
455
|
return context
|
|
382
|
-
.path("/certificates/
|
|
383
|
-
.
|
|
456
|
+
.path("/certificates/contacts")
|
|
457
|
+
.delete(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
384
458
|
}
|
|
385
|
-
export async function
|
|
459
|
+
export async function _deleteCertificateContactsDeserialize(result) {
|
|
386
460
|
const expectedStatuses = ["200"];
|
|
387
461
|
if (!expectedStatuses.includes(result.status)) {
|
|
388
|
-
|
|
462
|
+
const error = createRestError(result);
|
|
463
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
464
|
+
throw error;
|
|
389
465
|
}
|
|
390
|
-
return
|
|
466
|
+
return contactsDeserializer(result.body);
|
|
391
467
|
}
|
|
392
|
-
/**
|
|
393
|
-
export async function
|
|
394
|
-
const result = await
|
|
395
|
-
return
|
|
468
|
+
/** Deletes the certificate contacts for a specified key vault certificate. This operation requires the certificates/managecontacts permission. */
|
|
469
|
+
export async function deleteCertificateContacts(context, options = { requestOptions: {} }) {
|
|
470
|
+
const result = await _deleteCertificateContactsSend(context, options);
|
|
471
|
+
return _deleteCertificateContactsDeserialize(result);
|
|
396
472
|
}
|
|
397
|
-
export function
|
|
473
|
+
export function _getCertificateContactsSend(context, options = { requestOptions: {} }) {
|
|
474
|
+
var _a;
|
|
398
475
|
return context
|
|
399
|
-
.path("/
|
|
400
|
-
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { queryParameters: {
|
|
401
|
-
maxresults: options === null || options === void 0 ? void 0 : options.maxresults,
|
|
402
|
-
includePending: options === null || options === void 0 ? void 0 : options.includePending,
|
|
403
|
-
} }));
|
|
476
|
+
.path("/certificates/contacts")
|
|
477
|
+
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
404
478
|
}
|
|
405
|
-
export async function
|
|
479
|
+
export async function _getCertificateContactsDeserialize(result) {
|
|
406
480
|
const expectedStatuses = ["200"];
|
|
407
481
|
if (!expectedStatuses.includes(result.status)) {
|
|
408
|
-
|
|
482
|
+
const error = createRestError(result);
|
|
483
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
484
|
+
throw error;
|
|
409
485
|
}
|
|
410
|
-
return
|
|
486
|
+
return contactsDeserializer(result.body);
|
|
411
487
|
}
|
|
412
|
-
/** The
|
|
413
|
-
export function
|
|
414
|
-
|
|
488
|
+
/** The GetCertificateContacts operation returns the set of certificate contact resources in the specified key vault. This operation requires the certificates/managecontacts permission. */
|
|
489
|
+
export async function getCertificateContacts(context, options = { requestOptions: {} }) {
|
|
490
|
+
const result = await _getCertificateContactsSend(context, options);
|
|
491
|
+
return _getCertificateContactsDeserialize(result);
|
|
415
492
|
}
|
|
416
|
-
export function
|
|
493
|
+
export function _setCertificateContactsSend(context, contacts, options = { requestOptions: {} }) {
|
|
494
|
+
var _a;
|
|
417
495
|
return context
|
|
418
|
-
.path("/
|
|
419
|
-
.
|
|
496
|
+
.path("/certificates/contacts")
|
|
497
|
+
.put(Object.assign(Object.assign({}, 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: contactsSerializer(contacts) }));
|
|
420
498
|
}
|
|
421
|
-
export async function
|
|
499
|
+
export async function _setCertificateContactsDeserialize(result) {
|
|
422
500
|
const expectedStatuses = ["200"];
|
|
423
501
|
if (!expectedStatuses.includes(result.status)) {
|
|
424
|
-
|
|
502
|
+
const error = createRestError(result);
|
|
503
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
504
|
+
throw error;
|
|
425
505
|
}
|
|
426
|
-
return
|
|
506
|
+
return contactsDeserializer(result.body);
|
|
427
507
|
}
|
|
428
|
-
/**
|
|
429
|
-
export async function
|
|
430
|
-
const result = await
|
|
431
|
-
return
|
|
508
|
+
/** Sets the certificate contacts for the specified key vault. This operation requires the certificates/managecontacts permission. */
|
|
509
|
+
export async function setCertificateContacts(context, contacts, options = { requestOptions: {} }) {
|
|
510
|
+
const result = await _setCertificateContactsSend(context, contacts, options);
|
|
511
|
+
return _setCertificateContactsDeserialize(result);
|
|
432
512
|
}
|
|
433
|
-
export function
|
|
513
|
+
export function _deleteCertificateSend(context, certificateName, options = { requestOptions: {} }) {
|
|
514
|
+
var _a;
|
|
434
515
|
return context
|
|
435
|
-
.path("/
|
|
436
|
-
.delete(Object.assign({}, operationOptionsToRequestParameters(options)));
|
|
516
|
+
.path("/certificates/{certificate-name}", certificateName)
|
|
517
|
+
.delete(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: { "api-version": context.apiVersion } }));
|
|
437
518
|
}
|
|
438
|
-
export async function
|
|
439
|
-
const expectedStatuses = ["
|
|
519
|
+
export async function _deleteCertificateDeserialize(result) {
|
|
520
|
+
const expectedStatuses = ["200"];
|
|
440
521
|
if (!expectedStatuses.includes(result.status)) {
|
|
441
|
-
|
|
522
|
+
const error = createRestError(result);
|
|
523
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
524
|
+
throw error;
|
|
442
525
|
}
|
|
443
|
-
return;
|
|
526
|
+
return deletedCertificateBundleDeserializer(result.body);
|
|
444
527
|
}
|
|
445
|
-
/**
|
|
446
|
-
export async function
|
|
447
|
-
const result = await
|
|
448
|
-
return
|
|
528
|
+
/** Deletes all versions of a certificate object along with its associated policy. Delete certificate cannot be used to remove individual versions of a certificate object. This operation requires the certificates/delete permission. */
|
|
529
|
+
export async function deleteCertificate(context, certificateName, options = { requestOptions: {} }) {
|
|
530
|
+
const result = await _deleteCertificateSend(context, certificateName, options);
|
|
531
|
+
return _deleteCertificateDeserialize(result);
|
|
449
532
|
}
|
|
450
|
-
export function
|
|
533
|
+
export function _getCertificatesSend(context, options = { requestOptions: {} }) {
|
|
534
|
+
var _a;
|
|
451
535
|
return context
|
|
452
|
-
.path("/
|
|
453
|
-
.
|
|
536
|
+
.path("/certificates")
|
|
537
|
+
.get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.headers), queryParameters: {
|
|
538
|
+
"api-version": context.apiVersion,
|
|
539
|
+
maxresults: options === null || options === void 0 ? void 0 : options.maxresults,
|
|
540
|
+
includePending: options === null || options === void 0 ? void 0 : options.includePending,
|
|
541
|
+
} }));
|
|
454
542
|
}
|
|
455
|
-
export async function
|
|
543
|
+
export async function _getCertificatesDeserialize(result) {
|
|
456
544
|
const expectedStatuses = ["200"];
|
|
457
545
|
if (!expectedStatuses.includes(result.status)) {
|
|
458
|
-
|
|
546
|
+
const error = createRestError(result);
|
|
547
|
+
error.details = keyVaultErrorDeserializer(result.body);
|
|
548
|
+
throw error;
|
|
459
549
|
}
|
|
460
|
-
return
|
|
550
|
+
return _certificateListResultDeserializer(result.body);
|
|
461
551
|
}
|
|
462
|
-
/** The
|
|
463
|
-
export
|
|
464
|
-
|
|
465
|
-
return _recoverDeletedCertificateDeserialize(result);
|
|
552
|
+
/** The GetCertificates operation returns the set of certificates resources in the specified key vault. This operation requires the certificates/list permission. */
|
|
553
|
+
export function getCertificates(context, options = { requestOptions: {} }) {
|
|
554
|
+
return buildPagedAsyncIterator(context, () => _getCertificatesSend(context, options), _getCertificatesDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
466
555
|
}
|
|
467
556
|
//# sourceMappingURL=operations.js.map
|