@azure/arm-containerinstance 6.3.0 → 8.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 (154) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +70 -78
  4. package/dist/index.js +3335 -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/containerInstanceManagementClient.d.ts +22 -0
  9. package/dist-esm/src/containerInstanceManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/containerInstanceManagementClient.js +55 -0
  11. package/dist-esm/src/containerInstanceManagementClient.js.map +1 -0
  12. package/dist-esm/src/index.d.ts +5 -0
  13. package/dist-esm/src/index.d.ts.map +1 -0
  14. package/dist-esm/src/index.js +12 -0
  15. package/dist-esm/src/index.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 +964 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +70 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +54 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/mappers.js +799 -788
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +17 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/models/parameters.js +67 -37
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/dist-esm/src/operations/containerGroups.d.ts +159 -0
  33. package/dist-esm/src/operations/containerGroups.d.ts.map +1 -0
  34. package/dist-esm/src/operations/containerGroups.js +678 -0
  35. package/dist-esm/src/operations/containerGroups.js.map +1 -0
  36. package/dist-esm/src/operations/containers.d.ts +40 -0
  37. package/dist-esm/src/operations/containers.d.ts.map +1 -0
  38. package/dist-esm/src/operations/containers.js +134 -0
  39. package/dist-esm/src/operations/containers.js.map +1 -0
  40. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  41. package/dist-esm/src/operations/index.d.ts.map +1 -0
  42. package/{esm → dist-esm/src}/operations/index.js +1 -2
  43. package/dist-esm/src/operations/index.js.map +1 -0
  44. package/dist-esm/src/operations/location.d.ts +70 -0
  45. package/dist-esm/src/operations/location.d.ts.map +1 -0
  46. package/dist-esm/src/operations/location.js +310 -0
  47. package/dist-esm/src/operations/location.js.map +1 -0
  48. package/dist-esm/src/operations/operations.d.ts +32 -0
  49. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  50. package/dist-esm/src/operations/operations.js +120 -0
  51. package/dist-esm/src/operations/operations.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/containerGroups.d.ts +119 -0
  53. package/dist-esm/src/operationsInterfaces/containerGroups.d.ts.map +1 -0
  54. package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/containerGroups.js} +2 -7
  55. package/dist-esm/src/operationsInterfaces/containerGroups.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/containers.d.ts +32 -0
  57. package/dist-esm/src/operationsInterfaces/containers.d.ts.map +1 -0
  58. package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/containers.js} +2 -2
  59. package/dist-esm/src/operationsInterfaces/containers.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
  61. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/index.js +12 -0
  63. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/location.d.ts +24 -0
  65. package/dist-esm/src/operationsInterfaces/location.d.ts.map +1 -0
  66. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/location.js} +2 -1
  67. package/dist-esm/src/operationsInterfaces/location.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  69. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  70. package/{src/models/containersMappers.ts → dist-esm/src/operationsInterfaces/operations.js} +2 -9
  71. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  72. package/dist-esm/test/containerinstance_examples.d.ts +4 -0
  73. package/dist-esm/test/containerinstance_examples.d.ts.map +1 -0
  74. package/dist-esm/test/containerinstance_examples.js +156 -0
  75. package/dist-esm/test/containerinstance_examples.js.map +1 -0
  76. package/package.json +65 -32
  77. package/review/arm-containerinstance.api.md +752 -0
  78. package/rollup.config.js +181 -30
  79. package/src/containerInstanceManagementClient.ts +78 -40
  80. package/src/index.ts +12 -0
  81. package/src/lroImpl.ts +34 -0
  82. package/src/models/index.ts +734 -1215
  83. package/src/models/mappers.ts +808 -793
  84. package/src/models/parameters.ts +90 -38
  85. package/src/operations/containerGroups.ts +660 -424
  86. package/src/operations/containers.ts +89 -143
  87. package/src/operations/index.ts +1 -2
  88. package/src/operations/location.ts +262 -179
  89. package/src/operations/operations.ts +85 -73
  90. package/src/operationsInterfaces/containerGroups.ts +212 -0
  91. package/src/operationsInterfaces/containers.ts +64 -0
  92. package/src/operationsInterfaces/index.ts +12 -0
  93. package/src/operationsInterfaces/location.ts +49 -0
  94. package/src/operationsInterfaces/operations.ts +22 -0
  95. package/tsconfig.json +3 -3
  96. package/types/arm-containerinstance.d.ts +1282 -0
  97. package/types/tsdoc-metadata.json +11 -0
  98. package/dist/arm-containerinstance.js +0 -3019
  99. package/dist/arm-containerinstance.js.map +0 -1
  100. package/dist/arm-containerinstance.min.js +0 -1
  101. package/dist/arm-containerinstance.min.js.map +0 -1
  102. package/esm/containerInstanceManagementClient.d.ts +0 -28
  103. package/esm/containerInstanceManagementClient.d.ts.map +0 -1
  104. package/esm/containerInstanceManagementClient.js +0 -41
  105. package/esm/containerInstanceManagementClient.js.map +0 -1
  106. package/esm/containerInstanceManagementClientContext.d.ts +0 -23
  107. package/esm/containerInstanceManagementClientContext.d.ts.map +0 -1
  108. package/esm/containerInstanceManagementClientContext.js +0 -61
  109. package/esm/containerInstanceManagementClientContext.js.map +0 -1
  110. package/esm/models/containerGroupsMappers.d.ts +0 -2
  111. package/esm/models/containerGroupsMappers.d.ts.map +0 -1
  112. package/esm/models/containerGroupsMappers.js +0 -9
  113. package/esm/models/containerGroupsMappers.js.map +0 -1
  114. package/esm/models/containersMappers.d.ts +0 -2
  115. package/esm/models/containersMappers.d.ts.map +0 -1
  116. package/esm/models/containersMappers.js +0 -9
  117. package/esm/models/containersMappers.js.map +0 -1
  118. package/esm/models/index.d.ts +0 -1469
  119. package/esm/models/index.d.ts.map +0 -1
  120. package/esm/models/index.js.map +0 -1
  121. package/esm/models/locationMappers.d.ts +0 -2
  122. package/esm/models/locationMappers.d.ts.map +0 -1
  123. package/esm/models/locationMappers.js +0 -9
  124. package/esm/models/locationMappers.js.map +0 -1
  125. package/esm/models/mappers.d.ts +0 -54
  126. package/esm/models/mappers.d.ts.map +0 -1
  127. package/esm/models/mappers.js.map +0 -1
  128. package/esm/models/operationsMappers.d.ts +0 -2
  129. package/esm/models/operationsMappers.d.ts.map +0 -1
  130. package/esm/models/operationsMappers.js.map +0 -1
  131. package/esm/models/parameters.d.ts +0 -12
  132. package/esm/models/parameters.d.ts.map +0 -1
  133. package/esm/models/parameters.js.map +0 -1
  134. package/esm/operations/containerGroups.d.ts +0 -247
  135. package/esm/operations/containerGroups.d.ts.map +0 -1
  136. package/esm/operations/containerGroups.js +0 -455
  137. package/esm/operations/containerGroups.js.map +0 -1
  138. package/esm/operations/containers.d.ts +0 -94
  139. package/esm/operations/containers.d.ts.map +0 -1
  140. package/esm/operations/containers.js +0 -133
  141. package/esm/operations/containers.js.map +0 -1
  142. package/esm/operations/index.d.ts.map +0 -1
  143. package/esm/operations/index.js.map +0 -1
  144. package/esm/operations/location.d.ts +0 -107
  145. package/esm/operations/location.d.ts.map +0 -1
  146. package/esm/operations/location.js +0 -171
  147. package/esm/operations/location.js.map +0 -1
  148. package/esm/operations/operations.d.ts +0 -46
  149. package/esm/operations/operations.d.ts.map +0 -1
  150. package/esm/operations/operations.js +0 -79
  151. package/esm/operations/operations.js.map +0 -1
  152. package/src/containerInstanceManagementClientContext.ts +0 -68
  153. package/src/models/containerGroupsMappers.ts +0 -46
  154. package/src/models/locationMappers.ts +0 -19
@@ -3,407 +3,638 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as msRestAzure from "@azure/ms-rest-azure-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/containerGroupsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { ContainerGroups } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
14
13
  import * as Parameters from "../models/parameters";
15
- import { ContainerInstanceManagementClientContext } from "../containerInstanceManagementClientContext";
14
+ import { ContainerInstanceManagementClient } from "../containerInstanceManagementClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ ContainerGroup,
19
+ ContainerGroupsListNextOptionalParams,
20
+ ContainerGroupsListOptionalParams,
21
+ ContainerGroupsListByResourceGroupNextOptionalParams,
22
+ ContainerGroupsListByResourceGroupOptionalParams,
23
+ ContainerGroupsListResponse,
24
+ ContainerGroupsListByResourceGroupResponse,
25
+ ContainerGroupsGetOptionalParams,
26
+ ContainerGroupsGetResponse,
27
+ ContainerGroupsCreateOrUpdateOptionalParams,
28
+ ContainerGroupsCreateOrUpdateResponse,
29
+ Resource,
30
+ ContainerGroupsUpdateOptionalParams,
31
+ ContainerGroupsUpdateResponse,
32
+ ContainerGroupsDeleteOptionalParams,
33
+ ContainerGroupsDeleteResponse,
34
+ ContainerGroupsRestartOptionalParams,
35
+ ContainerGroupsStopOptionalParams,
36
+ ContainerGroupsStartOptionalParams,
37
+ ContainerGroupsGetOutboundNetworkDependenciesEndpointsOptionalParams,
38
+ ContainerGroupsGetOutboundNetworkDependenciesEndpointsResponse,
39
+ ContainerGroupsListNextResponse,
40
+ ContainerGroupsListByResourceGroupNextResponse
41
+ } from "../models";
16
42
 
17
- /** Class representing a ContainerGroups. */
18
- export class ContainerGroups {
19
- private readonly client: ContainerInstanceManagementClientContext;
43
+ /// <reference lib="esnext.asynciterable" />
44
+ /** Class containing ContainerGroups operations. */
45
+ export class ContainerGroupsImpl implements ContainerGroups {
46
+ private readonly client: ContainerInstanceManagementClient;
20
47
 
21
48
  /**
22
- * Create a ContainerGroups.
23
- * @param {ContainerInstanceManagementClientContext} client Reference to the service client.
49
+ * Initialize a new instance of the class ContainerGroups class.
50
+ * @param client Reference to the service client
24
51
  */
25
- constructor(client: ContainerInstanceManagementClientContext) {
52
+ constructor(client: ContainerInstanceManagementClient) {
26
53
  this.client = client;
27
54
  }
28
55
 
29
56
  /**
30
- * Get a list of container groups in the specified subscription. This operation returns properties
31
- * of each container group including containers, image registry credentials, restart policy, IP
32
- * address type, OS type, state, and volumes.
33
- * @summary Get a list of container groups in the specified subscription.
34
- * @param [options] The optional parameters
35
- * @returns Promise<Models.ContainerGroupsListResponse>
57
+ * Get a list of container groups in the specified subscription. This operation returns properties of
58
+ * each container group including containers, image registry credentials, restart policy, IP address
59
+ * type, OS type, state, and volumes.
60
+ * @param options The options parameters.
36
61
  */
37
- list(options?: msRest.RequestOptionsBase): Promise<Models.ContainerGroupsListResponse>;
38
- /**
39
- * @param callback The callback
40
- */
41
- list(callback: msRest.ServiceCallback<Models.ContainerGroupListResult>): void;
42
- /**
43
- * @param options The optional parameters
44
- * @param callback The callback
45
- */
46
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerGroupListResult>): void;
47
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerGroupListResult>, callback?: msRest.ServiceCallback<Models.ContainerGroupListResult>): Promise<Models.ContainerGroupsListResponse> {
48
- return this.client.sendOperationRequest(
49
- {
50
- options
62
+ public list(
63
+ options?: ContainerGroupsListOptionalParams
64
+ ): PagedAsyncIterableIterator<ContainerGroup> {
65
+ const iter = this.listPagingAll(options);
66
+ return {
67
+ next() {
68
+ return iter.next();
69
+ },
70
+ [Symbol.asyncIterator]() {
71
+ return this;
51
72
  },
52
- listOperationSpec,
53
- callback) as Promise<Models.ContainerGroupsListResponse>;
73
+ byPage: () => {
74
+ return this.listPagingPage(options);
75
+ }
76
+ };
77
+ }
78
+
79
+ private async *listPagingPage(
80
+ options?: ContainerGroupsListOptionalParams
81
+ ): AsyncIterableIterator<ContainerGroup[]> {
82
+ let result = await this._list(options);
83
+ yield result.value || [];
84
+ let continuationToken = result.nextLink;
85
+ while (continuationToken) {
86
+ result = await this._listNext(continuationToken, options);
87
+ continuationToken = result.nextLink;
88
+ yield result.value || [];
89
+ }
90
+ }
91
+
92
+ private async *listPagingAll(
93
+ options?: ContainerGroupsListOptionalParams
94
+ ): AsyncIterableIterator<ContainerGroup> {
95
+ for await (const page of this.listPagingPage(options)) {
96
+ yield* page;
97
+ }
54
98
  }
55
99
 
56
100
  /**
57
101
  * Get a list of container groups in a specified subscription and resource group. This operation
58
- * returns properties of each container group including containers, image registry credentials,
59
- * restart policy, IP address type, OS type, state, and volumes.
60
- * @summary Get a list of container groups in the specified subscription and resource group.
102
+ * returns properties of each container group including containers, image registry credentials, restart
103
+ * policy, IP address type, OS type, state, and volumes.
61
104
  * @param resourceGroupName The name of the resource group.
62
- * @param [options] The optional parameters
63
- * @returns Promise<Models.ContainerGroupsListByResourceGroupResponse>
105
+ * @param options The options parameters.
64
106
  */
65
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.ContainerGroupsListByResourceGroupResponse>;
107
+ public listByResourceGroup(
108
+ resourceGroupName: string,
109
+ options?: ContainerGroupsListByResourceGroupOptionalParams
110
+ ): PagedAsyncIterableIterator<ContainerGroup> {
111
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
112
+ return {
113
+ next() {
114
+ return iter.next();
115
+ },
116
+ [Symbol.asyncIterator]() {
117
+ return this;
118
+ },
119
+ byPage: () => {
120
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
121
+ }
122
+ };
123
+ }
124
+
125
+ private async *listByResourceGroupPagingPage(
126
+ resourceGroupName: string,
127
+ options?: ContainerGroupsListByResourceGroupOptionalParams
128
+ ): AsyncIterableIterator<ContainerGroup[]> {
129
+ let result = await this._listByResourceGroup(resourceGroupName, options);
130
+ yield result.value || [];
131
+ let continuationToken = result.nextLink;
132
+ while (continuationToken) {
133
+ result = await this._listByResourceGroupNext(
134
+ resourceGroupName,
135
+ continuationToken,
136
+ options
137
+ );
138
+ continuationToken = result.nextLink;
139
+ yield result.value || [];
140
+ }
141
+ }
142
+
143
+ private async *listByResourceGroupPagingAll(
144
+ resourceGroupName: string,
145
+ options?: ContainerGroupsListByResourceGroupOptionalParams
146
+ ): AsyncIterableIterator<ContainerGroup> {
147
+ for await (const page of this.listByResourceGroupPagingPage(
148
+ resourceGroupName,
149
+ options
150
+ )) {
151
+ yield* page;
152
+ }
153
+ }
154
+
66
155
  /**
67
- * @param resourceGroupName The name of the resource group.
68
- * @param callback The callback
156
+ * Get a list of container groups in the specified subscription. This operation returns properties of
157
+ * each container group including containers, image registry credentials, restart policy, IP address
158
+ * type, OS type, state, and volumes.
159
+ * @param options The options parameters.
69
160
  */
70
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.ContainerGroupListResult>): void;
161
+ private _list(
162
+ options?: ContainerGroupsListOptionalParams
163
+ ): Promise<ContainerGroupsListResponse> {
164
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
165
+ }
166
+
71
167
  /**
168
+ * Get a list of container groups in a specified subscription and resource group. This operation
169
+ * returns properties of each container group including containers, image registry credentials, restart
170
+ * policy, IP address type, OS type, state, and volumes.
72
171
  * @param resourceGroupName The name of the resource group.
73
- * @param options The optional parameters
74
- * @param callback The callback
172
+ * @param options The options parameters.
75
173
  */
76
- listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerGroupListResult>): void;
77
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerGroupListResult>, callback?: msRest.ServiceCallback<Models.ContainerGroupListResult>): Promise<Models.ContainerGroupsListByResourceGroupResponse> {
174
+ private _listByResourceGroup(
175
+ resourceGroupName: string,
176
+ options?: ContainerGroupsListByResourceGroupOptionalParams
177
+ ): Promise<ContainerGroupsListByResourceGroupResponse> {
78
178
  return this.client.sendOperationRequest(
79
- {
80
- resourceGroupName,
81
- options
82
- },
83
- listByResourceGroupOperationSpec,
84
- callback) as Promise<Models.ContainerGroupsListByResourceGroupResponse>;
179
+ { resourceGroupName, options },
180
+ listByResourceGroupOperationSpec
181
+ );
85
182
  }
86
183
 
87
184
  /**
88
185
  * Gets the properties of the specified container group in the specified subscription and resource
89
186
  * group. The operation returns the properties of each container group including containers, image
90
187
  * registry credentials, restart policy, IP address type, OS type, state, and volumes.
91
- * @summary Get the properties of the specified container group.
92
188
  * @param resourceGroupName The name of the resource group.
93
189
  * @param containerGroupName The name of the container group.
94
- * @param [options] The optional parameters
95
- * @returns Promise<Models.ContainerGroupsGetResponse>
190
+ * @param options The options parameters.
96
191
  */
97
- get(resourceGroupName: string, containerGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.ContainerGroupsGetResponse>;
98
- /**
99
- * @param resourceGroupName The name of the resource group.
100
- * @param containerGroupName The name of the container group.
101
- * @param callback The callback
102
- */
103
- get(resourceGroupName: string, containerGroupName: string, callback: msRest.ServiceCallback<Models.ContainerGroup>): void;
104
- /**
105
- * @param resourceGroupName The name of the resource group.
106
- * @param containerGroupName The name of the container group.
107
- * @param options The optional parameters
108
- * @param callback The callback
109
- */
110
- get(resourceGroupName: string, containerGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerGroup>): void;
111
- get(resourceGroupName: string, containerGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerGroup>, callback?: msRest.ServiceCallback<Models.ContainerGroup>): Promise<Models.ContainerGroupsGetResponse> {
192
+ get(
193
+ resourceGroupName: string,
194
+ containerGroupName: string,
195
+ options?: ContainerGroupsGetOptionalParams
196
+ ): Promise<ContainerGroupsGetResponse> {
112
197
  return this.client.sendOperationRequest(
113
- {
114
- resourceGroupName,
115
- containerGroupName,
116
- options
117
- },
118
- getOperationSpec,
119
- callback) as Promise<Models.ContainerGroupsGetResponse>;
198
+ { resourceGroupName, containerGroupName, options },
199
+ getOperationSpec
200
+ );
120
201
  }
121
202
 
122
203
  /**
123
204
  * Create or update container groups with specified configurations.
124
- * @summary Create or update container groups.
125
205
  * @param resourceGroupName The name of the resource group.
126
206
  * @param containerGroupName The name of the container group.
127
207
  * @param containerGroup The properties of the container group to be created or updated.
128
- * @param [options] The optional parameters
129
- * @returns Promise<Models.ContainerGroupsCreateOrUpdateResponse>
208
+ * @param options The options parameters.
130
209
  */
131
- createOrUpdate(resourceGroupName: string, containerGroupName: string, containerGroup: Models.ContainerGroup, options?: msRest.RequestOptionsBase): Promise<Models.ContainerGroupsCreateOrUpdateResponse> {
132
- return this.beginCreateOrUpdate(resourceGroupName,containerGroupName,containerGroup,options)
133
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ContainerGroupsCreateOrUpdateResponse>;
210
+ async beginCreateOrUpdate(
211
+ resourceGroupName: string,
212
+ containerGroupName: string,
213
+ containerGroup: ContainerGroup,
214
+ options?: ContainerGroupsCreateOrUpdateOptionalParams
215
+ ): Promise<
216
+ PollerLike<
217
+ PollOperationState<ContainerGroupsCreateOrUpdateResponse>,
218
+ ContainerGroupsCreateOrUpdateResponse
219
+ >
220
+ > {
221
+ const directSendOperation = async (
222
+ args: coreClient.OperationArguments,
223
+ spec: coreClient.OperationSpec
224
+ ): Promise<ContainerGroupsCreateOrUpdateResponse> => {
225
+ return this.client.sendOperationRequest(args, spec);
226
+ };
227
+ const sendOperation = async (
228
+ args: coreClient.OperationArguments,
229
+ spec: coreClient.OperationSpec
230
+ ) => {
231
+ let currentRawResponse:
232
+ | coreClient.FullOperationResponse
233
+ | undefined = undefined;
234
+ const providedCallback = args.options?.onResponse;
235
+ const callback: coreClient.RawResponseCallback = (
236
+ rawResponse: coreClient.FullOperationResponse,
237
+ flatResponse: unknown
238
+ ) => {
239
+ currentRawResponse = rawResponse;
240
+ providedCallback?.(rawResponse, flatResponse);
241
+ };
242
+ const updatedArgs = {
243
+ ...args,
244
+ options: {
245
+ ...args.options,
246
+ onResponse: callback
247
+ }
248
+ };
249
+ const flatResponse = await directSendOperation(updatedArgs, spec);
250
+ return {
251
+ flatResponse,
252
+ rawResponse: {
253
+ statusCode: currentRawResponse!.status,
254
+ body: currentRawResponse!.parsedBody,
255
+ headers: currentRawResponse!.headers.toJSON()
256
+ }
257
+ };
258
+ };
259
+
260
+ const lro = new LroImpl(
261
+ sendOperation,
262
+ { resourceGroupName, containerGroupName, containerGroup, options },
263
+ createOrUpdateOperationSpec
264
+ );
265
+ return new LroEngine(lro, {
266
+ resumeFrom: options?.resumeFrom,
267
+ intervalInMs: options?.updateIntervalInMs
268
+ });
134
269
  }
135
270
 
136
271
  /**
137
- * Updates container group tags with specified values.
138
- * @summary Update container groups.
272
+ * Create or update container groups with specified configurations.
139
273
  * @param resourceGroupName The name of the resource group.
140
274
  * @param containerGroupName The name of the container group.
141
- * @param resource The container group resource with just the tags to be updated.
142
- * @param [options] The optional parameters
143
- * @returns Promise<Models.ContainerGroupsUpdateResponse>
275
+ * @param containerGroup The properties of the container group to be created or updated.
276
+ * @param options The options parameters.
144
277
  */
145
- update(resourceGroupName: string, containerGroupName: string, resource: Models.Resource, options?: msRest.RequestOptionsBase): Promise<Models.ContainerGroupsUpdateResponse>;
278
+ async beginCreateOrUpdateAndWait(
279
+ resourceGroupName: string,
280
+ containerGroupName: string,
281
+ containerGroup: ContainerGroup,
282
+ options?: ContainerGroupsCreateOrUpdateOptionalParams
283
+ ): Promise<ContainerGroupsCreateOrUpdateResponse> {
284
+ const poller = await this.beginCreateOrUpdate(
285
+ resourceGroupName,
286
+ containerGroupName,
287
+ containerGroup,
288
+ options
289
+ );
290
+ return poller.pollUntilDone();
291
+ }
292
+
146
293
  /**
294
+ * Updates container group tags with specified values.
147
295
  * @param resourceGroupName The name of the resource group.
148
296
  * @param containerGroupName The name of the container group.
149
297
  * @param resource The container group resource with just the tags to be updated.
150
- * @param callback The callback
298
+ * @param options The options parameters.
151
299
  */
152
- update(resourceGroupName: string, containerGroupName: string, resource: Models.Resource, callback: msRest.ServiceCallback<Models.ContainerGroup>): void;
300
+ update(
301
+ resourceGroupName: string,
302
+ containerGroupName: string,
303
+ resource: Resource,
304
+ options?: ContainerGroupsUpdateOptionalParams
305
+ ): Promise<ContainerGroupsUpdateResponse> {
306
+ return this.client.sendOperationRequest(
307
+ { resourceGroupName, containerGroupName, resource, options },
308
+ updateOperationSpec
309
+ );
310
+ }
311
+
153
312
  /**
313
+ * Delete the specified container group in the specified subscription and resource group. The operation
314
+ * does not delete other resources provided by the user, such as volumes.
154
315
  * @param resourceGroupName The name of the resource group.
155
316
  * @param containerGroupName The name of the container group.
156
- * @param resource The container group resource with just the tags to be updated.
157
- * @param options The optional parameters
158
- * @param callback The callback
317
+ * @param options The options parameters.
159
318
  */
160
- update(resourceGroupName: string, containerGroupName: string, resource: Models.Resource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerGroup>): void;
161
- update(resourceGroupName: string, containerGroupName: string, resource: Models.Resource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerGroup>, callback?: msRest.ServiceCallback<Models.ContainerGroup>): Promise<Models.ContainerGroupsUpdateResponse> {
162
- return this.client.sendOperationRequest(
163
- {
164
- resourceGroupName,
165
- containerGroupName,
166
- resource,
167
- options
168
- },
169
- updateOperationSpec,
170
- callback) as Promise<Models.ContainerGroupsUpdateResponse>;
319
+ async beginDelete(
320
+ resourceGroupName: string,
321
+ containerGroupName: string,
322
+ options?: ContainerGroupsDeleteOptionalParams
323
+ ): Promise<
324
+ PollerLike<
325
+ PollOperationState<ContainerGroupsDeleteResponse>,
326
+ ContainerGroupsDeleteResponse
327
+ >
328
+ > {
329
+ const directSendOperation = async (
330
+ args: coreClient.OperationArguments,
331
+ spec: coreClient.OperationSpec
332
+ ): Promise<ContainerGroupsDeleteResponse> => {
333
+ return this.client.sendOperationRequest(args, spec);
334
+ };
335
+ const sendOperation = async (
336
+ args: coreClient.OperationArguments,
337
+ spec: coreClient.OperationSpec
338
+ ) => {
339
+ let currentRawResponse:
340
+ | coreClient.FullOperationResponse
341
+ | undefined = undefined;
342
+ const providedCallback = args.options?.onResponse;
343
+ const callback: coreClient.RawResponseCallback = (
344
+ rawResponse: coreClient.FullOperationResponse,
345
+ flatResponse: unknown
346
+ ) => {
347
+ currentRawResponse = rawResponse;
348
+ providedCallback?.(rawResponse, flatResponse);
349
+ };
350
+ const updatedArgs = {
351
+ ...args,
352
+ options: {
353
+ ...args.options,
354
+ onResponse: callback
355
+ }
356
+ };
357
+ const flatResponse = await directSendOperation(updatedArgs, spec);
358
+ return {
359
+ flatResponse,
360
+ rawResponse: {
361
+ statusCode: currentRawResponse!.status,
362
+ body: currentRawResponse!.parsedBody,
363
+ headers: currentRawResponse!.headers.toJSON()
364
+ }
365
+ };
366
+ };
367
+
368
+ const lro = new LroImpl(
369
+ sendOperation,
370
+ { resourceGroupName, containerGroupName, options },
371
+ deleteOperationSpec
372
+ );
373
+ return new LroEngine(lro, {
374
+ resumeFrom: options?.resumeFrom,
375
+ intervalInMs: options?.updateIntervalInMs
376
+ });
171
377
  }
172
378
 
173
379
  /**
174
- * Delete the specified container group in the specified subscription and resource group. The
175
- * operation does not delete other resources provided by the user, such as volumes.
176
- * @summary Delete the specified container group.
380
+ * Delete the specified container group in the specified subscription and resource group. The operation
381
+ * does not delete other resources provided by the user, such as volumes.
177
382
  * @param resourceGroupName The name of the resource group.
178
383
  * @param containerGroupName The name of the container group.
179
- * @param [options] The optional parameters
180
- * @returns Promise<Models.ContainerGroupsDeleteMethodResponse>
384
+ * @param options The options parameters.
181
385
  */
182
- deleteMethod(resourceGroupName: string, containerGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.ContainerGroupsDeleteMethodResponse> {
183
- return this.beginDeleteMethod(resourceGroupName,containerGroupName,options)
184
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ContainerGroupsDeleteMethodResponse>;
386
+ async beginDeleteAndWait(
387
+ resourceGroupName: string,
388
+ containerGroupName: string,
389
+ options?: ContainerGroupsDeleteOptionalParams
390
+ ): Promise<ContainerGroupsDeleteResponse> {
391
+ const poller = await this.beginDelete(
392
+ resourceGroupName,
393
+ containerGroupName,
394
+ options
395
+ );
396
+ return poller.pollUntilDone();
185
397
  }
186
398
 
187
399
  /**
188
400
  * Restarts all containers in a container group in place. If container image has updates, new image
189
401
  * will be downloaded.
190
- * @summary Restarts all containers in a container group.
191
402
  * @param resourceGroupName The name of the resource group.
192
403
  * @param containerGroupName The name of the container group.
193
- * @param [options] The optional parameters
194
- * @returns Promise<msRest.RestResponse>
404
+ * @param options The options parameters.
195
405
  */
196
- restart(resourceGroupName: string, containerGroupName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
197
- return this.beginRestart(resourceGroupName,containerGroupName,options)
198
- .then(lroPoller => lroPoller.pollUntilFinished());
406
+ async beginRestart(
407
+ resourceGroupName: string,
408
+ containerGroupName: string,
409
+ options?: ContainerGroupsRestartOptionalParams
410
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
411
+ const directSendOperation = async (
412
+ args: coreClient.OperationArguments,
413
+ spec: coreClient.OperationSpec
414
+ ): Promise<void> => {
415
+ return this.client.sendOperationRequest(args, spec);
416
+ };
417
+ const sendOperation = async (
418
+ args: coreClient.OperationArguments,
419
+ spec: coreClient.OperationSpec
420
+ ) => {
421
+ let currentRawResponse:
422
+ | coreClient.FullOperationResponse
423
+ | undefined = undefined;
424
+ const providedCallback = args.options?.onResponse;
425
+ const callback: coreClient.RawResponseCallback = (
426
+ rawResponse: coreClient.FullOperationResponse,
427
+ flatResponse: unknown
428
+ ) => {
429
+ currentRawResponse = rawResponse;
430
+ providedCallback?.(rawResponse, flatResponse);
431
+ };
432
+ const updatedArgs = {
433
+ ...args,
434
+ options: {
435
+ ...args.options,
436
+ onResponse: callback
437
+ }
438
+ };
439
+ const flatResponse = await directSendOperation(updatedArgs, spec);
440
+ return {
441
+ flatResponse,
442
+ rawResponse: {
443
+ statusCode: currentRawResponse!.status,
444
+ body: currentRawResponse!.parsedBody,
445
+ headers: currentRawResponse!.headers.toJSON()
446
+ }
447
+ };
448
+ };
449
+
450
+ const lro = new LroImpl(
451
+ sendOperation,
452
+ { resourceGroupName, containerGroupName, options },
453
+ restartOperationSpec
454
+ );
455
+ return new LroEngine(lro, {
456
+ resumeFrom: options?.resumeFrom,
457
+ intervalInMs: options?.updateIntervalInMs
458
+ });
199
459
  }
200
460
 
201
461
  /**
202
- * Stops all containers in a container group. Compute resources will be deallocated and billing
203
- * will stop.
204
- * @summary Stops all containers in a container group.
205
- * @param resourceGroupName The name of the resource group.
206
- * @param containerGroupName The name of the container group.
207
- * @param [options] The optional parameters
208
- * @returns Promise<msRest.RestResponse>
209
- */
210
- stop(resourceGroupName: string, containerGroupName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
211
- /**
462
+ * Restarts all containers in a container group in place. If container image has updates, new image
463
+ * will be downloaded.
212
464
  * @param resourceGroupName The name of the resource group.
213
465
  * @param containerGroupName The name of the container group.
214
- * @param callback The callback
466
+ * @param options The options parameters.
215
467
  */
216
- stop(resourceGroupName: string, containerGroupName: string, callback: msRest.ServiceCallback<void>): void;
468
+ async beginRestartAndWait(
469
+ resourceGroupName: string,
470
+ containerGroupName: string,
471
+ options?: ContainerGroupsRestartOptionalParams
472
+ ): Promise<void> {
473
+ const poller = await this.beginRestart(
474
+ resourceGroupName,
475
+ containerGroupName,
476
+ options
477
+ );
478
+ return poller.pollUntilDone();
479
+ }
480
+
217
481
  /**
482
+ * Stops all containers in a container group. Compute resources will be deallocated and billing will
483
+ * stop.
218
484
  * @param resourceGroupName The name of the resource group.
219
485
  * @param containerGroupName The name of the container group.
220
- * @param options The optional parameters
221
- * @param callback The callback
486
+ * @param options The options parameters.
222
487
  */
223
- stop(resourceGroupName: string, containerGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
224
- stop(resourceGroupName: string, containerGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
488
+ stop(
489
+ resourceGroupName: string,
490
+ containerGroupName: string,
491
+ options?: ContainerGroupsStopOptionalParams
492
+ ): Promise<void> {
225
493
  return this.client.sendOperationRequest(
226
- {
227
- resourceGroupName,
228
- containerGroupName,
229
- options
230
- },
231
- stopOperationSpec,
232
- callback);
494
+ { resourceGroupName, containerGroupName, options },
495
+ stopOperationSpec
496
+ );
233
497
  }
234
498
 
235
499
  /**
236
500
  * Starts all containers in a container group. Compute resources will be allocated and billing will
237
501
  * start.
238
- * @summary Starts all containers in a container group.
239
- * @param resourceGroupName The name of the resource group.
240
- * @param containerGroupName The name of the container group.
241
- * @param [options] The optional parameters
242
- * @returns Promise<msRest.RestResponse>
243
- */
244
- start(resourceGroupName: string, containerGroupName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
245
- return this.beginStart(resourceGroupName,containerGroupName,options)
246
- .then(lroPoller => lroPoller.pollUntilFinished());
247
- }
248
-
249
- /**
250
- * Create or update container groups with specified configurations.
251
- * @summary Create or update container groups.
252
502
  * @param resourceGroupName The name of the resource group.
253
503
  * @param containerGroupName The name of the container group.
254
- * @param containerGroup The properties of the container group to be created or updated.
255
- * @param [options] The optional parameters
256
- * @returns Promise<msRestAzure.LROPoller>
504
+ * @param options The options parameters.
257
505
  */
258
- beginCreateOrUpdate(resourceGroupName: string, containerGroupName: string, containerGroup: Models.ContainerGroup, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
259
- return this.client.sendLRORequest(
260
- {
261
- resourceGroupName,
262
- containerGroupName,
263
- containerGroup,
264
- options
265
- },
266
- beginCreateOrUpdateOperationSpec,
267
- options);
268
- }
506
+ async beginStart(
507
+ resourceGroupName: string,
508
+ containerGroupName: string,
509
+ options?: ContainerGroupsStartOptionalParams
510
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
511
+ const directSendOperation = async (
512
+ args: coreClient.OperationArguments,
513
+ spec: coreClient.OperationSpec
514
+ ): Promise<void> => {
515
+ return this.client.sendOperationRequest(args, spec);
516
+ };
517
+ const sendOperation = async (
518
+ args: coreClient.OperationArguments,
519
+ spec: coreClient.OperationSpec
520
+ ) => {
521
+ let currentRawResponse:
522
+ | coreClient.FullOperationResponse
523
+ | undefined = undefined;
524
+ const providedCallback = args.options?.onResponse;
525
+ const callback: coreClient.RawResponseCallback = (
526
+ rawResponse: coreClient.FullOperationResponse,
527
+ flatResponse: unknown
528
+ ) => {
529
+ currentRawResponse = rawResponse;
530
+ providedCallback?.(rawResponse, flatResponse);
531
+ };
532
+ const updatedArgs = {
533
+ ...args,
534
+ options: {
535
+ ...args.options,
536
+ onResponse: callback
537
+ }
538
+ };
539
+ const flatResponse = await directSendOperation(updatedArgs, spec);
540
+ return {
541
+ flatResponse,
542
+ rawResponse: {
543
+ statusCode: currentRawResponse!.status,
544
+ body: currentRawResponse!.parsedBody,
545
+ headers: currentRawResponse!.headers.toJSON()
546
+ }
547
+ };
548
+ };
269
549
 
270
- /**
271
- * Delete the specified container group in the specified subscription and resource group. The
272
- * operation does not delete other resources provided by the user, such as volumes.
273
- * @summary Delete the specified container group.
274
- * @param resourceGroupName The name of the resource group.
275
- * @param containerGroupName The name of the container group.
276
- * @param [options] The optional parameters
277
- * @returns Promise<msRestAzure.LROPoller>
278
- */
279
- beginDeleteMethod(resourceGroupName: string, containerGroupName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
280
- return this.client.sendLRORequest(
281
- {
282
- resourceGroupName,
283
- containerGroupName,
284
- options
285
- },
286
- beginDeleteMethodOperationSpec,
287
- options);
550
+ const lro = new LroImpl(
551
+ sendOperation,
552
+ { resourceGroupName, containerGroupName, options },
553
+ startOperationSpec
554
+ );
555
+ return new LroEngine(lro, {
556
+ resumeFrom: options?.resumeFrom,
557
+ intervalInMs: options?.updateIntervalInMs
558
+ });
288
559
  }
289
560
 
290
561
  /**
291
- * Restarts all containers in a container group in place. If container image has updates, new image
292
- * will be downloaded.
293
- * @summary Restarts all containers in a container group.
562
+ * Starts all containers in a container group. Compute resources will be allocated and billing will
563
+ * start.
294
564
  * @param resourceGroupName The name of the resource group.
295
565
  * @param containerGroupName The name of the container group.
296
- * @param [options] The optional parameters
297
- * @returns Promise<msRestAzure.LROPoller>
566
+ * @param options The options parameters.
298
567
  */
299
- beginRestart(resourceGroupName: string, containerGroupName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
300
- return this.client.sendLRORequest(
301
- {
302
- resourceGroupName,
303
- containerGroupName,
304
- options
305
- },
306
- beginRestartOperationSpec,
307
- options);
568
+ async beginStartAndWait(
569
+ resourceGroupName: string,
570
+ containerGroupName: string,
571
+ options?: ContainerGroupsStartOptionalParams
572
+ ): Promise<void> {
573
+ const poller = await this.beginStart(
574
+ resourceGroupName,
575
+ containerGroupName,
576
+ options
577
+ );
578
+ return poller.pollUntilDone();
308
579
  }
309
580
 
310
581
  /**
311
- * Starts all containers in a container group. Compute resources will be allocated and billing will
312
- * start.
313
- * @summary Starts all containers in a container group.
582
+ * Gets all the network dependencies for this container group to allow complete control of network
583
+ * setting and configuration. For container groups, this will always be an empty list.
314
584
  * @param resourceGroupName The name of the resource group.
315
585
  * @param containerGroupName The name of the container group.
316
- * @param [options] The optional parameters
317
- * @returns Promise<msRestAzure.LROPoller>
586
+ * @param options The options parameters.
318
587
  */
319
- beginStart(resourceGroupName: string, containerGroupName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
320
- return this.client.sendLRORequest(
321
- {
322
- resourceGroupName,
323
- containerGroupName,
324
- options
325
- },
326
- beginStartOperationSpec,
327
- options);
588
+ getOutboundNetworkDependenciesEndpoints(
589
+ resourceGroupName: string,
590
+ containerGroupName: string,
591
+ options?: ContainerGroupsGetOutboundNetworkDependenciesEndpointsOptionalParams
592
+ ): Promise<ContainerGroupsGetOutboundNetworkDependenciesEndpointsResponse> {
593
+ return this.client.sendOperationRequest(
594
+ { resourceGroupName, containerGroupName, options },
595
+ getOutboundNetworkDependenciesEndpointsOperationSpec
596
+ );
328
597
  }
329
598
 
330
599
  /**
331
- * Get a list of container groups in the specified subscription. This operation returns properties
332
- * of each container group including containers, image registry credentials, restart policy, IP
333
- * address type, OS type, state, and volumes.
334
- * @summary Get a list of container groups in the specified subscription.
335
- * @param nextPageLink The NextLink from the previous successful call to List operation.
336
- * @param [options] The optional parameters
337
- * @returns Promise<Models.ContainerGroupsListNextResponse>
338
- */
339
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ContainerGroupsListNextResponse>;
340
- /**
341
- * @param nextPageLink The NextLink from the previous successful call to List operation.
342
- * @param callback The callback
343
- */
344
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ContainerGroupListResult>): void;
345
- /**
346
- * @param nextPageLink The NextLink from the previous successful call to List operation.
347
- * @param options The optional parameters
348
- * @param callback The callback
600
+ * ListNext
601
+ * @param nextLink The nextLink from the previous successful call to the List method.
602
+ * @param options The options parameters.
349
603
  */
350
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerGroupListResult>): void;
351
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerGroupListResult>, callback?: msRest.ServiceCallback<Models.ContainerGroupListResult>): Promise<Models.ContainerGroupsListNextResponse> {
604
+ private _listNext(
605
+ nextLink: string,
606
+ options?: ContainerGroupsListNextOptionalParams
607
+ ): Promise<ContainerGroupsListNextResponse> {
352
608
  return this.client.sendOperationRequest(
353
- {
354
- nextPageLink,
355
- options
356
- },
357
- listNextOperationSpec,
358
- callback) as Promise<Models.ContainerGroupsListNextResponse>;
609
+ { nextLink, options },
610
+ listNextOperationSpec
611
+ );
359
612
  }
360
613
 
361
614
  /**
362
- * Get a list of container groups in a specified subscription and resource group. This operation
363
- * returns properties of each container group including containers, image registry credentials,
364
- * restart policy, IP address type, OS type, state, and volumes.
365
- * @summary Get a list of container groups in the specified subscription and resource group.
366
- * @param nextPageLink The NextLink from the previous successful call to List operation.
367
- * @param [options] The optional parameters
368
- * @returns Promise<Models.ContainerGroupsListByResourceGroupNextResponse>
369
- */
370
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ContainerGroupsListByResourceGroupNextResponse>;
371
- /**
372
- * @param nextPageLink The NextLink from the previous successful call to List operation.
373
- * @param callback The callback
374
- */
375
- listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ContainerGroupListResult>): void;
376
- /**
377
- * @param nextPageLink The NextLink from the previous successful call to List operation.
378
- * @param options The optional parameters
379
- * @param callback The callback
615
+ * ListByResourceGroupNext
616
+ * @param resourceGroupName The name of the resource group.
617
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
618
+ * @param options The options parameters.
380
619
  */
381
- listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerGroupListResult>): void;
382
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerGroupListResult>, callback?: msRest.ServiceCallback<Models.ContainerGroupListResult>): Promise<Models.ContainerGroupsListByResourceGroupNextResponse> {
620
+ private _listByResourceGroupNext(
621
+ resourceGroupName: string,
622
+ nextLink: string,
623
+ options?: ContainerGroupsListByResourceGroupNextOptionalParams
624
+ ): Promise<ContainerGroupsListByResourceGroupNextResponse> {
383
625
  return this.client.sendOperationRequest(
384
- {
385
- nextPageLink,
386
- options
387
- },
388
- listByResourceGroupNextOperationSpec,
389
- callback) as Promise<Models.ContainerGroupsListByResourceGroupNextResponse>;
626
+ { resourceGroupName, nextLink, options },
627
+ listByResourceGroupNextOperationSpec
628
+ );
390
629
  }
391
630
  }
392
-
393
631
  // Operation Specifications
394
- const serializer = new msRest.Serializer(Mappers);
395
- const listOperationSpec: msRest.OperationSpec = {
632
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
633
+
634
+ const listOperationSpec: coreClient.OperationSpec = {
635
+ path:
636
+ "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups",
396
637
  httpMethod: "GET",
397
- path: "subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups",
398
- urlParameters: [
399
- Parameters.subscriptionId
400
- ],
401
- queryParameters: [
402
- Parameters.apiVersion
403
- ],
404
- headerParameters: [
405
- Parameters.acceptLanguage
406
- ],
407
638
  responses: {
408
639
  200: {
409
640
  bodyMapper: Mappers.ContainerGroupListResult
@@ -412,22 +643,15 @@ const listOperationSpec: msRest.OperationSpec = {
412
643
  bodyMapper: Mappers.CloudError
413
644
  }
414
645
  },
646
+ queryParameters: [Parameters.apiVersion],
647
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
648
+ headerParameters: [Parameters.accept],
415
649
  serializer
416
650
  };
417
-
418
- const listByResourceGroupOperationSpec: msRest.OperationSpec = {
651
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
652
+ path:
653
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups",
419
654
  httpMethod: "GET",
420
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups",
421
- urlParameters: [
422
- Parameters.subscriptionId,
423
- Parameters.resourceGroupName
424
- ],
425
- queryParameters: [
426
- Parameters.apiVersion
427
- ],
428
- headerParameters: [
429
- Parameters.acceptLanguage
430
- ],
431
655
  responses: {
432
656
  200: {
433
657
  bodyMapper: Mappers.ContainerGroupListResult
@@ -436,23 +660,19 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = {
436
660
  bodyMapper: Mappers.CloudError
437
661
  }
438
662
  },
439
- serializer
440
- };
441
-
442
- const getOperationSpec: msRest.OperationSpec = {
443
- httpMethod: "GET",
444
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
663
+ queryParameters: [Parameters.apiVersion],
445
664
  urlParameters: [
665
+ Parameters.$host,
446
666
  Parameters.subscriptionId,
447
- Parameters.resourceGroupName,
448
- Parameters.containerGroupName
449
- ],
450
- queryParameters: [
451
- Parameters.apiVersion
452
- ],
453
- headerParameters: [
454
- Parameters.acceptLanguage
667
+ Parameters.resourceGroupName
455
668
  ],
669
+ headerParameters: [Parameters.accept],
670
+ serializer
671
+ };
672
+ const getOperationSpec: coreClient.OperationSpec = {
673
+ path:
674
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
675
+ httpMethod: "GET",
456
676
  responses: {
457
677
  200: {
458
678
  bodyMapper: Mappers.ContainerGroup
@@ -461,85 +681,77 @@ const getOperationSpec: msRest.OperationSpec = {
461
681
  bodyMapper: Mappers.CloudError
462
682
  }
463
683
  },
464
- serializer
465
- };
466
-
467
- const updateOperationSpec: msRest.OperationSpec = {
468
- httpMethod: "PATCH",
469
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
684
+ queryParameters: [Parameters.apiVersion],
470
685
  urlParameters: [
686
+ Parameters.$host,
471
687
  Parameters.subscriptionId,
472
688
  Parameters.resourceGroupName,
473
689
  Parameters.containerGroupName
474
690
  ],
475
- queryParameters: [
476
- Parameters.apiVersion
477
- ],
478
- headerParameters: [
479
- Parameters.acceptLanguage
480
- ],
481
- requestBody: {
482
- parameterPath: "resource",
483
- mapper: {
484
- ...Mappers.Resource,
485
- required: true
486
- }
487
- },
691
+ headerParameters: [Parameters.accept],
692
+ serializer
693
+ };
694
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
695
+ path:
696
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
697
+ httpMethod: "PUT",
488
698
  responses: {
489
699
  200: {
490
700
  bodyMapper: Mappers.ContainerGroup
491
701
  },
702
+ 201: {
703
+ bodyMapper: Mappers.ContainerGroup
704
+ },
705
+ 202: {
706
+ bodyMapper: Mappers.ContainerGroup
707
+ },
708
+ 204: {
709
+ bodyMapper: Mappers.ContainerGroup
710
+ },
492
711
  default: {
493
712
  bodyMapper: Mappers.CloudError
494
713
  }
495
714
  },
496
- serializer
497
- };
498
-
499
- const stopOperationSpec: msRest.OperationSpec = {
500
- httpMethod: "POST",
501
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop",
715
+ requestBody: Parameters.containerGroup,
716
+ queryParameters: [Parameters.apiVersion],
502
717
  urlParameters: [
718
+ Parameters.$host,
503
719
  Parameters.subscriptionId,
504
720
  Parameters.resourceGroupName,
505
721
  Parameters.containerGroupName
506
722
  ],
507
- queryParameters: [
508
- Parameters.apiVersion
509
- ],
510
- headerParameters: [
511
- Parameters.acceptLanguage
512
- ],
723
+ headerParameters: [Parameters.accept, Parameters.contentType],
724
+ mediaType: "json",
725
+ serializer
726
+ };
727
+ const updateOperationSpec: coreClient.OperationSpec = {
728
+ path:
729
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
730
+ httpMethod: "PATCH",
513
731
  responses: {
514
- 204: {},
732
+ 200: {
733
+ bodyMapper: Mappers.ContainerGroup
734
+ },
515
735
  default: {
516
736
  bodyMapper: Mappers.CloudError
517
737
  }
518
738
  },
519
- serializer
520
- };
521
-
522
- const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
523
- httpMethod: "PUT",
524
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
739
+ requestBody: Parameters.resource,
740
+ queryParameters: [Parameters.apiVersion],
525
741
  urlParameters: [
742
+ Parameters.$host,
526
743
  Parameters.subscriptionId,
527
744
  Parameters.resourceGroupName,
528
745
  Parameters.containerGroupName
529
746
  ],
530
- queryParameters: [
531
- Parameters.apiVersion
532
- ],
533
- headerParameters: [
534
- Parameters.acceptLanguage
535
- ],
536
- requestBody: {
537
- parameterPath: "containerGroup",
538
- mapper: {
539
- ...Mappers.ContainerGroup,
540
- required: true
541
- }
542
- },
747
+ headerParameters: [Parameters.accept, Parameters.contentType],
748
+ mediaType: "json",
749
+ serializer
750
+ };
751
+ const deleteOperationSpec: coreClient.OperationSpec = {
752
+ path:
753
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
754
+ httpMethod: "DELETE",
543
755
  responses: {
544
756
  200: {
545
757
  bodyMapper: Mappers.ContainerGroup
@@ -547,99 +759,119 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
547
759
  201: {
548
760
  bodyMapper: Mappers.ContainerGroup
549
761
  },
762
+ 202: {
763
+ bodyMapper: Mappers.ContainerGroup
764
+ },
765
+ 204: {
766
+ bodyMapper: Mappers.ContainerGroup
767
+ },
550
768
  default: {
551
769
  bodyMapper: Mappers.CloudError
552
770
  }
553
771
  },
554
- serializer
555
- };
556
-
557
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
558
- httpMethod: "DELETE",
559
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
772
+ queryParameters: [Parameters.apiVersion],
560
773
  urlParameters: [
774
+ Parameters.$host,
561
775
  Parameters.subscriptionId,
562
776
  Parameters.resourceGroupName,
563
777
  Parameters.containerGroupName
564
778
  ],
565
- queryParameters: [
566
- Parameters.apiVersion
567
- ],
568
- headerParameters: [
569
- Parameters.acceptLanguage
570
- ],
779
+ headerParameters: [Parameters.accept],
780
+ serializer
781
+ };
782
+ const restartOperationSpec: coreClient.OperationSpec = {
783
+ path:
784
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart",
785
+ httpMethod: "POST",
571
786
  responses: {
572
- 200: {
573
- bodyMapper: Mappers.ContainerGroup
574
- },
787
+ 200: {},
788
+ 201: {},
575
789
  202: {},
576
790
  204: {},
577
791
  default: {
578
792
  bodyMapper: Mappers.CloudError
579
793
  }
580
794
  },
581
- serializer
582
- };
583
-
584
- const beginRestartOperationSpec: msRest.OperationSpec = {
585
- httpMethod: "POST",
586
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart",
795
+ queryParameters: [Parameters.apiVersion],
587
796
  urlParameters: [
797
+ Parameters.$host,
588
798
  Parameters.subscriptionId,
589
799
  Parameters.resourceGroupName,
590
800
  Parameters.containerGroupName
591
801
  ],
592
- queryParameters: [
593
- Parameters.apiVersion
594
- ],
595
- headerParameters: [
596
- Parameters.acceptLanguage
597
- ],
802
+ headerParameters: [Parameters.accept],
803
+ serializer
804
+ };
805
+ const stopOperationSpec: coreClient.OperationSpec = {
806
+ path:
807
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop",
808
+ httpMethod: "POST",
598
809
  responses: {
599
810
  204: {},
600
811
  default: {
601
812
  bodyMapper: Mappers.CloudError
602
813
  }
603
814
  },
604
- serializer
605
- };
606
-
607
- const beginStartOperationSpec: msRest.OperationSpec = {
608
- httpMethod: "POST",
609
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start",
815
+ queryParameters: [Parameters.apiVersion],
610
816
  urlParameters: [
817
+ Parameters.$host,
611
818
  Parameters.subscriptionId,
612
819
  Parameters.resourceGroupName,
613
820
  Parameters.containerGroupName
614
821
  ],
615
- queryParameters: [
616
- Parameters.apiVersion
617
- ],
618
- headerParameters: [
619
- Parameters.acceptLanguage
620
- ],
822
+ headerParameters: [Parameters.accept],
823
+ serializer
824
+ };
825
+ const startOperationSpec: coreClient.OperationSpec = {
826
+ path:
827
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start",
828
+ httpMethod: "POST",
621
829
  responses: {
830
+ 200: {},
831
+ 201: {},
622
832
  202: {},
833
+ 204: {},
623
834
  default: {
624
835
  bodyMapper: Mappers.CloudError
625
836
  }
626
837
  },
838
+ queryParameters: [Parameters.apiVersion],
839
+ urlParameters: [
840
+ Parameters.$host,
841
+ Parameters.subscriptionId,
842
+ Parameters.resourceGroupName,
843
+ Parameters.containerGroupName
844
+ ],
845
+ headerParameters: [Parameters.accept],
627
846
  serializer
628
847
  };
629
-
630
- const listNextOperationSpec: msRest.OperationSpec = {
848
+ const getOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.OperationSpec = {
849
+ path:
850
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/outboundNetworkDependenciesEndpoints",
631
851
  httpMethod: "GET",
632
- baseUrl: "https://management.azure.com",
633
- path: "{nextLink}",
852
+ responses: {
853
+ 200: {
854
+ bodyMapper: {
855
+ type: { name: "Sequence", element: { type: { name: "String" } } }
856
+ }
857
+ },
858
+ default: {
859
+ bodyMapper: Mappers.CloudError
860
+ }
861
+ },
862
+ queryParameters: [Parameters.apiVersion],
634
863
  urlParameters: [
635
- Parameters.nextPageLink
636
- ],
637
- queryParameters: [
638
- Parameters.apiVersion
639
- ],
640
- headerParameters: [
641
- Parameters.acceptLanguage
864
+ Parameters.$host,
865
+ Parameters.subscriptionId,
866
+ Parameters.resourceGroupName,
867
+ Parameters.containerGroupName
642
868
  ],
869
+ headerParameters: [Parameters.accept],
870
+ serializer
871
+ };
872
+ const listNextOperationSpec: coreClient.OperationSpec = {
873
+ path: "{nextLink}",
874
+ httpMethod: "GET",
643
875
  responses: {
644
876
  200: {
645
877
  bodyMapper: Mappers.ContainerGroupListResult
@@ -648,22 +880,18 @@ const listNextOperationSpec: msRest.OperationSpec = {
648
880
  bodyMapper: Mappers.CloudError
649
881
  }
650
882
  },
883
+ queryParameters: [Parameters.apiVersion],
884
+ urlParameters: [
885
+ Parameters.$host,
886
+ Parameters.subscriptionId,
887
+ Parameters.nextLink
888
+ ],
889
+ headerParameters: [Parameters.accept],
651
890
  serializer
652
891
  };
653
-
654
- const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
655
- httpMethod: "GET",
656
- baseUrl: "https://management.azure.com",
892
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
657
893
  path: "{nextLink}",
658
- urlParameters: [
659
- Parameters.nextPageLink
660
- ],
661
- queryParameters: [
662
- Parameters.apiVersion
663
- ],
664
- headerParameters: [
665
- Parameters.acceptLanguage
666
- ],
894
+ httpMethod: "GET",
667
895
  responses: {
668
896
  200: {
669
897
  bodyMapper: Mappers.ContainerGroupListResult
@@ -672,5 +900,13 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
672
900
  bodyMapper: Mappers.CloudError
673
901
  }
674
902
  },
903
+ queryParameters: [Parameters.apiVersion],
904
+ urlParameters: [
905
+ Parameters.$host,
906
+ Parameters.subscriptionId,
907
+ Parameters.resourceGroupName,
908
+ Parameters.nextLink
909
+ ],
910
+ headerParameters: [Parameters.accept],
675
911
  serializer
676
912
  };