@azure/arm-keyvault-profile-2020-09-01-hybrid 1.1.0 → 2.0.0

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.
Files changed (178) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +80 -83
  4. package/dist/index.js +3453 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/keyVaultManagementClient.d.ts +23 -0
  13. package/dist-esm/src/keyVaultManagementClient.d.ts.map +1 -0
  14. package/dist-esm/src/keyVaultManagementClient.js +56 -0
  15. package/dist-esm/src/keyVaultManagementClient.js.map +1 -0
  16. package/dist-esm/src/lroImpl.d.ts +16 -0
  17. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  18. package/dist-esm/src/lroImpl.js +29 -0
  19. package/dist-esm/src/lroImpl.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +1008 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +123 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +48 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/mappers.js +728 -617
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +26 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +220 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/{esm → dist-esm/src}/operations/index.js +3 -5
  35. package/dist-esm/src/operations/index.js.map +1 -0
  36. package/dist-esm/src/operations/operations.d.ts +32 -0
  37. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/operations.js +120 -0
  39. package/dist-esm/src/operations/operations.js.map +1 -0
  40. package/dist-esm/src/operations/privateEndpointConnections.d.ts +51 -0
  41. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  42. package/dist-esm/src/operations/privateEndpointConnections.js +187 -0
  43. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  44. package/dist-esm/src/operations/privateLinkResources.d.ts +20 -0
  45. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  46. package/dist-esm/src/operations/privateLinkResources.js +53 -0
  47. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  48. package/dist-esm/src/operations/secrets.d.ts +72 -0
  49. package/dist-esm/src/operations/secrets.d.ts.map +1 -0
  50. package/dist-esm/src/operations/secrets.js +247 -0
  51. package/dist-esm/src/operations/secrets.js.map +1 -0
  52. package/dist-esm/src/operations/vaults.d.ts +166 -0
  53. package/dist-esm/src/operations/vaults.d.ts.map +1 -0
  54. package/dist-esm/src/operations/vaults.js +816 -0
  55. package/dist-esm/src/operations/vaults.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
  57. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/index.js +13 -0
  59. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  61. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +43 -0
  65. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  67. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +12 -0
  69. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  71. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/secrets.d.ts +45 -0
  73. package/dist-esm/src/operationsInterfaces/secrets.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/secrets.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/secrets.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/vaults.d.ts +103 -0
  77. package/dist-esm/src/operationsInterfaces/vaults.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/vaults.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/vaults.js.map +1 -0
  80. package/dist-esm/test/sampleTest.d.ts +2 -0
  81. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  82. package/dist-esm/test/sampleTest.js +40 -0
  83. package/dist-esm/test/sampleTest.js.map +1 -0
  84. package/package.json +73 -22
  85. package/review/arm-keyvault-profile-2020-09-01-hybrid.api.md +876 -0
  86. package/rollup.config.js +115 -30
  87. package/src/index.ts +12 -0
  88. package/src/keyVaultManagementClient.ts +84 -45
  89. package/src/lroImpl.ts +34 -0
  90. package/src/models/index.ts +849 -1276
  91. package/src/models/mappers.ts +730 -609
  92. package/src/models/parameters.ts +153 -76
  93. package/src/operations/index.ts +3 -5
  94. package/src/operations/operations.ts +87 -73
  95. package/src/operations/privateEndpointConnections.ts +174 -154
  96. package/src/operations/privateLinkResources.ts +39 -54
  97. package/src/operations/secrets.ts +215 -248
  98. package/src/operations/vaults.ts +731 -629
  99. package/src/operationsInterfaces/index.ts +13 -0
  100. package/src/operationsInterfaces/operations.ts +22 -0
  101. package/src/operationsInterfaces/privateEndpointConnections.ts +85 -0
  102. package/src/operationsInterfaces/privateLinkResources.ts +27 -0
  103. package/src/operationsInterfaces/secrets.ts +86 -0
  104. package/src/operationsInterfaces/vaults.ts +197 -0
  105. package/tsconfig.json +14 -6
  106. package/types/arm-keyvault-profile-2020-09-01-hybrid.d.ts +1360 -0
  107. package/types/tsdoc-metadata.json +11 -0
  108. package/dist/arm-keyvault-profile-2020-09-01-hybrid.js +0 -3058
  109. package/dist/arm-keyvault-profile-2020-09-01-hybrid.js.map +0 -1
  110. package/dist/arm-keyvault-profile-2020-09-01-hybrid.min.js +0 -1
  111. package/dist/arm-keyvault-profile-2020-09-01-hybrid.min.js.map +0 -1
  112. package/esm/keyVaultManagementClient.d.ts +0 -29
  113. package/esm/keyVaultManagementClient.d.ts.map +0 -1
  114. package/esm/keyVaultManagementClient.js +0 -43
  115. package/esm/keyVaultManagementClient.js.map +0 -1
  116. package/esm/keyVaultManagementClientContext.d.ts +0 -23
  117. package/esm/keyVaultManagementClientContext.d.ts.map +0 -1
  118. package/esm/keyVaultManagementClientContext.js +0 -62
  119. package/esm/keyVaultManagementClientContext.js.map +0 -1
  120. package/esm/models/index.d.ts +0 -1449
  121. package/esm/models/index.d.ts.map +0 -1
  122. package/esm/models/index.js +0 -8
  123. package/esm/models/index.js.map +0 -1
  124. package/esm/models/mappers.d.ts +0 -46
  125. package/esm/models/mappers.d.ts.map +0 -1
  126. package/esm/models/mappers.js.map +0 -1
  127. package/esm/models/operationsMappers.d.ts +0 -2
  128. package/esm/models/operationsMappers.d.ts.map +0 -1
  129. package/esm/models/operationsMappers.js +0 -9
  130. package/esm/models/operationsMappers.js.map +0 -1
  131. package/esm/models/parameters.d.ts +0 -17
  132. package/esm/models/parameters.d.ts.map +0 -1
  133. package/esm/models/parameters.js +0 -178
  134. package/esm/models/parameters.js.map +0 -1
  135. package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
  136. package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
  137. package/esm/models/privateEndpointConnectionsMappers.js +0 -9
  138. package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
  139. package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
  140. package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
  141. package/esm/models/privateLinkResourcesMappers.js +0 -9
  142. package/esm/models/privateLinkResourcesMappers.js.map +0 -1
  143. package/esm/models/secretsMappers.d.ts +0 -2
  144. package/esm/models/secretsMappers.d.ts.map +0 -1
  145. package/esm/models/secretsMappers.js +0 -9
  146. package/esm/models/secretsMappers.js.map +0 -1
  147. package/esm/models/vaultsMappers.d.ts +0 -2
  148. package/esm/models/vaultsMappers.d.ts.map +0 -1
  149. package/esm/models/vaultsMappers.js +0 -9
  150. package/esm/models/vaultsMappers.js.map +0 -1
  151. package/esm/operations/index.d.ts.map +0 -1
  152. package/esm/operations/index.js.map +0 -1
  153. package/esm/operations/operations.d.ts +0 -46
  154. package/esm/operations/operations.d.ts.map +0 -1
  155. package/esm/operations/operations.js +0 -77
  156. package/esm/operations/operations.js.map +0 -1
  157. package/esm/operations/privateEndpointConnections.d.ts +0 -91
  158. package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
  159. package/esm/operations/privateEndpointConnections.js +0 -164
  160. package/esm/operations/privateEndpointConnections.js.map +0 -1
  161. package/esm/operations/privateLinkResources.d.ts +0 -34
  162. package/esm/operations/privateLinkResources.d.ts.map +0 -1
  163. package/esm/operations/privateLinkResources.js +0 -58
  164. package/esm/operations/privateLinkResources.js.map +0 -1
  165. package/esm/operations/secrets.d.ts +0 -139
  166. package/esm/operations/secrets.d.ts.map +0 -1
  167. package/esm/operations/secrets.js +0 -201
  168. package/esm/operations/secrets.js.map +0 -1
  169. package/esm/operations/vaults.d.ts +0 -317
  170. package/esm/operations/vaults.d.ts.map +0 -1
  171. package/esm/operations/vaults.js +0 -557
  172. package/esm/operations/vaults.js.map +0 -1
  173. package/src/keyVaultManagementClientContext.ts +0 -69
  174. package/src/models/operationsMappers.ts +0 -16
  175. package/src/models/privateEndpointConnectionsMappers.ts +0 -40
  176. package/src/models/privateLinkResourcesMappers.ts +0 -39
  177. package/src/models/secretsMappers.ts +0 -39
  178. package/src/models/vaultsMappers.ts +0 -45
@@ -1,29 +1,38 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as msRestAzure from "@azure/ms-rest-azure-js";
13
- import * as Models from "../models";
14
- import * as Mappers from "../models/privateEndpointConnectionsMappers";
9
+ import { PrivateEndpointConnections } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
15
12
  import * as Parameters from "../models/parameters";
16
- import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext";
13
+ import { KeyVaultManagementClient } from "../keyVaultManagementClient";
14
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
15
+ import { LroImpl } from "../lroImpl";
16
+ import {
17
+ PrivateEndpointConnectionsGetOptionalParams,
18
+ PrivateEndpointConnectionsGetResponse,
19
+ PrivateEndpointConnection,
20
+ PrivateEndpointConnectionsPutOptionalParams,
21
+ PrivateEndpointConnectionsPutResponse,
22
+ PrivateEndpointConnectionsDeleteOptionalParams,
23
+ PrivateEndpointConnectionsDeleteResponse
24
+ } from "../models";
17
25
 
18
- /** Class representing a PrivateEndpointConnections. */
19
- export class PrivateEndpointConnections {
20
- private readonly client: KeyVaultManagementClientContext;
26
+ /** Class containing PrivateEndpointConnections operations. */
27
+ export class PrivateEndpointConnectionsImpl
28
+ implements PrivateEndpointConnections {
29
+ private readonly client: KeyVaultManagementClient;
21
30
 
22
31
  /**
23
- * Create a PrivateEndpointConnections.
24
- * @param {KeyVaultManagementClientContext} client Reference to the service client.
32
+ * Initialize a new instance of the class PrivateEndpointConnections class.
33
+ * @param client Reference to the service client
25
34
  */
26
- constructor(client: KeyVaultManagementClientContext) {
35
+ constructor(client: KeyVaultManagementClient) {
27
36
  this.client = client;
28
37
  }
29
38
 
@@ -31,72 +40,38 @@ export class PrivateEndpointConnections {
31
40
  * Gets the specified private endpoint connection associated with the key vault.
32
41
  * @param resourceGroupName Name of the resource group that contains the key vault.
33
42
  * @param vaultName The name of the key vault.
34
- * @param privateEndpointConnectionName Name of the private endpoint connection associated with the
35
- * key vault.
36
- * @param [options] The optional parameters
37
- * @returns Promise<Models.PrivateEndpointConnectionsGetResponse>
43
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key
44
+ * vault.
45
+ * @param options The options parameters.
38
46
  */
39
- get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsGetResponse>;
40
- /**
41
- * @param resourceGroupName Name of the resource group that contains the key vault.
42
- * @param vaultName The name of the key vault.
43
- * @param privateEndpointConnectionName Name of the private endpoint connection associated with the
44
- * key vault.
45
- * @param callback The callback
46
- */
47
- get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
48
- /**
49
- * @param resourceGroupName Name of the resource group that contains the key vault.
50
- * @param vaultName The name of the key vault.
51
- * @param privateEndpointConnectionName Name of the private endpoint connection associated with the
52
- * key vault.
53
- * @param options The optional parameters
54
- * @param callback The callback
55
- */
56
- get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
57
- get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnection>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnection>): Promise<Models.PrivateEndpointConnectionsGetResponse> {
47
+ get(
48
+ resourceGroupName: string,
49
+ vaultName: string,
50
+ privateEndpointConnectionName: string,
51
+ options?: PrivateEndpointConnectionsGetOptionalParams
52
+ ): Promise<PrivateEndpointConnectionsGetResponse> {
58
53
  return this.client.sendOperationRequest(
59
- {
60
- resourceGroupName,
61
- vaultName,
62
- privateEndpointConnectionName,
63
- options
64
- },
65
- getOperationSpec,
66
- callback) as Promise<Models.PrivateEndpointConnectionsGetResponse>;
54
+ { resourceGroupName, vaultName, privateEndpointConnectionName, options },
55
+ getOperationSpec
56
+ );
67
57
  }
68
58
 
69
59
  /**
70
60
  * Updates the specified private endpoint connection associated with the key vault.
71
61
  * @param resourceGroupName Name of the resource group that contains the key vault.
72
62
  * @param vaultName The name of the key vault.
73
- * @param privateEndpointConnectionName Name of the private endpoint connection associated with the
74
- * key vault.
75
- * @param properties The intended state of private endpoint connection.
76
- * @param [options] The optional parameters
77
- * @returns Promise<Models.PrivateEndpointConnectionsPutResponse>
78
- */
79
- put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsPutResponse>;
80
- /**
81
- * @param resourceGroupName Name of the resource group that contains the key vault.
82
- * @param vaultName The name of the key vault.
83
- * @param privateEndpointConnectionName Name of the private endpoint connection associated with the
84
- * key vault.
63
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key
64
+ * vault.
85
65
  * @param properties The intended state of private endpoint connection.
86
- * @param callback The callback
66
+ * @param options The options parameters.
87
67
  */
88
- put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
89
- /**
90
- * @param resourceGroupName Name of the resource group that contains the key vault.
91
- * @param vaultName The name of the key vault.
92
- * @param privateEndpointConnectionName Name of the private endpoint connection associated with the
93
- * key vault.
94
- * @param properties The intended state of private endpoint connection.
95
- * @param options The optional parameters
96
- * @param callback The callback
97
- */
98
- put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
99
- put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnection>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnection>): Promise<Models.PrivateEndpointConnectionsPutResponse> {
68
+ put(
69
+ resourceGroupName: string,
70
+ vaultName: string,
71
+ privateEndpointConnectionName: string,
72
+ properties: PrivateEndpointConnection,
73
+ options?: PrivateEndpointConnectionsPutOptionalParams
74
+ ): Promise<PrivateEndpointConnectionsPutResponse> {
100
75
  return this.client.sendOperationRequest(
101
76
  {
102
77
  resourceGroupName,
@@ -105,139 +80,184 @@ export class PrivateEndpointConnections {
105
80
  properties,
106
81
  options
107
82
  },
108
- putOperationSpec,
109
- callback) as Promise<Models.PrivateEndpointConnectionsPutResponse>;
83
+ putOperationSpec
84
+ );
110
85
  }
111
86
 
112
87
  /**
113
88
  * Deletes the specified private endpoint connection associated with the key vault.
114
89
  * @param resourceGroupName Name of the resource group that contains the key vault.
115
90
  * @param vaultName The name of the key vault.
116
- * @param privateEndpointConnectionName Name of the private endpoint connection associated with the
117
- * key vault.
118
- * @param [options] The optional parameters
119
- * @returns Promise<Models.PrivateEndpointConnectionsDeleteResponse>
91
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key
92
+ * vault.
93
+ * @param options The options parameters.
120
94
  */
121
- deleteMethod(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsDeleteResponse> {
122
- return this.beginDeleteMethod(resourceGroupName,vaultName,privateEndpointConnectionName,options)
123
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.PrivateEndpointConnectionsDeleteResponse>;
95
+ async beginDelete(
96
+ resourceGroupName: string,
97
+ vaultName: string,
98
+ privateEndpointConnectionName: string,
99
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
100
+ ): Promise<
101
+ PollerLike<
102
+ PollOperationState<PrivateEndpointConnectionsDeleteResponse>,
103
+ PrivateEndpointConnectionsDeleteResponse
104
+ >
105
+ > {
106
+ const directSendOperation = async (
107
+ args: coreClient.OperationArguments,
108
+ spec: coreClient.OperationSpec
109
+ ): Promise<PrivateEndpointConnectionsDeleteResponse> => {
110
+ return this.client.sendOperationRequest(args, spec);
111
+ };
112
+ const sendOperation = async (
113
+ args: coreClient.OperationArguments,
114
+ spec: coreClient.OperationSpec
115
+ ) => {
116
+ let currentRawResponse:
117
+ | coreClient.FullOperationResponse
118
+ | undefined = undefined;
119
+ const providedCallback = args.options?.onResponse;
120
+ const callback: coreClient.RawResponseCallback = (
121
+ rawResponse: coreClient.FullOperationResponse,
122
+ flatResponse: unknown
123
+ ) => {
124
+ currentRawResponse = rawResponse;
125
+ providedCallback?.(rawResponse, flatResponse);
126
+ };
127
+ const updatedArgs = {
128
+ ...args,
129
+ options: {
130
+ ...args.options,
131
+ onResponse: callback
132
+ }
133
+ };
134
+ const flatResponse = await directSendOperation(updatedArgs, spec);
135
+ return {
136
+ flatResponse,
137
+ rawResponse: {
138
+ statusCode: currentRawResponse!.status,
139
+ body: currentRawResponse!.parsedBody,
140
+ headers: currentRawResponse!.headers.toJSON()
141
+ }
142
+ };
143
+ };
144
+
145
+ const lro = new LroImpl(
146
+ sendOperation,
147
+ { resourceGroupName, vaultName, privateEndpointConnectionName, options },
148
+ deleteOperationSpec
149
+ );
150
+ return new LroEngine(lro, {
151
+ resumeFrom: options?.resumeFrom,
152
+ intervalInMs: options?.updateIntervalInMs
153
+ });
124
154
  }
125
155
 
126
156
  /**
127
157
  * Deletes the specified private endpoint connection associated with the key vault.
128
158
  * @param resourceGroupName Name of the resource group that contains the key vault.
129
159
  * @param vaultName The name of the key vault.
130
- * @param privateEndpointConnectionName Name of the private endpoint connection associated with the
131
- * key vault.
132
- * @param [options] The optional parameters
133
- * @returns Promise<msRestAzure.LROPoller>
160
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key
161
+ * vault.
162
+ * @param options The options parameters.
134
163
  */
135
- beginDeleteMethod(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
136
- return this.client.sendLRORequest(
137
- {
138
- resourceGroupName,
139
- vaultName,
140
- privateEndpointConnectionName,
141
- options
142
- },
143
- beginDeleteMethodOperationSpec,
144
- options);
164
+ async beginDeleteAndWait(
165
+ resourceGroupName: string,
166
+ vaultName: string,
167
+ privateEndpointConnectionName: string,
168
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
169
+ ): Promise<PrivateEndpointConnectionsDeleteResponse> {
170
+ const poller = await this.beginDelete(
171
+ resourceGroupName,
172
+ vaultName,
173
+ privateEndpointConnectionName,
174
+ options
175
+ );
176
+ return poller.pollUntilDone();
145
177
  }
146
178
  }
147
-
148
179
  // Operation Specifications
149
- const serializer = new msRest.Serializer(Mappers);
150
- const getOperationSpec: msRest.OperationSpec = {
180
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
181
+
182
+ const getOperationSpec: coreClient.OperationSpec = {
183
+ path:
184
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}",
151
185
  httpMethod: "GET",
152
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}",
153
- urlParameters: [
154
- Parameters.subscriptionId,
155
- Parameters.resourceGroupName,
156
- Parameters.vaultName0,
157
- Parameters.privateEndpointConnectionName
158
- ],
159
- queryParameters: [
160
- Parameters.apiVersion0
161
- ],
162
- headerParameters: [
163
- Parameters.acceptLanguage
164
- ],
165
186
  responses: {
166
187
  200: {
167
188
  bodyMapper: Mappers.PrivateEndpointConnection
168
189
  },
190
+ 204: {},
169
191
  default: {
170
192
  bodyMapper: Mappers.CloudError
171
193
  }
172
194
  },
173
- serializer
174
- };
175
-
176
- const putOperationSpec: msRest.OperationSpec = {
177
- httpMethod: "PUT",
178
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}",
195
+ queryParameters: [Parameters.apiVersion],
179
196
  urlParameters: [
180
- Parameters.subscriptionId,
197
+ Parameters.$host,
181
198
  Parameters.resourceGroupName,
182
- Parameters.vaultName0,
199
+ Parameters.vaultName,
200
+ Parameters.subscriptionId,
183
201
  Parameters.privateEndpointConnectionName
184
202
  ],
185
- queryParameters: [
186
- Parameters.apiVersion0
187
- ],
188
- headerParameters: [
189
- Parameters.acceptLanguage
190
- ],
191
- requestBody: {
192
- parameterPath: "properties",
193
- mapper: {
194
- ...Mappers.PrivateEndpointConnection,
195
- required: true
196
- }
197
- },
203
+ headerParameters: [Parameters.accept],
204
+ serializer
205
+ };
206
+ const putOperationSpec: coreClient.OperationSpec = {
207
+ path:
208
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}",
209
+ httpMethod: "PUT",
198
210
  responses: {
199
211
  200: {
200
212
  bodyMapper: Mappers.PrivateEndpointConnection,
201
213
  headersMapper: Mappers.PrivateEndpointConnectionsPutHeaders
202
214
  },
203
215
  default: {
204
- bodyMapper: Mappers.CloudError,
205
- headersMapper: Mappers.PrivateEndpointConnectionsPutHeaders
216
+ bodyMapper: Mappers.CloudError
206
217
  }
207
218
  },
208
- serializer
209
- };
210
-
211
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
212
- httpMethod: "DELETE",
213
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}",
219
+ requestBody: Parameters.properties,
220
+ queryParameters: [Parameters.apiVersion],
214
221
  urlParameters: [
215
- Parameters.subscriptionId,
222
+ Parameters.$host,
216
223
  Parameters.resourceGroupName,
217
- Parameters.vaultName0,
224
+ Parameters.vaultName,
225
+ Parameters.subscriptionId,
218
226
  Parameters.privateEndpointConnectionName
219
227
  ],
220
- queryParameters: [
221
- Parameters.apiVersion0
222
- ],
223
- headerParameters: [
224
- Parameters.acceptLanguage
225
- ],
228
+ headerParameters: [Parameters.contentType, Parameters.accept],
229
+ mediaType: "json",
230
+ serializer
231
+ };
232
+ const deleteOperationSpec: coreClient.OperationSpec = {
233
+ path:
234
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}",
235
+ httpMethod: "DELETE",
226
236
  responses: {
227
237
  200: {
228
- bodyMapper: Mappers.PrivateEndpointConnection,
229
- headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders
238
+ bodyMapper: Mappers.PrivateEndpointConnection
239
+ },
240
+ 201: {
241
+ bodyMapper: Mappers.PrivateEndpointConnection
230
242
  },
231
243
  202: {
232
- headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders
244
+ bodyMapper: Mappers.PrivateEndpointConnection
233
245
  },
234
246
  204: {
235
- headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders
247
+ bodyMapper: Mappers.PrivateEndpointConnection
236
248
  },
237
249
  default: {
238
- bodyMapper: Mappers.CloudError,
239
- headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders
250
+ bodyMapper: Mappers.CloudError
240
251
  }
241
252
  },
253
+ queryParameters: [Parameters.apiVersion],
254
+ urlParameters: [
255
+ Parameters.$host,
256
+ Parameters.resourceGroupName,
257
+ Parameters.vaultName,
258
+ Parameters.subscriptionId,
259
+ Parameters.privateEndpointConnectionName
260
+ ],
261
+ headerParameters: [Parameters.accept],
242
262
  serializer
243
263
  };
@@ -1,28 +1,30 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/privateLinkResourcesMappers";
9
+ import { PrivateLinkResources } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
14
12
  import * as Parameters from "../models/parameters";
15
- import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext";
13
+ import { KeyVaultManagementClient } from "../keyVaultManagementClient";
14
+ import {
15
+ PrivateLinkResourcesListByVaultOptionalParams,
16
+ PrivateLinkResourcesListByVaultResponse
17
+ } from "../models";
16
18
 
17
- /** Class representing a PrivateLinkResources. */
18
- export class PrivateLinkResources {
19
- private readonly client: KeyVaultManagementClientContext;
19
+ /** Class containing PrivateLinkResources operations. */
20
+ export class PrivateLinkResourcesImpl implements PrivateLinkResources {
21
+ private readonly client: KeyVaultManagementClient;
20
22
 
21
23
  /**
22
- * Create a PrivateLinkResources.
23
- * @param {KeyVaultManagementClientContext} client Reference to the service client.
24
+ * Initialize a new instance of the class PrivateLinkResources class.
25
+ * @param client Reference to the service client
24
26
  */
25
- constructor(client: KeyVaultManagementClientContext) {
27
+ constructor(client: KeyVaultManagementClient) {
26
28
  this.client = client;
27
29
  }
28
30
 
@@ -30,51 +32,26 @@ export class PrivateLinkResources {
30
32
  * Gets the private link resources supported for the key vault.
31
33
  * @param resourceGroupName Name of the resource group that contains the key vault.
32
34
  * @param vaultName The name of the key vault.
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.PrivateLinkResourcesListByVaultResponse>
35
+ * @param options The options parameters.
35
36
  */
36
- listByVault(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateLinkResourcesListByVaultResponse>;
37
- /**
38
- * @param resourceGroupName Name of the resource group that contains the key vault.
39
- * @param vaultName The name of the key vault.
40
- * @param callback The callback
41
- */
42
- listByVault(resourceGroupName: string, vaultName: string, callback: msRest.ServiceCallback<Models.PrivateLinkResourceListResult>): void;
43
- /**
44
- * @param resourceGroupName Name of the resource group that contains the key vault.
45
- * @param vaultName The name of the key vault.
46
- * @param options The optional parameters
47
- * @param callback The callback
48
- */
49
- listByVault(resourceGroupName: string, vaultName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateLinkResourceListResult>): void;
50
- listByVault(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateLinkResourceListResult>, callback?: msRest.ServiceCallback<Models.PrivateLinkResourceListResult>): Promise<Models.PrivateLinkResourcesListByVaultResponse> {
37
+ listByVault(
38
+ resourceGroupName: string,
39
+ vaultName: string,
40
+ options?: PrivateLinkResourcesListByVaultOptionalParams
41
+ ): Promise<PrivateLinkResourcesListByVaultResponse> {
51
42
  return this.client.sendOperationRequest(
52
- {
53
- resourceGroupName,
54
- vaultName,
55
- options
56
- },
57
- listByVaultOperationSpec,
58
- callback) as Promise<Models.PrivateLinkResourcesListByVaultResponse>;
43
+ { resourceGroupName, vaultName, options },
44
+ listByVaultOperationSpec
45
+ );
59
46
  }
60
47
  }
61
-
62
48
  // Operation Specifications
63
- const serializer = new msRest.Serializer(Mappers);
64
- const listByVaultOperationSpec: msRest.OperationSpec = {
49
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
50
+
51
+ const listByVaultOperationSpec: coreClient.OperationSpec = {
52
+ path:
53
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateLinkResources",
65
54
  httpMethod: "GET",
66
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateLinkResources",
67
- urlParameters: [
68
- Parameters.subscriptionId,
69
- Parameters.resourceGroupName,
70
- Parameters.vaultName0
71
- ],
72
- queryParameters: [
73
- Parameters.apiVersion0
74
- ],
75
- headerParameters: [
76
- Parameters.acceptLanguage
77
- ],
78
55
  responses: {
79
56
  200: {
80
57
  bodyMapper: Mappers.PrivateLinkResourceListResult
@@ -83,5 +60,13 @@ const listByVaultOperationSpec: msRest.OperationSpec = {
83
60
  bodyMapper: Mappers.CloudError
84
61
  }
85
62
  },
63
+ queryParameters: [Parameters.apiVersion],
64
+ urlParameters: [
65
+ Parameters.$host,
66
+ Parameters.resourceGroupName,
67
+ Parameters.vaultName,
68
+ Parameters.subscriptionId
69
+ ],
70
+ headerParameters: [Parameters.accept],
86
71
  serializer
87
72
  };