@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.
- package/CHANGELOG.md +11 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +70 -78
- package/dist/index.js +3335 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/containerInstanceManagementClient.d.ts +22 -0
- package/dist-esm/src/containerInstanceManagementClient.d.ts.map +1 -0
- package/dist-esm/src/containerInstanceManagementClient.js +55 -0
- package/dist-esm/src/containerInstanceManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +964 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +70 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +54 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +799 -788
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +17 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/parameters.js +67 -37
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/containerGroups.d.ts +159 -0
- package/dist-esm/src/operations/containerGroups.d.ts.map +1 -0
- package/dist-esm/src/operations/containerGroups.js +678 -0
- package/dist-esm/src/operations/containerGroups.js.map +1 -0
- package/dist-esm/src/operations/containers.d.ts +40 -0
- package/dist-esm/src/operations/containers.d.ts.map +1 -0
- package/dist-esm/src/operations/containers.js +134 -0
- package/dist-esm/src/operations/containers.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +1 -2
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/location.d.ts +70 -0
- package/dist-esm/src/operations/location.d.ts.map +1 -0
- package/dist-esm/src/operations/location.js +310 -0
- package/dist-esm/src/operations/location.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/containerGroups.d.ts +119 -0
- package/dist-esm/src/operationsInterfaces/containerGroups.d.ts.map +1 -0
- package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/containerGroups.js} +2 -7
- package/dist-esm/src/operationsInterfaces/containerGroups.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/containers.d.ts +32 -0
- package/dist-esm/src/operationsInterfaces/containers.d.ts.map +1 -0
- package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/containers.js} +2 -2
- package/dist-esm/src/operationsInterfaces/containers.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +12 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/location.d.ts +24 -0
- package/dist-esm/src/operationsInterfaces/location.d.ts.map +1 -0
- package/{esm/models/index.js → dist-esm/src/operationsInterfaces/location.js} +2 -1
- package/dist-esm/src/operationsInterfaces/location.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/{src/models/containersMappers.ts → dist-esm/src/operationsInterfaces/operations.js} +2 -9
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/test/containerinstance_examples.d.ts +4 -0
- package/dist-esm/test/containerinstance_examples.d.ts.map +1 -0
- package/dist-esm/test/containerinstance_examples.js +156 -0
- package/dist-esm/test/containerinstance_examples.js.map +1 -0
- package/package.json +65 -32
- package/review/arm-containerinstance.api.md +752 -0
- package/rollup.config.js +181 -30
- package/src/containerInstanceManagementClient.ts +78 -40
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +734 -1215
- package/src/models/mappers.ts +808 -793
- package/src/models/parameters.ts +90 -38
- package/src/operations/containerGroups.ts +660 -424
- package/src/operations/containers.ts +89 -143
- package/src/operations/index.ts +1 -2
- package/src/operations/location.ts +262 -179
- package/src/operations/operations.ts +85 -73
- package/src/operationsInterfaces/containerGroups.ts +212 -0
- package/src/operationsInterfaces/containers.ts +64 -0
- package/src/operationsInterfaces/index.ts +12 -0
- package/src/operationsInterfaces/location.ts +49 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/tsconfig.json +3 -3
- package/types/arm-containerinstance.d.ts +1282 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-containerinstance.js +0 -3019
- package/dist/arm-containerinstance.js.map +0 -1
- package/dist/arm-containerinstance.min.js +0 -1
- package/dist/arm-containerinstance.min.js.map +0 -1
- package/esm/containerInstanceManagementClient.d.ts +0 -28
- package/esm/containerInstanceManagementClient.d.ts.map +0 -1
- package/esm/containerInstanceManagementClient.js +0 -41
- package/esm/containerInstanceManagementClient.js.map +0 -1
- package/esm/containerInstanceManagementClientContext.d.ts +0 -23
- package/esm/containerInstanceManagementClientContext.d.ts.map +0 -1
- package/esm/containerInstanceManagementClientContext.js +0 -61
- package/esm/containerInstanceManagementClientContext.js.map +0 -1
- package/esm/models/containerGroupsMappers.d.ts +0 -2
- package/esm/models/containerGroupsMappers.d.ts.map +0 -1
- package/esm/models/containerGroupsMappers.js +0 -9
- package/esm/models/containerGroupsMappers.js.map +0 -1
- package/esm/models/containersMappers.d.ts +0 -2
- package/esm/models/containersMappers.d.ts.map +0 -1
- package/esm/models/containersMappers.js +0 -9
- package/esm/models/containersMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -1469
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/locationMappers.d.ts +0 -2
- package/esm/models/locationMappers.d.ts.map +0 -1
- package/esm/models/locationMappers.js +0 -9
- package/esm/models/locationMappers.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -54
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -12
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/containerGroups.d.ts +0 -247
- package/esm/operations/containerGroups.d.ts.map +0 -1
- package/esm/operations/containerGroups.js +0 -455
- package/esm/operations/containerGroups.js.map +0 -1
- package/esm/operations/containers.d.ts +0 -94
- package/esm/operations/containers.d.ts.map +0 -1
- package/esm/operations/containers.js +0 -133
- package/esm/operations/containers.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/location.d.ts +0 -107
- package/esm/operations/location.d.ts.map +0 -1
- package/esm/operations/location.js +0 -171
- package/esm/operations/location.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -79
- package/esm/operations/operations.js.map +0 -1
- package/src/containerInstanceManagementClientContext.ts +0 -68
- package/src/models/containerGroupsMappers.ts +0 -46
- package/src/models/locationMappers.ts +0 -19
|
@@ -0,0 +1,678 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await, __awaiter } from "tslib";
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as Mappers from "../models/mappers";
|
|
11
|
+
import * as Parameters from "../models/parameters";
|
|
12
|
+
import { LroEngine } from "@azure/core-lro";
|
|
13
|
+
import { LroImpl } from "../lroImpl";
|
|
14
|
+
/// <reference lib="esnext.asynciterable" />
|
|
15
|
+
/** Class containing ContainerGroups operations. */
|
|
16
|
+
export class ContainerGroupsImpl {
|
|
17
|
+
/**
|
|
18
|
+
* Initialize a new instance of the class ContainerGroups class.
|
|
19
|
+
* @param client Reference to the service client
|
|
20
|
+
*/
|
|
21
|
+
constructor(client) {
|
|
22
|
+
this.client = client;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get a list of container groups in the specified subscription. This operation returns properties of
|
|
26
|
+
* each container group including containers, image registry credentials, restart policy, IP address
|
|
27
|
+
* type, OS type, state, and volumes.
|
|
28
|
+
* @param options The options parameters.
|
|
29
|
+
*/
|
|
30
|
+
list(options) {
|
|
31
|
+
const iter = this.listPagingAll(options);
|
|
32
|
+
return {
|
|
33
|
+
next() {
|
|
34
|
+
return iter.next();
|
|
35
|
+
},
|
|
36
|
+
[Symbol.asyncIterator]() {
|
|
37
|
+
return this;
|
|
38
|
+
},
|
|
39
|
+
byPage: () => {
|
|
40
|
+
return this.listPagingPage(options);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
listPagingPage(options) {
|
|
45
|
+
return __asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
46
|
+
let result = yield __await(this._list(options));
|
|
47
|
+
yield yield __await(result.value || []);
|
|
48
|
+
let continuationToken = result.nextLink;
|
|
49
|
+
while (continuationToken) {
|
|
50
|
+
result = yield __await(this._listNext(continuationToken, options));
|
|
51
|
+
continuationToken = result.nextLink;
|
|
52
|
+
yield yield __await(result.value || []);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
listPagingAll(options) {
|
|
57
|
+
return __asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
58
|
+
var e_1, _a;
|
|
59
|
+
try {
|
|
60
|
+
for (var _b = __asyncValues(this.listPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
61
|
+
const page = _c.value;
|
|
62
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
66
|
+
finally {
|
|
67
|
+
try {
|
|
68
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
69
|
+
}
|
|
70
|
+
finally { if (e_1) throw e_1.error; }
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get a list of container groups in a specified subscription and resource group. This operation
|
|
76
|
+
* returns properties of each container group including containers, image registry credentials, restart
|
|
77
|
+
* policy, IP address type, OS type, state, and volumes.
|
|
78
|
+
* @param resourceGroupName The name of the resource group.
|
|
79
|
+
* @param options The options parameters.
|
|
80
|
+
*/
|
|
81
|
+
listByResourceGroup(resourceGroupName, options) {
|
|
82
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
83
|
+
return {
|
|
84
|
+
next() {
|
|
85
|
+
return iter.next();
|
|
86
|
+
},
|
|
87
|
+
[Symbol.asyncIterator]() {
|
|
88
|
+
return this;
|
|
89
|
+
},
|
|
90
|
+
byPage: () => {
|
|
91
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
listByResourceGroupPagingPage(resourceGroupName, options) {
|
|
96
|
+
return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
97
|
+
let result = yield __await(this._listByResourceGroup(resourceGroupName, options));
|
|
98
|
+
yield yield __await(result.value || []);
|
|
99
|
+
let continuationToken = result.nextLink;
|
|
100
|
+
while (continuationToken) {
|
|
101
|
+
result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
|
102
|
+
continuationToken = result.nextLink;
|
|
103
|
+
yield yield __await(result.value || []);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
108
|
+
return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
|
|
109
|
+
var e_2, _a;
|
|
110
|
+
try {
|
|
111
|
+
for (var _b = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
112
|
+
const page = _c.value;
|
|
113
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
117
|
+
finally {
|
|
118
|
+
try {
|
|
119
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
120
|
+
}
|
|
121
|
+
finally { if (e_2) throw e_2.error; }
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get a list of container groups in the specified subscription. This operation returns properties of
|
|
127
|
+
* each container group including containers, image registry credentials, restart policy, IP address
|
|
128
|
+
* type, OS type, state, and volumes.
|
|
129
|
+
* @param options The options parameters.
|
|
130
|
+
*/
|
|
131
|
+
_list(options) {
|
|
132
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Get a list of container groups in a specified subscription and resource group. This operation
|
|
136
|
+
* returns properties of each container group including containers, image registry credentials, restart
|
|
137
|
+
* policy, IP address type, OS type, state, and volumes.
|
|
138
|
+
* @param resourceGroupName The name of the resource group.
|
|
139
|
+
* @param options The options parameters.
|
|
140
|
+
*/
|
|
141
|
+
_listByResourceGroup(resourceGroupName, options) {
|
|
142
|
+
return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Gets the properties of the specified container group in the specified subscription and resource
|
|
146
|
+
* group. The operation returns the properties of each container group including containers, image
|
|
147
|
+
* registry credentials, restart policy, IP address type, OS type, state, and volumes.
|
|
148
|
+
* @param resourceGroupName The name of the resource group.
|
|
149
|
+
* @param containerGroupName The name of the container group.
|
|
150
|
+
* @param options The options parameters.
|
|
151
|
+
*/
|
|
152
|
+
get(resourceGroupName, containerGroupName, options) {
|
|
153
|
+
return this.client.sendOperationRequest({ resourceGroupName, containerGroupName, options }, getOperationSpec);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Create or update container groups with specified configurations.
|
|
157
|
+
* @param resourceGroupName The name of the resource group.
|
|
158
|
+
* @param containerGroupName The name of the container group.
|
|
159
|
+
* @param containerGroup The properties of the container group to be created or updated.
|
|
160
|
+
* @param options The options parameters.
|
|
161
|
+
*/
|
|
162
|
+
beginCreateOrUpdate(resourceGroupName, containerGroupName, containerGroup, options) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
return this.client.sendOperationRequest(args, spec);
|
|
166
|
+
});
|
|
167
|
+
const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
var _a;
|
|
169
|
+
let currentRawResponse = undefined;
|
|
170
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
171
|
+
const callback = (rawResponse, flatResponse) => {
|
|
172
|
+
currentRawResponse = rawResponse;
|
|
173
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
174
|
+
};
|
|
175
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
176
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
177
|
+
return {
|
|
178
|
+
flatResponse,
|
|
179
|
+
rawResponse: {
|
|
180
|
+
statusCode: currentRawResponse.status,
|
|
181
|
+
body: currentRawResponse.parsedBody,
|
|
182
|
+
headers: currentRawResponse.headers.toJSON()
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
});
|
|
186
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, containerGroupName, containerGroup, options }, createOrUpdateOperationSpec);
|
|
187
|
+
return new LroEngine(lro, {
|
|
188
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
189
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Create or update container groups with specified configurations.
|
|
195
|
+
* @param resourceGroupName The name of the resource group.
|
|
196
|
+
* @param containerGroupName The name of the container group.
|
|
197
|
+
* @param containerGroup The properties of the container group to be created or updated.
|
|
198
|
+
* @param options The options parameters.
|
|
199
|
+
*/
|
|
200
|
+
beginCreateOrUpdateAndWait(resourceGroupName, containerGroupName, containerGroup, options) {
|
|
201
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
+
const poller = yield this.beginCreateOrUpdate(resourceGroupName, containerGroupName, containerGroup, options);
|
|
203
|
+
return poller.pollUntilDone();
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Updates container group tags with specified values.
|
|
208
|
+
* @param resourceGroupName The name of the resource group.
|
|
209
|
+
* @param containerGroupName The name of the container group.
|
|
210
|
+
* @param resource The container group resource with just the tags to be updated.
|
|
211
|
+
* @param options The options parameters.
|
|
212
|
+
*/
|
|
213
|
+
update(resourceGroupName, containerGroupName, resource, options) {
|
|
214
|
+
return this.client.sendOperationRequest({ resourceGroupName, containerGroupName, resource, options }, updateOperationSpec);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Delete the specified container group in the specified subscription and resource group. The operation
|
|
218
|
+
* does not delete other resources provided by the user, such as volumes.
|
|
219
|
+
* @param resourceGroupName The name of the resource group.
|
|
220
|
+
* @param containerGroupName The name of the container group.
|
|
221
|
+
* @param options The options parameters.
|
|
222
|
+
*/
|
|
223
|
+
beginDelete(resourceGroupName, containerGroupName, options) {
|
|
224
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
226
|
+
return this.client.sendOperationRequest(args, spec);
|
|
227
|
+
});
|
|
228
|
+
const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
229
|
+
var _a;
|
|
230
|
+
let currentRawResponse = undefined;
|
|
231
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
232
|
+
const callback = (rawResponse, flatResponse) => {
|
|
233
|
+
currentRawResponse = rawResponse;
|
|
234
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
235
|
+
};
|
|
236
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
237
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
238
|
+
return {
|
|
239
|
+
flatResponse,
|
|
240
|
+
rawResponse: {
|
|
241
|
+
statusCode: currentRawResponse.status,
|
|
242
|
+
body: currentRawResponse.parsedBody,
|
|
243
|
+
headers: currentRawResponse.headers.toJSON()
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
});
|
|
247
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, containerGroupName, options }, deleteOperationSpec);
|
|
248
|
+
return new LroEngine(lro, {
|
|
249
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
250
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Delete the specified container group in the specified subscription and resource group. The operation
|
|
256
|
+
* does not delete other resources provided by the user, such as volumes.
|
|
257
|
+
* @param resourceGroupName The name of the resource group.
|
|
258
|
+
* @param containerGroupName The name of the container group.
|
|
259
|
+
* @param options The options parameters.
|
|
260
|
+
*/
|
|
261
|
+
beginDeleteAndWait(resourceGroupName, containerGroupName, options) {
|
|
262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
+
const poller = yield this.beginDelete(resourceGroupName, containerGroupName, options);
|
|
264
|
+
return poller.pollUntilDone();
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Restarts all containers in a container group in place. If container image has updates, new image
|
|
269
|
+
* will be downloaded.
|
|
270
|
+
* @param resourceGroupName The name of the resource group.
|
|
271
|
+
* @param containerGroupName The name of the container group.
|
|
272
|
+
* @param options The options parameters.
|
|
273
|
+
*/
|
|
274
|
+
beginRestart(resourceGroupName, containerGroupName, options) {
|
|
275
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
277
|
+
return this.client.sendOperationRequest(args, spec);
|
|
278
|
+
});
|
|
279
|
+
const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
280
|
+
var _a;
|
|
281
|
+
let currentRawResponse = undefined;
|
|
282
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
283
|
+
const callback = (rawResponse, flatResponse) => {
|
|
284
|
+
currentRawResponse = rawResponse;
|
|
285
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
286
|
+
};
|
|
287
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
288
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
289
|
+
return {
|
|
290
|
+
flatResponse,
|
|
291
|
+
rawResponse: {
|
|
292
|
+
statusCode: currentRawResponse.status,
|
|
293
|
+
body: currentRawResponse.parsedBody,
|
|
294
|
+
headers: currentRawResponse.headers.toJSON()
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
});
|
|
298
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, containerGroupName, options }, restartOperationSpec);
|
|
299
|
+
return new LroEngine(lro, {
|
|
300
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
301
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Restarts all containers in a container group in place. If container image has updates, new image
|
|
307
|
+
* will be downloaded.
|
|
308
|
+
* @param resourceGroupName The name of the resource group.
|
|
309
|
+
* @param containerGroupName The name of the container group.
|
|
310
|
+
* @param options The options parameters.
|
|
311
|
+
*/
|
|
312
|
+
beginRestartAndWait(resourceGroupName, containerGroupName, options) {
|
|
313
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
314
|
+
const poller = yield this.beginRestart(resourceGroupName, containerGroupName, options);
|
|
315
|
+
return poller.pollUntilDone();
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Stops all containers in a container group. Compute resources will be deallocated and billing will
|
|
320
|
+
* stop.
|
|
321
|
+
* @param resourceGroupName The name of the resource group.
|
|
322
|
+
* @param containerGroupName The name of the container group.
|
|
323
|
+
* @param options The options parameters.
|
|
324
|
+
*/
|
|
325
|
+
stop(resourceGroupName, containerGroupName, options) {
|
|
326
|
+
return this.client.sendOperationRequest({ resourceGroupName, containerGroupName, options }, stopOperationSpec);
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Starts all containers in a container group. Compute resources will be allocated and billing will
|
|
330
|
+
* start.
|
|
331
|
+
* @param resourceGroupName The name of the resource group.
|
|
332
|
+
* @param containerGroupName The name of the container group.
|
|
333
|
+
* @param options The options parameters.
|
|
334
|
+
*/
|
|
335
|
+
beginStart(resourceGroupName, containerGroupName, options) {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
337
|
+
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
338
|
+
return this.client.sendOperationRequest(args, spec);
|
|
339
|
+
});
|
|
340
|
+
const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
341
|
+
var _a;
|
|
342
|
+
let currentRawResponse = undefined;
|
|
343
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
344
|
+
const callback = (rawResponse, flatResponse) => {
|
|
345
|
+
currentRawResponse = rawResponse;
|
|
346
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
347
|
+
};
|
|
348
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
349
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
350
|
+
return {
|
|
351
|
+
flatResponse,
|
|
352
|
+
rawResponse: {
|
|
353
|
+
statusCode: currentRawResponse.status,
|
|
354
|
+
body: currentRawResponse.parsedBody,
|
|
355
|
+
headers: currentRawResponse.headers.toJSON()
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
});
|
|
359
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, containerGroupName, options }, startOperationSpec);
|
|
360
|
+
return new LroEngine(lro, {
|
|
361
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
362
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Starts all containers in a container group. Compute resources will be allocated and billing will
|
|
368
|
+
* start.
|
|
369
|
+
* @param resourceGroupName The name of the resource group.
|
|
370
|
+
* @param containerGroupName The name of the container group.
|
|
371
|
+
* @param options The options parameters.
|
|
372
|
+
*/
|
|
373
|
+
beginStartAndWait(resourceGroupName, containerGroupName, options) {
|
|
374
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
375
|
+
const poller = yield this.beginStart(resourceGroupName, containerGroupName, options);
|
|
376
|
+
return poller.pollUntilDone();
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Gets all the network dependencies for this container group to allow complete control of network
|
|
381
|
+
* setting and configuration. For container groups, this will always be an empty list.
|
|
382
|
+
* @param resourceGroupName The name of the resource group.
|
|
383
|
+
* @param containerGroupName The name of the container group.
|
|
384
|
+
* @param options The options parameters.
|
|
385
|
+
*/
|
|
386
|
+
getOutboundNetworkDependenciesEndpoints(resourceGroupName, containerGroupName, options) {
|
|
387
|
+
return this.client.sendOperationRequest({ resourceGroupName, containerGroupName, options }, getOutboundNetworkDependenciesEndpointsOperationSpec);
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* ListNext
|
|
391
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
392
|
+
* @param options The options parameters.
|
|
393
|
+
*/
|
|
394
|
+
_listNext(nextLink, options) {
|
|
395
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* ListByResourceGroupNext
|
|
399
|
+
* @param resourceGroupName The name of the resource group.
|
|
400
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
401
|
+
* @param options The options parameters.
|
|
402
|
+
*/
|
|
403
|
+
_listByResourceGroupNext(resourceGroupName, nextLink, options) {
|
|
404
|
+
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
// Operation Specifications
|
|
408
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
409
|
+
const listOperationSpec = {
|
|
410
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups",
|
|
411
|
+
httpMethod: "GET",
|
|
412
|
+
responses: {
|
|
413
|
+
200: {
|
|
414
|
+
bodyMapper: Mappers.ContainerGroupListResult
|
|
415
|
+
},
|
|
416
|
+
default: {
|
|
417
|
+
bodyMapper: Mappers.CloudError
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
queryParameters: [Parameters.apiVersion],
|
|
421
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
422
|
+
headerParameters: [Parameters.accept],
|
|
423
|
+
serializer
|
|
424
|
+
};
|
|
425
|
+
const listByResourceGroupOperationSpec = {
|
|
426
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups",
|
|
427
|
+
httpMethod: "GET",
|
|
428
|
+
responses: {
|
|
429
|
+
200: {
|
|
430
|
+
bodyMapper: Mappers.ContainerGroupListResult
|
|
431
|
+
},
|
|
432
|
+
default: {
|
|
433
|
+
bodyMapper: Mappers.CloudError
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
queryParameters: [Parameters.apiVersion],
|
|
437
|
+
urlParameters: [
|
|
438
|
+
Parameters.$host,
|
|
439
|
+
Parameters.subscriptionId,
|
|
440
|
+
Parameters.resourceGroupName
|
|
441
|
+
],
|
|
442
|
+
headerParameters: [Parameters.accept],
|
|
443
|
+
serializer
|
|
444
|
+
};
|
|
445
|
+
const getOperationSpec = {
|
|
446
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
|
|
447
|
+
httpMethod: "GET",
|
|
448
|
+
responses: {
|
|
449
|
+
200: {
|
|
450
|
+
bodyMapper: Mappers.ContainerGroup
|
|
451
|
+
},
|
|
452
|
+
default: {
|
|
453
|
+
bodyMapper: Mappers.CloudError
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
queryParameters: [Parameters.apiVersion],
|
|
457
|
+
urlParameters: [
|
|
458
|
+
Parameters.$host,
|
|
459
|
+
Parameters.subscriptionId,
|
|
460
|
+
Parameters.resourceGroupName,
|
|
461
|
+
Parameters.containerGroupName
|
|
462
|
+
],
|
|
463
|
+
headerParameters: [Parameters.accept],
|
|
464
|
+
serializer
|
|
465
|
+
};
|
|
466
|
+
const createOrUpdateOperationSpec = {
|
|
467
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
|
|
468
|
+
httpMethod: "PUT",
|
|
469
|
+
responses: {
|
|
470
|
+
200: {
|
|
471
|
+
bodyMapper: Mappers.ContainerGroup
|
|
472
|
+
},
|
|
473
|
+
201: {
|
|
474
|
+
bodyMapper: Mappers.ContainerGroup
|
|
475
|
+
},
|
|
476
|
+
202: {
|
|
477
|
+
bodyMapper: Mappers.ContainerGroup
|
|
478
|
+
},
|
|
479
|
+
204: {
|
|
480
|
+
bodyMapper: Mappers.ContainerGroup
|
|
481
|
+
},
|
|
482
|
+
default: {
|
|
483
|
+
bodyMapper: Mappers.CloudError
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
requestBody: Parameters.containerGroup,
|
|
487
|
+
queryParameters: [Parameters.apiVersion],
|
|
488
|
+
urlParameters: [
|
|
489
|
+
Parameters.$host,
|
|
490
|
+
Parameters.subscriptionId,
|
|
491
|
+
Parameters.resourceGroupName,
|
|
492
|
+
Parameters.containerGroupName
|
|
493
|
+
],
|
|
494
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
495
|
+
mediaType: "json",
|
|
496
|
+
serializer
|
|
497
|
+
};
|
|
498
|
+
const updateOperationSpec = {
|
|
499
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
|
|
500
|
+
httpMethod: "PATCH",
|
|
501
|
+
responses: {
|
|
502
|
+
200: {
|
|
503
|
+
bodyMapper: Mappers.ContainerGroup
|
|
504
|
+
},
|
|
505
|
+
default: {
|
|
506
|
+
bodyMapper: Mappers.CloudError
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
requestBody: Parameters.resource,
|
|
510
|
+
queryParameters: [Parameters.apiVersion],
|
|
511
|
+
urlParameters: [
|
|
512
|
+
Parameters.$host,
|
|
513
|
+
Parameters.subscriptionId,
|
|
514
|
+
Parameters.resourceGroupName,
|
|
515
|
+
Parameters.containerGroupName
|
|
516
|
+
],
|
|
517
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
518
|
+
mediaType: "json",
|
|
519
|
+
serializer
|
|
520
|
+
};
|
|
521
|
+
const deleteOperationSpec = {
|
|
522
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}",
|
|
523
|
+
httpMethod: "DELETE",
|
|
524
|
+
responses: {
|
|
525
|
+
200: {
|
|
526
|
+
bodyMapper: Mappers.ContainerGroup
|
|
527
|
+
},
|
|
528
|
+
201: {
|
|
529
|
+
bodyMapper: Mappers.ContainerGroup
|
|
530
|
+
},
|
|
531
|
+
202: {
|
|
532
|
+
bodyMapper: Mappers.ContainerGroup
|
|
533
|
+
},
|
|
534
|
+
204: {
|
|
535
|
+
bodyMapper: Mappers.ContainerGroup
|
|
536
|
+
},
|
|
537
|
+
default: {
|
|
538
|
+
bodyMapper: Mappers.CloudError
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
queryParameters: [Parameters.apiVersion],
|
|
542
|
+
urlParameters: [
|
|
543
|
+
Parameters.$host,
|
|
544
|
+
Parameters.subscriptionId,
|
|
545
|
+
Parameters.resourceGroupName,
|
|
546
|
+
Parameters.containerGroupName
|
|
547
|
+
],
|
|
548
|
+
headerParameters: [Parameters.accept],
|
|
549
|
+
serializer
|
|
550
|
+
};
|
|
551
|
+
const restartOperationSpec = {
|
|
552
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart",
|
|
553
|
+
httpMethod: "POST",
|
|
554
|
+
responses: {
|
|
555
|
+
200: {},
|
|
556
|
+
201: {},
|
|
557
|
+
202: {},
|
|
558
|
+
204: {},
|
|
559
|
+
default: {
|
|
560
|
+
bodyMapper: Mappers.CloudError
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
queryParameters: [Parameters.apiVersion],
|
|
564
|
+
urlParameters: [
|
|
565
|
+
Parameters.$host,
|
|
566
|
+
Parameters.subscriptionId,
|
|
567
|
+
Parameters.resourceGroupName,
|
|
568
|
+
Parameters.containerGroupName
|
|
569
|
+
],
|
|
570
|
+
headerParameters: [Parameters.accept],
|
|
571
|
+
serializer
|
|
572
|
+
};
|
|
573
|
+
const stopOperationSpec = {
|
|
574
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop",
|
|
575
|
+
httpMethod: "POST",
|
|
576
|
+
responses: {
|
|
577
|
+
204: {},
|
|
578
|
+
default: {
|
|
579
|
+
bodyMapper: Mappers.CloudError
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
queryParameters: [Parameters.apiVersion],
|
|
583
|
+
urlParameters: [
|
|
584
|
+
Parameters.$host,
|
|
585
|
+
Parameters.subscriptionId,
|
|
586
|
+
Parameters.resourceGroupName,
|
|
587
|
+
Parameters.containerGroupName
|
|
588
|
+
],
|
|
589
|
+
headerParameters: [Parameters.accept],
|
|
590
|
+
serializer
|
|
591
|
+
};
|
|
592
|
+
const startOperationSpec = {
|
|
593
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start",
|
|
594
|
+
httpMethod: "POST",
|
|
595
|
+
responses: {
|
|
596
|
+
200: {},
|
|
597
|
+
201: {},
|
|
598
|
+
202: {},
|
|
599
|
+
204: {},
|
|
600
|
+
default: {
|
|
601
|
+
bodyMapper: Mappers.CloudError
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
queryParameters: [Parameters.apiVersion],
|
|
605
|
+
urlParameters: [
|
|
606
|
+
Parameters.$host,
|
|
607
|
+
Parameters.subscriptionId,
|
|
608
|
+
Parameters.resourceGroupName,
|
|
609
|
+
Parameters.containerGroupName
|
|
610
|
+
],
|
|
611
|
+
headerParameters: [Parameters.accept],
|
|
612
|
+
serializer
|
|
613
|
+
};
|
|
614
|
+
const getOutboundNetworkDependenciesEndpointsOperationSpec = {
|
|
615
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/outboundNetworkDependenciesEndpoints",
|
|
616
|
+
httpMethod: "GET",
|
|
617
|
+
responses: {
|
|
618
|
+
200: {
|
|
619
|
+
bodyMapper: {
|
|
620
|
+
type: { name: "Sequence", element: { type: { name: "String" } } }
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
default: {
|
|
624
|
+
bodyMapper: Mappers.CloudError
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
queryParameters: [Parameters.apiVersion],
|
|
628
|
+
urlParameters: [
|
|
629
|
+
Parameters.$host,
|
|
630
|
+
Parameters.subscriptionId,
|
|
631
|
+
Parameters.resourceGroupName,
|
|
632
|
+
Parameters.containerGroupName
|
|
633
|
+
],
|
|
634
|
+
headerParameters: [Parameters.accept],
|
|
635
|
+
serializer
|
|
636
|
+
};
|
|
637
|
+
const listNextOperationSpec = {
|
|
638
|
+
path: "{nextLink}",
|
|
639
|
+
httpMethod: "GET",
|
|
640
|
+
responses: {
|
|
641
|
+
200: {
|
|
642
|
+
bodyMapper: Mappers.ContainerGroupListResult
|
|
643
|
+
},
|
|
644
|
+
default: {
|
|
645
|
+
bodyMapper: Mappers.CloudError
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
queryParameters: [Parameters.apiVersion],
|
|
649
|
+
urlParameters: [
|
|
650
|
+
Parameters.$host,
|
|
651
|
+
Parameters.subscriptionId,
|
|
652
|
+
Parameters.nextLink
|
|
653
|
+
],
|
|
654
|
+
headerParameters: [Parameters.accept],
|
|
655
|
+
serializer
|
|
656
|
+
};
|
|
657
|
+
const listByResourceGroupNextOperationSpec = {
|
|
658
|
+
path: "{nextLink}",
|
|
659
|
+
httpMethod: "GET",
|
|
660
|
+
responses: {
|
|
661
|
+
200: {
|
|
662
|
+
bodyMapper: Mappers.ContainerGroupListResult
|
|
663
|
+
},
|
|
664
|
+
default: {
|
|
665
|
+
bodyMapper: Mappers.CloudError
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
queryParameters: [Parameters.apiVersion],
|
|
669
|
+
urlParameters: [
|
|
670
|
+
Parameters.$host,
|
|
671
|
+
Parameters.subscriptionId,
|
|
672
|
+
Parameters.resourceGroupName,
|
|
673
|
+
Parameters.nextLink
|
|
674
|
+
],
|
|
675
|
+
headerParameters: [Parameters.accept],
|
|
676
|
+
serializer
|
|
677
|
+
};
|
|
678
|
+
//# sourceMappingURL=containerGroups.js.map
|