@azure/arm-keyvault 2.1.0-beta.1 → 3.0.0-alpha.20230424.3
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/CHANGELOG.md +73 -3
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/dist/index.js +3461 -1761
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/keysCreateIfNotExistSample.js +12 -4
- package/dist-esm/samples-dev/keysCreateIfNotExistSample.js.map +1 -1
- package/dist-esm/samples-dev/keysGetSample.js +12 -4
- package/dist-esm/samples-dev/keysGetSample.js.map +1 -1
- package/dist-esm/samples-dev/keysGetVersionSample.js +12 -4
- package/dist-esm/samples-dev/keysGetVersionSample.js.map +1 -1
- package/dist-esm/samples-dev/keysListSample.js +24 -9
- package/dist-esm/samples-dev/keysListSample.js.map +1 -1
- package/dist-esm/samples-dev/keysListVersionsSample.js +24 -9
- package/dist-esm/samples-dev/keysListVersionsSample.js.map +1 -1
- package/dist-esm/samples-dev/managedHsmKeysCreateIfNotExistSample.d.ts +2 -0
- package/dist-esm/samples-dev/managedHsmKeysCreateIfNotExistSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managedHsmKeysCreateIfNotExistSample.js +43 -0
- package/dist-esm/samples-dev/managedHsmKeysCreateIfNotExistSample.js.map +1 -0
- package/dist-esm/samples-dev/managedHsmKeysGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/managedHsmKeysGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managedHsmKeysGetSample.js +40 -0
- package/dist-esm/samples-dev/managedHsmKeysGetSample.js.map +1 -0
- package/dist-esm/samples-dev/managedHsmKeysGetVersionSample.d.ts +2 -0
- package/dist-esm/samples-dev/managedHsmKeysGetVersionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managedHsmKeysGetVersionSample.js +41 -0
- package/dist-esm/samples-dev/managedHsmKeysGetVersionSample.js.map +1 -0
- package/dist-esm/samples-dev/managedHsmKeysListSample.d.ts +2 -0
- package/dist-esm/samples-dev/managedHsmKeysListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managedHsmKeysListSample.js +60 -0
- package/dist-esm/samples-dev/managedHsmKeysListSample.js.map +1 -0
- package/dist-esm/samples-dev/managedHsmKeysListVersionsSample.d.ts +2 -0
- package/dist-esm/samples-dev/managedHsmKeysListVersionsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managedHsmKeysListVersionsSample.js +61 -0
- package/dist-esm/samples-dev/managedHsmKeysListVersionsSample.js.map +1 -0
- package/dist-esm/samples-dev/managedHsmsCheckMhsmNameAvailabilitySample.d.ts +2 -0
- package/dist-esm/samples-dev/managedHsmsCheckMhsmNameAvailabilitySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managedHsmsCheckMhsmNameAvailabilitySample.js +38 -0
- package/dist-esm/samples-dev/managedHsmsCheckMhsmNameAvailabilitySample.js.map +1 -0
- package/dist-esm/samples-dev/managedHsmsCreateOrUpdateSample.js +13 -5
- package/dist-esm/samples-dev/managedHsmsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/managedHsmsDeleteSample.js +12 -4
- package/dist-esm/samples-dev/managedHsmsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/managedHsmsGetDeletedSample.js +11 -3
- package/dist-esm/samples-dev/managedHsmsGetDeletedSample.js.map +1 -1
- package/dist-esm/samples-dev/managedHsmsGetSample.js +12 -4
- package/dist-esm/samples-dev/managedHsmsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/managedHsmsListByResourceGroupSample.js +24 -9
- package/dist-esm/samples-dev/managedHsmsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/managedHsmsListBySubscriptionSample.js +23 -8
- package/dist-esm/samples-dev/managedHsmsListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/managedHsmsListDeletedSample.js +23 -8
- package/dist-esm/samples-dev/managedHsmsListDeletedSample.js.map +1 -1
- package/dist-esm/samples-dev/managedHsmsPurgeDeletedSample.js +11 -3
- package/dist-esm/samples-dev/managedHsmsPurgeDeletedSample.js.map +1 -1
- package/dist-esm/samples-dev/managedHsmsUpdateSample.js +12 -4
- package/dist-esm/samples-dev/managedHsmsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsDeleteSample.js +12 -4
- package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsGetSample.js +12 -4
- package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsListByResourceSample.js +24 -9
- package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsListByResourceSample.js.map +1 -1
- package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsPutSample.js +12 -4
- package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsPutSample.js.map +1 -1
- package/dist-esm/samples-dev/mhsmPrivateLinkResourcesListByMhsmResourceSample.js +12 -4
- package/dist-esm/samples-dev/mhsmPrivateLinkResourcesListByMhsmResourceSample.js.map +1 -1
- package/dist-esm/samples-dev/mhsmRegionsListByResourceSample.d.ts +2 -0
- package/dist-esm/samples-dev/mhsmRegionsListByResourceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/mhsmRegionsListByResourceSample.js +60 -0
- package/dist-esm/samples-dev/mhsmRegionsListByResourceSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +23 -8
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +12 -4
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +12 -4
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsListByResourceSample.js +24 -9
- package/dist-esm/samples-dev/privateEndpointConnectionsListByResourceSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js +12 -4
- package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js.map +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesListByVaultSample.js +12 -4
- package/dist-esm/samples-dev/privateLinkResourcesListByVaultSample.js.map +1 -1
- package/dist-esm/samples-dev/secretsCreateOrUpdateSample.js +12 -4
- package/dist-esm/samples-dev/secretsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/secretsGetSample.js +12 -4
- package/dist-esm/samples-dev/secretsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/secretsListSample.js +24 -9
- package/dist-esm/samples-dev/secretsListSample.js.map +1 -1
- package/dist-esm/samples-dev/secretsUpdateSample.js +12 -4
- package/dist-esm/samples-dev/secretsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsCheckNameAvailabilitySample.js +11 -3
- package/dist-esm/samples-dev/vaultsCheckNameAvailabilitySample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsCreateOrUpdateSample.js +17 -8
- package/dist-esm/samples-dev/vaultsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsDeleteSample.js +12 -4
- package/dist-esm/samples-dev/vaultsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsGetDeletedSample.js +11 -3
- package/dist-esm/samples-dev/vaultsGetDeletedSample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsGetSample.js +12 -4
- package/dist-esm/samples-dev/vaultsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsListByResourceGroupSample.js +24 -9
- package/dist-esm/samples-dev/vaultsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsListBySubscriptionSample.js +23 -8
- package/dist-esm/samples-dev/vaultsListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsListDeletedSample.js +23 -8
- package/dist-esm/samples-dev/vaultsListDeletedSample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsListSample.js +23 -8
- package/dist-esm/samples-dev/vaultsListSample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsPurgeDeletedSample.js +11 -3
- package/dist-esm/samples-dev/vaultsPurgeDeletedSample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsUpdateAccessPolicySample.js +12 -4
- package/dist-esm/samples-dev/vaultsUpdateAccessPolicySample.js.map +1 -1
- package/dist-esm/samples-dev/vaultsUpdateSample.js +12 -4
- package/dist-esm/samples-dev/vaultsUpdateSample.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/keyVaultManagementClient.d.ts +5 -1
- package/dist-esm/src/keyVaultManagementClient.d.ts.map +1 -1
- package/dist-esm/src/keyVaultManagementClient.js +53 -20
- package/dist-esm/src/keyVaultManagementClient.js.map +1 -1
- package/dist-esm/src/lroImpl.d.ts +6 -11
- package/dist-esm/src/lroImpl.d.ts.map +1 -1
- package/dist-esm/src/lroImpl.js +12 -20
- package/dist-esm/src/lroImpl.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +547 -107
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +135 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +21 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +617 -11
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +9 -5
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +45 -8
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +2 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +2 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/keys.d.ts +3 -1
- package/dist-esm/src/operations/keys.d.ts.map +1 -1
- package/dist-esm/src/operations/keys.js +64 -27
- package/dist-esm/src/operations/keys.js.map +1 -1
- package/dist-esm/src/operations/managedHsmKeys.d.ts +105 -0
- package/dist-esm/src/operations/managedHsmKeys.d.ts.map +1 -0
- package/dist-esm/src/operations/managedHsmKeys.js +404 -0
- package/dist-esm/src/operations/managedHsmKeys.js.map +1 -0
- package/dist-esm/src/operations/managedHsms.d.ts +13 -7
- package/dist-esm/src/operations/managedHsms.d.ts.map +1 -1
- package/dist-esm/src/operations/managedHsms.js +171 -70
- package/dist-esm/src/operations/managedHsms.js.map +1 -1
- package/dist-esm/src/operations/mhsmPrivateEndpointConnections.d.ts +2 -2
- package/dist-esm/src/operations/mhsmPrivateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/mhsmPrivateEndpointConnections.js +46 -24
- package/dist-esm/src/operations/mhsmPrivateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operations/mhsmPrivateLinkResources.js +1 -1
- package/dist-esm/src/operations/mhsmPrivateLinkResources.js.map +1 -1
- package/dist-esm/src/operations/mhsmRegions.d.ts +38 -0
- package/dist-esm/src/operations/mhsmRegions.d.ts.map +1 -0
- package/dist-esm/src/operations/mhsmRegions.js +155 -0
- package/dist-esm/src/operations/mhsmRegions.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +31 -13
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +2 -2
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.js +46 -19
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operations/secrets.d.ts +3 -1
- package/dist-esm/src/operations/secrets.d.ts.map +1 -1
- package/dist-esm/src/operations/secrets.js +36 -16
- package/dist-esm/src/operations/secrets.js.map +1 -1
- package/dist-esm/src/operations/vaults.d.ts +3 -3
- package/dist-esm/src/operations/vaults.d.ts.map +1 -1
- package/dist-esm/src/operations/vaults.js +142 -65
- package/dist-esm/src/operations/vaults.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +2 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/keys.d.ts +3 -1
- package/dist-esm/src/operationsInterfaces/keys.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/managedHsmKeys.d.ts +57 -0
- package/dist-esm/src/operationsInterfaces/managedHsmKeys.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/managedHsmKeys.js +9 -0
- package/dist-esm/src/operationsInterfaces/managedHsmKeys.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/managedHsms.d.ts +13 -7
- package/dist-esm/src/operationsInterfaces/managedHsms.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/mhsmPrivateEndpointConnections.d.ts +2 -2
- package/dist-esm/src/operationsInterfaces/mhsmPrivateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/mhsmRegions.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/mhsmRegions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/mhsmRegions.js +9 -0
- package/dist-esm/src/operationsInterfaces/mhsmRegions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +2 -2
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/secrets.d.ts +3 -1
- package/dist-esm/src/operationsInterfaces/secrets.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/vaults.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/vaults.d.ts.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/keyvault_examples.d.ts.map +1 -1
- package/dist-esm/test/keyvault_examples.js +42 -30
- package/dist-esm/test/keyvault_examples.js.map +1 -1
- package/package.json +21 -16
- package/review/arm-keyvault.api.md +304 -141
- package/src/index.ts +1 -0
- package/src/keyVaultManagementClient.ts +69 -21
- package/src/lroImpl.ts +31 -23
- package/src/models/index.ts +519 -44
- package/src/models/mappers.ts +644 -6
- package/src/models/parameters.ts +50 -7
- package/src/operations/index.ts +2 -0
- package/src/operations/keys.ts +56 -25
- package/src/operations/managedHsmKeys.ts +525 -0
- package/src/operations/managedHsms.ts +184 -83
- package/src/operations/mhsmPrivateEndpointConnections.ts +50 -26
- package/src/operations/mhsmPrivateLinkResources.ts +1 -1
- package/src/operations/mhsmRegions.ts +194 -0
- package/src/operations/operations.ts +21 -9
- package/src/operations/privateEndpointConnections.ts +51 -26
- package/src/operations/secrets.ts +32 -13
- package/src/operations/vaults.ts +117 -61
- package/src/operationsInterfaces/index.ts +2 -0
- package/src/operationsInterfaces/keys.ts +3 -1
- package/src/operationsInterfaces/managedHsmKeys.ts +103 -0
- package/src/operationsInterfaces/managedHsms.ts +27 -9
- package/src/operationsInterfaces/mhsmPrivateEndpointConnections.ts +3 -3
- package/src/operationsInterfaces/mhsmRegions.ts +29 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +3 -3
- package/src/operationsInterfaces/secrets.ts +3 -1
- package/src/operationsInterfaces/vaults.ts +4 -4
- package/src/pagingHelper.ts +39 -0
- package/types/arm-keyvault.d.ts +620 -45
- package/types/tsdoc-metadata.json +1 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { MhsmRegions } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { KeyVaultManagementClient } from "../keyVaultManagementClient";
|
|
16
|
+
import {
|
|
17
|
+
MhsmGeoReplicatedRegion,
|
|
18
|
+
MhsmRegionsListByResourceNextOptionalParams,
|
|
19
|
+
MhsmRegionsListByResourceOptionalParams,
|
|
20
|
+
MhsmRegionsListByResourceResponse,
|
|
21
|
+
MhsmRegionsListByResourceNextResponse
|
|
22
|
+
} from "../models";
|
|
23
|
+
|
|
24
|
+
/// <reference lib="esnext.asynciterable" />
|
|
25
|
+
/** Class containing MhsmRegions operations. */
|
|
26
|
+
export class MhsmRegionsImpl implements MhsmRegions {
|
|
27
|
+
private readonly client: KeyVaultManagementClient;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Initialize a new instance of the class MhsmRegions class.
|
|
31
|
+
* @param client Reference to the service client
|
|
32
|
+
*/
|
|
33
|
+
constructor(client: KeyVaultManagementClient) {
|
|
34
|
+
this.client = client;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The List operation gets information about the regions associated with the managed HSM Pool.
|
|
39
|
+
* @param resourceGroupName Name of the resource group that contains the managed HSM pool.
|
|
40
|
+
* @param name Name of the managed HSM Pool
|
|
41
|
+
* @param options The options parameters.
|
|
42
|
+
*/
|
|
43
|
+
public listByResource(
|
|
44
|
+
resourceGroupName: string,
|
|
45
|
+
name: string,
|
|
46
|
+
options?: MhsmRegionsListByResourceOptionalParams
|
|
47
|
+
): PagedAsyncIterableIterator<MhsmGeoReplicatedRegion> {
|
|
48
|
+
const iter = this.listByResourcePagingAll(resourceGroupName, name, options);
|
|
49
|
+
return {
|
|
50
|
+
next() {
|
|
51
|
+
return iter.next();
|
|
52
|
+
},
|
|
53
|
+
[Symbol.asyncIterator]() {
|
|
54
|
+
return this;
|
|
55
|
+
},
|
|
56
|
+
byPage: (settings?: PageSettings) => {
|
|
57
|
+
if (settings?.maxPageSize) {
|
|
58
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
59
|
+
}
|
|
60
|
+
return this.listByResourcePagingPage(
|
|
61
|
+
resourceGroupName,
|
|
62
|
+
name,
|
|
63
|
+
options,
|
|
64
|
+
settings
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private async *listByResourcePagingPage(
|
|
71
|
+
resourceGroupName: string,
|
|
72
|
+
name: string,
|
|
73
|
+
options?: MhsmRegionsListByResourceOptionalParams,
|
|
74
|
+
settings?: PageSettings
|
|
75
|
+
): AsyncIterableIterator<MhsmGeoReplicatedRegion[]> {
|
|
76
|
+
let result: MhsmRegionsListByResourceResponse;
|
|
77
|
+
let continuationToken = settings?.continuationToken;
|
|
78
|
+
if (!continuationToken) {
|
|
79
|
+
result = await this._listByResource(resourceGroupName, name, options);
|
|
80
|
+
let page = result.value || [];
|
|
81
|
+
continuationToken = result.nextLink;
|
|
82
|
+
setContinuationToken(page, continuationToken);
|
|
83
|
+
yield page;
|
|
84
|
+
}
|
|
85
|
+
while (continuationToken) {
|
|
86
|
+
result = await this._listByResourceNext(
|
|
87
|
+
resourceGroupName,
|
|
88
|
+
name,
|
|
89
|
+
continuationToken,
|
|
90
|
+
options
|
|
91
|
+
);
|
|
92
|
+
continuationToken = result.nextLink;
|
|
93
|
+
let page = result.value || [];
|
|
94
|
+
setContinuationToken(page, continuationToken);
|
|
95
|
+
yield page;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
private async *listByResourcePagingAll(
|
|
100
|
+
resourceGroupName: string,
|
|
101
|
+
name: string,
|
|
102
|
+
options?: MhsmRegionsListByResourceOptionalParams
|
|
103
|
+
): AsyncIterableIterator<MhsmGeoReplicatedRegion> {
|
|
104
|
+
for await (const page of this.listByResourcePagingPage(
|
|
105
|
+
resourceGroupName,
|
|
106
|
+
name,
|
|
107
|
+
options
|
|
108
|
+
)) {
|
|
109
|
+
yield* page;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The List operation gets information about the regions associated with the managed HSM Pool.
|
|
115
|
+
* @param resourceGroupName Name of the resource group that contains the managed HSM pool.
|
|
116
|
+
* @param name Name of the managed HSM Pool
|
|
117
|
+
* @param options The options parameters.
|
|
118
|
+
*/
|
|
119
|
+
private _listByResource(
|
|
120
|
+
resourceGroupName: string,
|
|
121
|
+
name: string,
|
|
122
|
+
options?: MhsmRegionsListByResourceOptionalParams
|
|
123
|
+
): Promise<MhsmRegionsListByResourceResponse> {
|
|
124
|
+
return this.client.sendOperationRequest(
|
|
125
|
+
{ resourceGroupName, name, options },
|
|
126
|
+
listByResourceOperationSpec
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* ListByResourceNext
|
|
132
|
+
* @param resourceGroupName Name of the resource group that contains the managed HSM pool.
|
|
133
|
+
* @param name Name of the managed HSM Pool
|
|
134
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResource method.
|
|
135
|
+
* @param options The options parameters.
|
|
136
|
+
*/
|
|
137
|
+
private _listByResourceNext(
|
|
138
|
+
resourceGroupName: string,
|
|
139
|
+
name: string,
|
|
140
|
+
nextLink: string,
|
|
141
|
+
options?: MhsmRegionsListByResourceNextOptionalParams
|
|
142
|
+
): Promise<MhsmRegionsListByResourceNextResponse> {
|
|
143
|
+
return this.client.sendOperationRequest(
|
|
144
|
+
{ resourceGroupName, name, nextLink, options },
|
|
145
|
+
listByResourceNextOperationSpec
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// Operation Specifications
|
|
150
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
151
|
+
|
|
152
|
+
const listByResourceOperationSpec: coreClient.OperationSpec = {
|
|
153
|
+
path:
|
|
154
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/regions",
|
|
155
|
+
httpMethod: "GET",
|
|
156
|
+
responses: {
|
|
157
|
+
200: {
|
|
158
|
+
bodyMapper: Mappers.MhsmRegionsListResult
|
|
159
|
+
},
|
|
160
|
+
default: {
|
|
161
|
+
bodyMapper: Mappers.ManagedHsmError
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
queryParameters: [Parameters.apiVersion],
|
|
165
|
+
urlParameters: [
|
|
166
|
+
Parameters.$host,
|
|
167
|
+
Parameters.subscriptionId,
|
|
168
|
+
Parameters.resourceGroupName,
|
|
169
|
+
Parameters.name1
|
|
170
|
+
],
|
|
171
|
+
headerParameters: [Parameters.accept],
|
|
172
|
+
serializer
|
|
173
|
+
};
|
|
174
|
+
const listByResourceNextOperationSpec: coreClient.OperationSpec = {
|
|
175
|
+
path: "{nextLink}",
|
|
176
|
+
httpMethod: "GET",
|
|
177
|
+
responses: {
|
|
178
|
+
200: {
|
|
179
|
+
bodyMapper: Mappers.MhsmRegionsListResult
|
|
180
|
+
},
|
|
181
|
+
default: {
|
|
182
|
+
bodyMapper: Mappers.ManagedHsmError
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
urlParameters: [
|
|
186
|
+
Parameters.$host,
|
|
187
|
+
Parameters.subscriptionId,
|
|
188
|
+
Parameters.resourceGroupName,
|
|
189
|
+
Parameters.nextLink,
|
|
190
|
+
Parameters.name1
|
|
191
|
+
],
|
|
192
|
+
headerParameters: [Parameters.accept],
|
|
193
|
+
serializer
|
|
194
|
+
};
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { Operations } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -48,22 +49,34 @@ export class OperationsImpl implements Operations {
|
|
|
48
49
|
[Symbol.asyncIterator]() {
|
|
49
50
|
return this;
|
|
50
51
|
},
|
|
51
|
-
byPage: () => {
|
|
52
|
-
|
|
52
|
+
byPage: (settings?: PageSettings) => {
|
|
53
|
+
if (settings?.maxPageSize) {
|
|
54
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
55
|
+
}
|
|
56
|
+
return this.listPagingPage(options, settings);
|
|
53
57
|
}
|
|
54
58
|
};
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
private async *listPagingPage(
|
|
58
|
-
options?: OperationsListOptionalParams
|
|
62
|
+
options?: OperationsListOptionalParams,
|
|
63
|
+
settings?: PageSettings
|
|
59
64
|
): AsyncIterableIterator<Operation[]> {
|
|
60
|
-
let result
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
let result: OperationsListResponse;
|
|
66
|
+
let continuationToken = settings?.continuationToken;
|
|
67
|
+
if (!continuationToken) {
|
|
68
|
+
result = await this._list(options);
|
|
69
|
+
let page = result.value || [];
|
|
70
|
+
continuationToken = result.nextLink;
|
|
71
|
+
setContinuationToken(page, continuationToken);
|
|
72
|
+
yield page;
|
|
73
|
+
}
|
|
63
74
|
while (continuationToken) {
|
|
64
75
|
result = await this._listNext(continuationToken, options);
|
|
65
76
|
continuationToken = result.nextLink;
|
|
66
|
-
|
|
77
|
+
let page = result.value || [];
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
67
80
|
}
|
|
68
81
|
}
|
|
69
82
|
|
|
@@ -130,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
130
143
|
bodyMapper: Mappers.CloudError
|
|
131
144
|
}
|
|
132
145
|
},
|
|
133
|
-
queryParameters: [Parameters.apiVersion],
|
|
134
146
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
135
147
|
headerParameters: [Parameters.accept],
|
|
136
148
|
serializer
|
|
@@ -6,25 +6,30 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { PrivateEndpointConnections } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
13
14
|
import * as Parameters from "../models/parameters";
|
|
14
15
|
import { KeyVaultManagementClient } from "../keyVaultManagementClient";
|
|
15
|
-
import {
|
|
16
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
17
22
|
import {
|
|
18
23
|
PrivateEndpointConnection,
|
|
19
24
|
PrivateEndpointConnectionsListByResourceNextOptionalParams,
|
|
20
25
|
PrivateEndpointConnectionsListByResourceOptionalParams,
|
|
26
|
+
PrivateEndpointConnectionsListByResourceResponse,
|
|
21
27
|
PrivateEndpointConnectionsGetOptionalParams,
|
|
22
28
|
PrivateEndpointConnectionsGetResponse,
|
|
23
29
|
PrivateEndpointConnectionsPutOptionalParams,
|
|
24
30
|
PrivateEndpointConnectionsPutResponse,
|
|
25
31
|
PrivateEndpointConnectionsDeleteOptionalParams,
|
|
26
32
|
PrivateEndpointConnectionsDeleteResponse,
|
|
27
|
-
PrivateEndpointConnectionsListByResourceResponse,
|
|
28
33
|
PrivateEndpointConnectionsListByResourceNextResponse
|
|
29
34
|
} from "../models";
|
|
30
35
|
|
|
@@ -66,11 +71,15 @@ export class PrivateEndpointConnectionsImpl
|
|
|
66
71
|
[Symbol.asyncIterator]() {
|
|
67
72
|
return this;
|
|
68
73
|
},
|
|
69
|
-
byPage: () => {
|
|
74
|
+
byPage: (settings?: PageSettings) => {
|
|
75
|
+
if (settings?.maxPageSize) {
|
|
76
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
77
|
+
}
|
|
70
78
|
return this.listByResourcePagingPage(
|
|
71
79
|
resourceGroupName,
|
|
72
80
|
vaultName,
|
|
73
|
-
options
|
|
81
|
+
options,
|
|
82
|
+
settings
|
|
74
83
|
);
|
|
75
84
|
}
|
|
76
85
|
};
|
|
@@ -79,15 +88,22 @@ export class PrivateEndpointConnectionsImpl
|
|
|
79
88
|
private async *listByResourcePagingPage(
|
|
80
89
|
resourceGroupName: string,
|
|
81
90
|
vaultName: string,
|
|
82
|
-
options?: PrivateEndpointConnectionsListByResourceOptionalParams
|
|
91
|
+
options?: PrivateEndpointConnectionsListByResourceOptionalParams,
|
|
92
|
+
settings?: PageSettings
|
|
83
93
|
): AsyncIterableIterator<PrivateEndpointConnection[]> {
|
|
84
|
-
let result
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
94
|
+
let result: PrivateEndpointConnectionsListByResourceResponse;
|
|
95
|
+
let continuationToken = settings?.continuationToken;
|
|
96
|
+
if (!continuationToken) {
|
|
97
|
+
result = await this._listByResource(
|
|
98
|
+
resourceGroupName,
|
|
99
|
+
vaultName,
|
|
100
|
+
options
|
|
101
|
+
);
|
|
102
|
+
let page = result.value || [];
|
|
103
|
+
continuationToken = result.nextLink;
|
|
104
|
+
setContinuationToken(page, continuationToken);
|
|
105
|
+
yield page;
|
|
106
|
+
}
|
|
91
107
|
while (continuationToken) {
|
|
92
108
|
result = await this._listByResourceNext(
|
|
93
109
|
resourceGroupName,
|
|
@@ -96,7 +112,9 @@ export class PrivateEndpointConnectionsImpl
|
|
|
96
112
|
options
|
|
97
113
|
);
|
|
98
114
|
continuationToken = result.nextLink;
|
|
99
|
-
|
|
115
|
+
let page = result.value || [];
|
|
116
|
+
setContinuationToken(page, continuationToken);
|
|
117
|
+
yield page;
|
|
100
118
|
}
|
|
101
119
|
}
|
|
102
120
|
|
|
@@ -176,8 +194,8 @@ export class PrivateEndpointConnectionsImpl
|
|
|
176
194
|
privateEndpointConnectionName: string,
|
|
177
195
|
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
|
178
196
|
): Promise<
|
|
179
|
-
|
|
180
|
-
|
|
197
|
+
SimplePollerLike<
|
|
198
|
+
OperationState<PrivateEndpointConnectionsDeleteResponse>,
|
|
181
199
|
PrivateEndpointConnectionsDeleteResponse
|
|
182
200
|
>
|
|
183
201
|
> {
|
|
@@ -187,7 +205,7 @@ export class PrivateEndpointConnectionsImpl
|
|
|
187
205
|
): Promise<PrivateEndpointConnectionsDeleteResponse> => {
|
|
188
206
|
return this.client.sendOperationRequest(args, spec);
|
|
189
207
|
};
|
|
190
|
-
const
|
|
208
|
+
const sendOperationFn = async (
|
|
191
209
|
args: coreClient.OperationArguments,
|
|
192
210
|
spec: coreClient.OperationSpec
|
|
193
211
|
) => {
|
|
@@ -220,13 +238,21 @@ export class PrivateEndpointConnectionsImpl
|
|
|
220
238
|
};
|
|
221
239
|
};
|
|
222
240
|
|
|
223
|
-
const lro =
|
|
224
|
-
|
|
225
|
-
{
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
241
|
+
const lro = createLroSpec({
|
|
242
|
+
sendOperationFn,
|
|
243
|
+
args: {
|
|
244
|
+
resourceGroupName,
|
|
245
|
+
vaultName,
|
|
246
|
+
privateEndpointConnectionName,
|
|
247
|
+
options
|
|
248
|
+
},
|
|
249
|
+
spec: deleteOperationSpec
|
|
250
|
+
});
|
|
251
|
+
const poller = await createHttpPoller<
|
|
252
|
+
PrivateEndpointConnectionsDeleteResponse,
|
|
253
|
+
OperationState<PrivateEndpointConnectionsDeleteResponse>
|
|
254
|
+
>(lro, {
|
|
255
|
+
restoreFrom: options?.resumeFrom,
|
|
230
256
|
intervalInMs: options?.updateIntervalInMs
|
|
231
257
|
});
|
|
232
258
|
await poller.poll();
|
|
@@ -411,7 +437,6 @@ const listByResourceNextOperationSpec: coreClient.OperationSpec = {
|
|
|
411
437
|
bodyMapper: Mappers.CloudError
|
|
412
438
|
}
|
|
413
439
|
},
|
|
414
|
-
queryParameters: [Parameters.apiVersion],
|
|
415
440
|
urlParameters: [
|
|
416
441
|
Parameters.$host,
|
|
417
442
|
Parameters.subscriptionId,
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { Secrets } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,6 +17,7 @@ import {
|
|
|
16
17
|
Secret,
|
|
17
18
|
SecretsListNextOptionalParams,
|
|
18
19
|
SecretsListOptionalParams,
|
|
20
|
+
SecretsListResponse,
|
|
19
21
|
SecretCreateOrUpdateParameters,
|
|
20
22
|
SecretsCreateOrUpdateOptionalParams,
|
|
21
23
|
SecretsCreateOrUpdateResponse,
|
|
@@ -24,7 +26,6 @@ import {
|
|
|
24
26
|
SecretsUpdateResponse,
|
|
25
27
|
SecretsGetOptionalParams,
|
|
26
28
|
SecretsGetResponse,
|
|
27
|
-
SecretsListResponse,
|
|
28
29
|
SecretsListNextResponse
|
|
29
30
|
} from "../models";
|
|
30
31
|
|
|
@@ -62,8 +63,16 @@ export class SecretsImpl implements Secrets {
|
|
|
62
63
|
[Symbol.asyncIterator]() {
|
|
63
64
|
return this;
|
|
64
65
|
},
|
|
65
|
-
byPage: () => {
|
|
66
|
-
|
|
66
|
+
byPage: (settings?: PageSettings) => {
|
|
67
|
+
if (settings?.maxPageSize) {
|
|
68
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
69
|
+
}
|
|
70
|
+
return this.listPagingPage(
|
|
71
|
+
resourceGroupName,
|
|
72
|
+
vaultName,
|
|
73
|
+
options,
|
|
74
|
+
settings
|
|
75
|
+
);
|
|
67
76
|
}
|
|
68
77
|
};
|
|
69
78
|
}
|
|
@@ -71,11 +80,18 @@ export class SecretsImpl implements Secrets {
|
|
|
71
80
|
private async *listPagingPage(
|
|
72
81
|
resourceGroupName: string,
|
|
73
82
|
vaultName: string,
|
|
74
|
-
options?: SecretsListOptionalParams
|
|
83
|
+
options?: SecretsListOptionalParams,
|
|
84
|
+
settings?: PageSettings
|
|
75
85
|
): AsyncIterableIterator<Secret[]> {
|
|
76
|
-
let result
|
|
77
|
-
|
|
78
|
-
|
|
86
|
+
let result: SecretsListResponse;
|
|
87
|
+
let continuationToken = settings?.continuationToken;
|
|
88
|
+
if (!continuationToken) {
|
|
89
|
+
result = await this._list(resourceGroupName, vaultName, options);
|
|
90
|
+
let page = result.value || [];
|
|
91
|
+
continuationToken = result.nextLink;
|
|
92
|
+
setContinuationToken(page, continuationToken);
|
|
93
|
+
yield page;
|
|
94
|
+
}
|
|
79
95
|
while (continuationToken) {
|
|
80
96
|
result = await this._listNext(
|
|
81
97
|
resourceGroupName,
|
|
@@ -84,7 +100,9 @@ export class SecretsImpl implements Secrets {
|
|
|
84
100
|
options
|
|
85
101
|
);
|
|
86
102
|
continuationToken = result.nextLink;
|
|
87
|
-
|
|
103
|
+
let page = result.value || [];
|
|
104
|
+
setContinuationToken(page, continuationToken);
|
|
105
|
+
yield page;
|
|
88
106
|
}
|
|
89
107
|
}
|
|
90
108
|
|
|
@@ -108,7 +126,9 @@ export class SecretsImpl implements Secrets {
|
|
|
108
126
|
* with vault secrets.
|
|
109
127
|
* @param resourceGroupName The name of the Resource Group to which the vault belongs.
|
|
110
128
|
* @param vaultName Name of the vault
|
|
111
|
-
* @param secretName Name of the secret
|
|
129
|
+
* @param secretName Name of the secret. The value you provide may be copied globally for the purpose
|
|
130
|
+
* of running the service. The value provided should not include personally identifiable or sensitive
|
|
131
|
+
* information.
|
|
112
132
|
* @param parameters Parameters to create or update the secret
|
|
113
133
|
* @param options The options parameters.
|
|
114
134
|
*/
|
|
@@ -223,7 +243,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
|
223
243
|
bodyMapper: Mappers.CloudError
|
|
224
244
|
}
|
|
225
245
|
},
|
|
226
|
-
requestBody: Parameters.
|
|
246
|
+
requestBody: Parameters.parameters6,
|
|
227
247
|
queryParameters: [Parameters.apiVersion],
|
|
228
248
|
urlParameters: [
|
|
229
249
|
Parameters.$host,
|
|
@@ -251,7 +271,7 @@ const updateOperationSpec: coreClient.OperationSpec = {
|
|
|
251
271
|
bodyMapper: Mappers.CloudError
|
|
252
272
|
}
|
|
253
273
|
},
|
|
254
|
-
requestBody: Parameters.
|
|
274
|
+
requestBody: Parameters.parameters7,
|
|
255
275
|
queryParameters: [Parameters.apiVersion],
|
|
256
276
|
urlParameters: [
|
|
257
277
|
Parameters.$host,
|
|
@@ -320,7 +340,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
320
340
|
bodyMapper: Mappers.CloudError
|
|
321
341
|
}
|
|
322
342
|
},
|
|
323
|
-
queryParameters: [Parameters.apiVersion, Parameters.top],
|
|
324
343
|
urlParameters: [
|
|
325
344
|
Parameters.$host,
|
|
326
345
|
Parameters.subscriptionId,
|