@azure/arm-cognitiveservices 6.0.0 → 7.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} +1 -1
- package/README.md +70 -95
- package/dist/index.js +4800 -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/cognitiveServicesManagementClient.d.ts +42 -0
- package/dist-esm/src/cognitiveServicesManagementClient.d.ts.map +1 -0
- package/dist-esm/src/cognitiveServicesManagementClient.js +133 -0
- package/dist-esm/src/cognitiveServicesManagementClient.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 +1310 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +128 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +68 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +1017 -713
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +26 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +199 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/accounts.d.ts +138 -0
- package/dist-esm/src/operations/accounts.d.ts.map +1 -0
- package/dist-esm/src/operations/accounts.js +628 -0
- package/dist-esm/src/operations/accounts.js.map +1 -0
- package/dist-esm/src/operations/commitmentPlans.d.ts +76 -0
- package/dist-esm/src/operations/commitmentPlans.d.ts.map +1 -0
- package/dist-esm/src/operations/commitmentPlans.js +293 -0
- package/dist-esm/src/operations/commitmentPlans.js.map +1 -0
- package/dist-esm/src/operations/commitmentTiers.d.ts +35 -0
- package/dist-esm/src/operations/commitmentTiers.d.ts.map +1 -0
- package/dist-esm/src/operations/commitmentTiers.js +132 -0
- package/dist-esm/src/operations/commitmentTiers.js.map +1 -0
- package/dist-esm/src/operations/deletedAccounts.d.ts +57 -0
- package/dist-esm/src/operations/deletedAccounts.d.ts.map +1 -0
- package/dist-esm/src/operations/deletedAccounts.js +232 -0
- package/dist-esm/src/operations/deletedAccounts.js.map +1 -0
- package/dist-esm/src/operations/deployments.d.ts +81 -0
- package/dist-esm/src/operations/deployments.d.ts.map +1 -0
- package/dist-esm/src/operations/deployments.js +331 -0
- package/dist-esm/src/operations/deployments.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +3 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +17 -0
- package/dist-esm/src/operations/index.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/operations/privateEndpointConnections.d.ts +70 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +271 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +20 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +53 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operations/resourceSkus.d.ts +32 -0
- package/dist-esm/src/operations/resourceSkus.d.ts.map +1 -0
- package/dist-esm/src/operations/resourceSkus.js +124 -0
- package/dist-esm/src/operations/resourceSkus.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/accounts.d.ts +102 -0
- package/dist-esm/src/operationsInterfaces/accounts.d.ts.map +1 -0
- package/{esm/models/index.js → dist-esm/src/operationsInterfaces/accounts.js} +2 -1
- package/dist-esm/src/operationsInterfaces/accounts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts +51 -0
- package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts.map +1 -0
- package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/commitmentPlans.js} +2 -9
- package/dist-esm/src/operationsInterfaces/commitmentPlans.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/commitmentTiers.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/commitmentTiers.d.ts.map +1 -0
- package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/commitmentTiers.js} +2 -2
- package/dist-esm/src/operationsInterfaces/commitmentTiers.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts +36 -0
- package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts.map +1 -0
- package/{src/models/resourceSkusMappers.ts → dist-esm/src/operationsInterfaces/deletedAccounts.js} +2 -10
- package/dist-esm/src/operationsInterfaces/deletedAccounts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/deployments.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/deployments.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/deployments.js +9 -0
- package/dist-esm/src/operationsInterfaces/deployments.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +10 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +17 -0
- package/dist-esm/src/operationsInterfaces/index.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/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +62 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/resourceSkus.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/resourceSkus.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/resourceSkus.js +9 -0
- package/dist-esm/src/operationsInterfaces/resourceSkus.js.map +1 -0
- package/dist-esm/test/cognitiveservices_examples.d.ts +4 -0
- package/dist-esm/test/cognitiveservices_examples.d.ts.map +1 -0
- package/dist-esm/test/cognitiveservices_examples.js +127 -0
- package/dist-esm/test/cognitiveservices_examples.js.map +1 -0
- package/package.json +65 -32
- package/review/arm-cognitiveservices.api.md +1150 -0
- package/rollup.config.js +181 -24
- package/src/cognitiveServicesManagementClient.ts +148 -172
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +1122 -1415
- package/src/models/mappers.ts +1161 -835
- package/src/models/parameters.ts +159 -40
- package/src/operations/accounts.ts +587 -574
- package/src/operations/commitmentPlans.ts +394 -0
- package/src/operations/commitmentTiers.ts +158 -0
- package/src/operations/deletedAccounts.ts +197 -185
- package/src/operations/deployments.ts +464 -0
- package/src/operations/index.ts +4 -2
- package/src/operations/operations.ts +85 -85
- package/src/operations/privateEndpointConnections.ts +232 -202
- package/src/operations/privateLinkResources.ts +34 -62
- package/src/operations/resourceSkus.ts +90 -86
- package/src/operationsInterfaces/accounts.ts +195 -0
- package/src/operationsInterfaces/commitmentPlans.ts +93 -0
- package/src/operationsInterfaces/commitmentTiers.ts +24 -0
- package/src/operationsInterfaces/deletedAccounts.ts +68 -0
- package/src/operationsInterfaces/deployments.ts +109 -0
- package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +5 -3
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +115 -0
- package/src/operationsInterfaces/privateLinkResources.ts +27 -0
- package/src/operationsInterfaces/resourceSkus.ts +22 -0
- package/tsconfig.json +3 -3
- package/types/arm-cognitiveservices.d.ts +1860 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-cognitiveservices.js +0 -3385
- package/dist/arm-cognitiveservices.js.map +0 -1
- package/dist/arm-cognitiveservices.min.js +0 -1
- package/dist/arm-cognitiveservices.min.js.map +0 -1
- package/esm/cognitiveServicesManagementClient.d.ts +0 -77
- package/esm/cognitiveServicesManagementClient.d.ts.map +0 -1
- package/esm/cognitiveServicesManagementClient.js +0 -108
- package/esm/cognitiveServicesManagementClient.js.map +0 -1
- package/esm/cognitiveServicesManagementClientContext.d.ts +0 -22
- package/esm/cognitiveServicesManagementClientContext.d.ts.map +0 -1
- package/esm/cognitiveServicesManagementClientContext.js +0 -61
- package/esm/cognitiveServicesManagementClientContext.js.map +0 -1
- package/esm/models/accountsMappers.d.ts +0 -2
- package/esm/models/accountsMappers.d.ts.map +0 -1
- package/esm/models/accountsMappers.js +0 -9
- package/esm/models/accountsMappers.js.map +0 -1
- package/esm/models/deletedAccountsMappers.d.ts +0 -2
- package/esm/models/deletedAccountsMappers.d.ts.map +0 -1
- package/esm/models/deletedAccountsMappers.js +0 -9
- package/esm/models/deletedAccountsMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -1645
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -58
- 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 -11
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -115
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
- package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.js +0 -9
- package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
- package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
- package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
- package/esm/models/privateLinkResourcesMappers.js +0 -9
- package/esm/models/privateLinkResourcesMappers.js.map +0 -1
- package/esm/models/resourceSkusMappers.d.ts +0 -2
- package/esm/models/resourceSkusMappers.d.ts.map +0 -1
- package/esm/models/resourceSkusMappers.js +0 -9
- package/esm/models/resourceSkusMappers.js.map +0 -1
- package/esm/operations/accounts.d.ts +0 -245
- package/esm/operations/accounts.d.ts.map +0 -1
- package/esm/operations/accounts.js +0 -389
- package/esm/operations/accounts.js.map +0 -1
- package/esm/operations/deletedAccounts.d.ts +0 -89
- package/esm/operations/deletedAccounts.d.ts.map +0 -1
- package/esm/operations/deletedAccounts.js +0 -149
- package/esm/operations/deletedAccounts.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.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 -69
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/privateEndpointConnections.d.ts +0 -108
- package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
- package/esm/operations/privateEndpointConnections.js +0 -193
- package/esm/operations/privateEndpointConnections.js.map +0 -1
- package/esm/operations/privateLinkResources.d.ts +0 -34
- package/esm/operations/privateLinkResources.d.ts.map +0 -1
- package/esm/operations/privateLinkResources.js +0 -49
- package/esm/operations/privateLinkResources.js.map +0 -1
- package/esm/operations/resourceSkus.d.ts +0 -46
- package/esm/operations/resourceSkus.d.ts.map +0 -1
- package/esm/operations/resourceSkus.js +0 -70
- package/esm/operations/resourceSkus.js.map +0 -1
- package/src/cognitiveServicesManagementClientContext.ts +0 -74
- package/src/models/accountsMappers.ts +0 -51
- package/src/models/deletedAccountsMappers.ts +0 -44
- package/src/models/privateEndpointConnectionsMappers.ts +0 -44
- package/src/models/privateLinkResourcesMappers.ts +0 -44
|
@@ -0,0 +1,232 @@
|
|
|
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 DeletedAccounts operations. */
|
|
16
|
+
export class DeletedAccountsImpl {
|
|
17
|
+
/**
|
|
18
|
+
* Initialize a new instance of the class DeletedAccounts class.
|
|
19
|
+
* @param client Reference to the service client
|
|
20
|
+
*/
|
|
21
|
+
constructor(client) {
|
|
22
|
+
this.client = client;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Returns all the resources of a particular type belonging to a subscription.
|
|
26
|
+
* @param options The options parameters.
|
|
27
|
+
*/
|
|
28
|
+
list(options) {
|
|
29
|
+
const iter = this.listPagingAll(options);
|
|
30
|
+
return {
|
|
31
|
+
next() {
|
|
32
|
+
return iter.next();
|
|
33
|
+
},
|
|
34
|
+
[Symbol.asyncIterator]() {
|
|
35
|
+
return this;
|
|
36
|
+
},
|
|
37
|
+
byPage: () => {
|
|
38
|
+
return this.listPagingPage(options);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
listPagingPage(options) {
|
|
43
|
+
return __asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
44
|
+
let result = yield __await(this._list(options));
|
|
45
|
+
yield yield __await(result.value || []);
|
|
46
|
+
let continuationToken = result.nextLink;
|
|
47
|
+
while (continuationToken) {
|
|
48
|
+
result = yield __await(this._listNext(continuationToken, options));
|
|
49
|
+
continuationToken = result.nextLink;
|
|
50
|
+
yield yield __await(result.value || []);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
listPagingAll(options) {
|
|
55
|
+
return __asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
56
|
+
var e_1, _a;
|
|
57
|
+
try {
|
|
58
|
+
for (var _b = __asyncValues(this.listPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
59
|
+
const page = _c.value;
|
|
60
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
64
|
+
finally {
|
|
65
|
+
try {
|
|
66
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
67
|
+
}
|
|
68
|
+
finally { if (e_1) throw e_1.error; }
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Returns a Cognitive Services account specified by the parameters.
|
|
74
|
+
* @param location Resource location.
|
|
75
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
76
|
+
* @param accountName The name of Cognitive Services account.
|
|
77
|
+
* @param options The options parameters.
|
|
78
|
+
*/
|
|
79
|
+
get(location, resourceGroupName, accountName, options) {
|
|
80
|
+
return this.client.sendOperationRequest({ location, resourceGroupName, accountName, options }, getOperationSpec);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Deletes a Cognitive Services account from the resource group.
|
|
84
|
+
* @param location Resource location.
|
|
85
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
86
|
+
* @param accountName The name of Cognitive Services account.
|
|
87
|
+
* @param options The options parameters.
|
|
88
|
+
*/
|
|
89
|
+
beginPurge(location, resourceGroupName, accountName, options) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
return this.client.sendOperationRequest(args, spec);
|
|
93
|
+
});
|
|
94
|
+
const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
var _a;
|
|
96
|
+
let currentRawResponse = undefined;
|
|
97
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
98
|
+
const callback = (rawResponse, flatResponse) => {
|
|
99
|
+
currentRawResponse = rawResponse;
|
|
100
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
101
|
+
};
|
|
102
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
103
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
104
|
+
return {
|
|
105
|
+
flatResponse,
|
|
106
|
+
rawResponse: {
|
|
107
|
+
statusCode: currentRawResponse.status,
|
|
108
|
+
body: currentRawResponse.parsedBody,
|
|
109
|
+
headers: currentRawResponse.headers.toJSON()
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
const lro = new LroImpl(sendOperation, { location, resourceGroupName, accountName, options }, purgeOperationSpec);
|
|
114
|
+
return new LroEngine(lro, {
|
|
115
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
116
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Deletes a Cognitive Services account from the resource group.
|
|
122
|
+
* @param location Resource location.
|
|
123
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
124
|
+
* @param accountName The name of Cognitive Services account.
|
|
125
|
+
* @param options The options parameters.
|
|
126
|
+
*/
|
|
127
|
+
beginPurgeAndWait(location, resourceGroupName, accountName, options) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
const poller = yield this.beginPurge(location, resourceGroupName, accountName, options);
|
|
130
|
+
return poller.pollUntilDone();
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Returns all the resources of a particular type belonging to a subscription.
|
|
135
|
+
* @param options The options parameters.
|
|
136
|
+
*/
|
|
137
|
+
_list(options) {
|
|
138
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* ListNext
|
|
142
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
143
|
+
* @param options The options parameters.
|
|
144
|
+
*/
|
|
145
|
+
_listNext(nextLink, options) {
|
|
146
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// Operation Specifications
|
|
150
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
151
|
+
const getOperationSpec = {
|
|
152
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}",
|
|
153
|
+
httpMethod: "GET",
|
|
154
|
+
responses: {
|
|
155
|
+
200: {
|
|
156
|
+
bodyMapper: Mappers.Account
|
|
157
|
+
},
|
|
158
|
+
default: {
|
|
159
|
+
bodyMapper: Mappers.ErrorResponse
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
queryParameters: [Parameters.apiVersion],
|
|
163
|
+
urlParameters: [
|
|
164
|
+
Parameters.$host,
|
|
165
|
+
Parameters.resourceGroupName,
|
|
166
|
+
Parameters.accountName,
|
|
167
|
+
Parameters.subscriptionId,
|
|
168
|
+
Parameters.location
|
|
169
|
+
],
|
|
170
|
+
headerParameters: [Parameters.accept],
|
|
171
|
+
serializer
|
|
172
|
+
};
|
|
173
|
+
const purgeOperationSpec = {
|
|
174
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}",
|
|
175
|
+
httpMethod: "DELETE",
|
|
176
|
+
responses: {
|
|
177
|
+
200: {},
|
|
178
|
+
201: {},
|
|
179
|
+
202: {},
|
|
180
|
+
204: {},
|
|
181
|
+
default: {
|
|
182
|
+
bodyMapper: Mappers.ErrorResponse
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
queryParameters: [Parameters.apiVersion],
|
|
186
|
+
urlParameters: [
|
|
187
|
+
Parameters.$host,
|
|
188
|
+
Parameters.resourceGroupName,
|
|
189
|
+
Parameters.accountName,
|
|
190
|
+
Parameters.subscriptionId,
|
|
191
|
+
Parameters.location
|
|
192
|
+
],
|
|
193
|
+
headerParameters: [Parameters.accept],
|
|
194
|
+
serializer
|
|
195
|
+
};
|
|
196
|
+
const listOperationSpec = {
|
|
197
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/deletedAccounts",
|
|
198
|
+
httpMethod: "GET",
|
|
199
|
+
responses: {
|
|
200
|
+
200: {
|
|
201
|
+
bodyMapper: Mappers.AccountListResult
|
|
202
|
+
},
|
|
203
|
+
default: {
|
|
204
|
+
bodyMapper: Mappers.ErrorResponse
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
queryParameters: [Parameters.apiVersion],
|
|
208
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
209
|
+
headerParameters: [Parameters.accept],
|
|
210
|
+
serializer
|
|
211
|
+
};
|
|
212
|
+
const listNextOperationSpec = {
|
|
213
|
+
path: "{nextLink}",
|
|
214
|
+
httpMethod: "GET",
|
|
215
|
+
responses: {
|
|
216
|
+
200: {
|
|
217
|
+
bodyMapper: Mappers.AccountListResult
|
|
218
|
+
},
|
|
219
|
+
default: {
|
|
220
|
+
bodyMapper: Mappers.ErrorResponse
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
queryParameters: [Parameters.apiVersion],
|
|
224
|
+
urlParameters: [
|
|
225
|
+
Parameters.$host,
|
|
226
|
+
Parameters.subscriptionId,
|
|
227
|
+
Parameters.nextLink
|
|
228
|
+
],
|
|
229
|
+
headerParameters: [Parameters.accept],
|
|
230
|
+
serializer
|
|
231
|
+
};
|
|
232
|
+
//# sourceMappingURL=deletedAccounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deletedAccounts.js","sourceRoot":"","sources":["../../../src/operations/deletedAccounts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYrC,4CAA4C;AAC5C,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAAyC;QACnD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAA2C;QAE3C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAA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AC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
2
|
+
import { Deployments } from "../operationsInterfaces";
|
|
3
|
+
import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
|
|
4
|
+
import { PollerLike, PollOperationState } from "@azure/core-lro";
|
|
5
|
+
import { Deployment, DeploymentsListOptionalParams, DeploymentsGetOptionalParams, DeploymentsGetResponse, DeploymentsCreateOrUpdateOptionalParams, DeploymentsCreateOrUpdateResponse, DeploymentsDeleteOptionalParams } from "../models";
|
|
6
|
+
/** Class containing Deployments operations. */
|
|
7
|
+
export declare class DeploymentsImpl implements Deployments {
|
|
8
|
+
private readonly client;
|
|
9
|
+
/**
|
|
10
|
+
* Initialize a new instance of the class Deployments class.
|
|
11
|
+
* @param client Reference to the service client
|
|
12
|
+
*/
|
|
13
|
+
constructor(client: CognitiveServicesManagementClient);
|
|
14
|
+
/**
|
|
15
|
+
* Gets the deployments associated with the Cognitive Services account.
|
|
16
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
17
|
+
* @param accountName The name of Cognitive Services account.
|
|
18
|
+
* @param options The options parameters.
|
|
19
|
+
*/
|
|
20
|
+
list(resourceGroupName: string, accountName: string, options?: DeploymentsListOptionalParams): PagedAsyncIterableIterator<Deployment>;
|
|
21
|
+
private listPagingPage;
|
|
22
|
+
private listPagingAll;
|
|
23
|
+
/**
|
|
24
|
+
* Gets the deployments associated with the Cognitive Services account.
|
|
25
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
26
|
+
* @param accountName The name of Cognitive Services account.
|
|
27
|
+
* @param options The options parameters.
|
|
28
|
+
*/
|
|
29
|
+
private _list;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the specified deployments associated with the Cognitive Services account.
|
|
32
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
33
|
+
* @param accountName The name of Cognitive Services account.
|
|
34
|
+
* @param deploymentName The name of the deployment associated with the Cognitive Services Account
|
|
35
|
+
* @param options The options parameters.
|
|
36
|
+
*/
|
|
37
|
+
get(resourceGroupName: string, accountName: string, deploymentName: string, options?: DeploymentsGetOptionalParams): Promise<DeploymentsGetResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Update the state of specified deployments associated with the Cognitive Services account.
|
|
40
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
41
|
+
* @param accountName The name of Cognitive Services account.
|
|
42
|
+
* @param deploymentName The name of the deployment associated with the Cognitive Services Account
|
|
43
|
+
* @param deployment The deployment properties.
|
|
44
|
+
* @param options The options parameters.
|
|
45
|
+
*/
|
|
46
|
+
beginCreateOrUpdate(resourceGroupName: string, accountName: string, deploymentName: string, deployment: Deployment, options?: DeploymentsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<DeploymentsCreateOrUpdateResponse>, DeploymentsCreateOrUpdateResponse>>;
|
|
47
|
+
/**
|
|
48
|
+
* Update the state of specified deployments associated with the Cognitive Services account.
|
|
49
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
50
|
+
* @param accountName The name of Cognitive Services account.
|
|
51
|
+
* @param deploymentName The name of the deployment associated with the Cognitive Services Account
|
|
52
|
+
* @param deployment The deployment properties.
|
|
53
|
+
* @param options The options parameters.
|
|
54
|
+
*/
|
|
55
|
+
beginCreateOrUpdateAndWait(resourceGroupName: string, accountName: string, deploymentName: string, deployment: Deployment, options?: DeploymentsCreateOrUpdateOptionalParams): Promise<DeploymentsCreateOrUpdateResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Deletes the specified deployment associated with the Cognitive Services account.
|
|
58
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
59
|
+
* @param accountName The name of Cognitive Services account.
|
|
60
|
+
* @param deploymentName The name of the deployment associated with the Cognitive Services Account
|
|
61
|
+
* @param options The options parameters.
|
|
62
|
+
*/
|
|
63
|
+
beginDelete(resourceGroupName: string, accountName: string, deploymentName: string, options?: DeploymentsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
64
|
+
/**
|
|
65
|
+
* Deletes the specified deployment associated with the Cognitive Services account.
|
|
66
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
67
|
+
* @param accountName The name of Cognitive Services account.
|
|
68
|
+
* @param deploymentName The name of the deployment associated with the Cognitive Services Account
|
|
69
|
+
* @param options The options parameters.
|
|
70
|
+
*/
|
|
71
|
+
beginDeleteAndWait(resourceGroupName: string, accountName: string, deploymentName: string, options?: DeploymentsDeleteOptionalParams): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* ListNext
|
|
74
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
75
|
+
* @param accountName The name of Cognitive Services account.
|
|
76
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
77
|
+
* @param options The options parameters.
|
|
78
|
+
*/
|
|
79
|
+
private _listNext;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=deployments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../../src/operations/deployments.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAa,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EACL,UAAU,EAEV,6BAA6B,EAE7B,4BAA4B,EAC5B,sBAAsB,EACtB,uCAAu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IAmDtD;;;;;;OAMG;IACG,kBAAkB,CACtB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,IAAI,CAAC;IAUhB;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;CAWlB"}
|
|
@@ -0,0 +1,331 @@
|
|
|
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 Deployments operations. */
|
|
16
|
+
export class DeploymentsImpl {
|
|
17
|
+
/**
|
|
18
|
+
* Initialize a new instance of the class Deployments class.
|
|
19
|
+
* @param client Reference to the service client
|
|
20
|
+
*/
|
|
21
|
+
constructor(client) {
|
|
22
|
+
this.client = client;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Gets the deployments associated with the Cognitive Services account.
|
|
26
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
27
|
+
* @param accountName The name of Cognitive Services account.
|
|
28
|
+
* @param options The options parameters.
|
|
29
|
+
*/
|
|
30
|
+
list(resourceGroupName, accountName, options) {
|
|
31
|
+
const iter = this.listPagingAll(resourceGroupName, accountName, options);
|
|
32
|
+
return {
|
|
33
|
+
next() {
|
|
34
|
+
return iter.next();
|
|
35
|
+
},
|
|
36
|
+
[Symbol.asyncIterator]() {
|
|
37
|
+
return this;
|
|
38
|
+
},
|
|
39
|
+
byPage: () => {
|
|
40
|
+
return this.listPagingPage(resourceGroupName, accountName, options);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
listPagingPage(resourceGroupName, accountName, options) {
|
|
45
|
+
return __asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
46
|
+
let result = yield __await(this._list(resourceGroupName, accountName, options));
|
|
47
|
+
yield yield __await(result.value || []);
|
|
48
|
+
let continuationToken = result.nextLink;
|
|
49
|
+
while (continuationToken) {
|
|
50
|
+
result = yield __await(this._listNext(resourceGroupName, accountName, continuationToken, options));
|
|
51
|
+
continuationToken = result.nextLink;
|
|
52
|
+
yield yield __await(result.value || []);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
listPagingAll(resourceGroupName, accountName, options) {
|
|
57
|
+
return __asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
58
|
+
var e_1, _a;
|
|
59
|
+
try {
|
|
60
|
+
for (var _b = __asyncValues(this.listPagingPage(resourceGroupName, accountName, 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
|
+
* Gets the deployments associated with the Cognitive Services account.
|
|
76
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
77
|
+
* @param accountName The name of Cognitive Services account.
|
|
78
|
+
* @param options The options parameters.
|
|
79
|
+
*/
|
|
80
|
+
_list(resourceGroupName, accountName, options) {
|
|
81
|
+
return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listOperationSpec);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Gets the specified deployments associated with the Cognitive Services account.
|
|
85
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
86
|
+
* @param accountName The name of Cognitive Services account.
|
|
87
|
+
* @param deploymentName The name of the deployment associated with the Cognitive Services Account
|
|
88
|
+
* @param options The options parameters.
|
|
89
|
+
*/
|
|
90
|
+
get(resourceGroupName, accountName, deploymentName, options) {
|
|
91
|
+
return this.client.sendOperationRequest({ resourceGroupName, accountName, deploymentName, options }, getOperationSpec);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Update the state of specified deployments associated with the Cognitive Services account.
|
|
95
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
96
|
+
* @param accountName The name of Cognitive Services account.
|
|
97
|
+
* @param deploymentName The name of the deployment associated with the Cognitive Services Account
|
|
98
|
+
* @param deployment The deployment properties.
|
|
99
|
+
* @param options The options parameters.
|
|
100
|
+
*/
|
|
101
|
+
beginCreateOrUpdate(resourceGroupName, accountName, deploymentName, deployment, options) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
return this.client.sendOperationRequest(args, spec);
|
|
105
|
+
});
|
|
106
|
+
const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
var _a;
|
|
108
|
+
let currentRawResponse = undefined;
|
|
109
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
110
|
+
const callback = (rawResponse, flatResponse) => {
|
|
111
|
+
currentRawResponse = rawResponse;
|
|
112
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
113
|
+
};
|
|
114
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
115
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
116
|
+
return {
|
|
117
|
+
flatResponse,
|
|
118
|
+
rawResponse: {
|
|
119
|
+
statusCode: currentRawResponse.status,
|
|
120
|
+
body: currentRawResponse.parsedBody,
|
|
121
|
+
headers: currentRawResponse.headers.toJSON()
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, deploymentName, deployment, options }, createOrUpdateOperationSpec);
|
|
126
|
+
return new LroEngine(lro, {
|
|
127
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
128
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Update the state of specified deployments associated with the Cognitive Services account.
|
|
134
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
135
|
+
* @param accountName The name of Cognitive Services account.
|
|
136
|
+
* @param deploymentName The name of the deployment associated with the Cognitive Services Account
|
|
137
|
+
* @param deployment The deployment properties.
|
|
138
|
+
* @param options The options parameters.
|
|
139
|
+
*/
|
|
140
|
+
beginCreateOrUpdateAndWait(resourceGroupName, accountName, deploymentName, deployment, options) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
const poller = yield this.beginCreateOrUpdate(resourceGroupName, accountName, deploymentName, deployment, options);
|
|
143
|
+
return poller.pollUntilDone();
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Deletes the specified deployment associated with the Cognitive Services account.
|
|
148
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
149
|
+
* @param accountName The name of Cognitive Services account.
|
|
150
|
+
* @param deploymentName The name of the deployment associated with the Cognitive Services Account
|
|
151
|
+
* @param options The options parameters.
|
|
152
|
+
*/
|
|
153
|
+
beginDelete(resourceGroupName, accountName, deploymentName, options) {
|
|
154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
return this.client.sendOperationRequest(args, spec);
|
|
157
|
+
});
|
|
158
|
+
const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
var _a;
|
|
160
|
+
let currentRawResponse = undefined;
|
|
161
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
162
|
+
const callback = (rawResponse, flatResponse) => {
|
|
163
|
+
currentRawResponse = rawResponse;
|
|
164
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
165
|
+
};
|
|
166
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
167
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
168
|
+
return {
|
|
169
|
+
flatResponse,
|
|
170
|
+
rawResponse: {
|
|
171
|
+
statusCode: currentRawResponse.status,
|
|
172
|
+
body: currentRawResponse.parsedBody,
|
|
173
|
+
headers: currentRawResponse.headers.toJSON()
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
});
|
|
177
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, deploymentName, options }, deleteOperationSpec);
|
|
178
|
+
return new LroEngine(lro, {
|
|
179
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
180
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Deletes the specified deployment associated with the Cognitive Services account.
|
|
186
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
187
|
+
* @param accountName The name of Cognitive Services account.
|
|
188
|
+
* @param deploymentName The name of the deployment associated with the Cognitive Services Account
|
|
189
|
+
* @param options The options parameters.
|
|
190
|
+
*/
|
|
191
|
+
beginDeleteAndWait(resourceGroupName, accountName, deploymentName, options) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
const poller = yield this.beginDelete(resourceGroupName, accountName, deploymentName, options);
|
|
194
|
+
return poller.pollUntilDone();
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* ListNext
|
|
199
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
200
|
+
* @param accountName The name of Cognitive Services account.
|
|
201
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
202
|
+
* @param options The options parameters.
|
|
203
|
+
*/
|
|
204
|
+
_listNext(resourceGroupName, accountName, nextLink, options) {
|
|
205
|
+
return this.client.sendOperationRequest({ resourceGroupName, accountName, nextLink, options }, listNextOperationSpec);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
// Operation Specifications
|
|
209
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
210
|
+
const listOperationSpec = {
|
|
211
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments",
|
|
212
|
+
httpMethod: "GET",
|
|
213
|
+
responses: {
|
|
214
|
+
200: {
|
|
215
|
+
bodyMapper: Mappers.DeploymentListResult
|
|
216
|
+
},
|
|
217
|
+
default: {
|
|
218
|
+
bodyMapper: Mappers.ErrorResponse
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
queryParameters: [Parameters.apiVersion],
|
|
222
|
+
urlParameters: [
|
|
223
|
+
Parameters.$host,
|
|
224
|
+
Parameters.resourceGroupName,
|
|
225
|
+
Parameters.accountName,
|
|
226
|
+
Parameters.subscriptionId
|
|
227
|
+
],
|
|
228
|
+
headerParameters: [Parameters.accept],
|
|
229
|
+
serializer
|
|
230
|
+
};
|
|
231
|
+
const getOperationSpec = {
|
|
232
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}",
|
|
233
|
+
httpMethod: "GET",
|
|
234
|
+
responses: {
|
|
235
|
+
200: {
|
|
236
|
+
bodyMapper: Mappers.Deployment
|
|
237
|
+
},
|
|
238
|
+
default: {
|
|
239
|
+
bodyMapper: Mappers.ErrorResponse
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
queryParameters: [Parameters.apiVersion],
|
|
243
|
+
urlParameters: [
|
|
244
|
+
Parameters.$host,
|
|
245
|
+
Parameters.resourceGroupName,
|
|
246
|
+
Parameters.accountName,
|
|
247
|
+
Parameters.subscriptionId,
|
|
248
|
+
Parameters.deploymentName
|
|
249
|
+
],
|
|
250
|
+
headerParameters: [Parameters.accept],
|
|
251
|
+
serializer
|
|
252
|
+
};
|
|
253
|
+
const createOrUpdateOperationSpec = {
|
|
254
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}",
|
|
255
|
+
httpMethod: "PUT",
|
|
256
|
+
responses: {
|
|
257
|
+
200: {
|
|
258
|
+
bodyMapper: Mappers.Deployment
|
|
259
|
+
},
|
|
260
|
+
201: {
|
|
261
|
+
bodyMapper: Mappers.Deployment
|
|
262
|
+
},
|
|
263
|
+
202: {
|
|
264
|
+
bodyMapper: Mappers.Deployment
|
|
265
|
+
},
|
|
266
|
+
204: {
|
|
267
|
+
bodyMapper: Mappers.Deployment
|
|
268
|
+
},
|
|
269
|
+
default: {
|
|
270
|
+
bodyMapper: Mappers.ErrorResponse
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
requestBody: Parameters.deployment,
|
|
274
|
+
queryParameters: [Parameters.apiVersion],
|
|
275
|
+
urlParameters: [
|
|
276
|
+
Parameters.$host,
|
|
277
|
+
Parameters.resourceGroupName,
|
|
278
|
+
Parameters.accountName,
|
|
279
|
+
Parameters.subscriptionId,
|
|
280
|
+
Parameters.deploymentName
|
|
281
|
+
],
|
|
282
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
283
|
+
mediaType: "json",
|
|
284
|
+
serializer
|
|
285
|
+
};
|
|
286
|
+
const deleteOperationSpec = {
|
|
287
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}",
|
|
288
|
+
httpMethod: "DELETE",
|
|
289
|
+
responses: {
|
|
290
|
+
200: {},
|
|
291
|
+
201: {},
|
|
292
|
+
202: {},
|
|
293
|
+
204: {},
|
|
294
|
+
default: {
|
|
295
|
+
bodyMapper: Mappers.ErrorResponse
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
queryParameters: [Parameters.apiVersion],
|
|
299
|
+
urlParameters: [
|
|
300
|
+
Parameters.$host,
|
|
301
|
+
Parameters.resourceGroupName,
|
|
302
|
+
Parameters.accountName,
|
|
303
|
+
Parameters.subscriptionId,
|
|
304
|
+
Parameters.deploymentName
|
|
305
|
+
],
|
|
306
|
+
headerParameters: [Parameters.accept],
|
|
307
|
+
serializer
|
|
308
|
+
};
|
|
309
|
+
const listNextOperationSpec = {
|
|
310
|
+
path: "{nextLink}",
|
|
311
|
+
httpMethod: "GET",
|
|
312
|
+
responses: {
|
|
313
|
+
200: {
|
|
314
|
+
bodyMapper: Mappers.DeploymentListResult
|
|
315
|
+
},
|
|
316
|
+
default: {
|
|
317
|
+
bodyMapper: Mappers.ErrorResponse
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
queryParameters: [Parameters.apiVersion],
|
|
321
|
+
urlParameters: [
|
|
322
|
+
Parameters.$host,
|
|
323
|
+
Parameters.resourceGroupName,
|
|
324
|
+
Parameters.accountName,
|
|
325
|
+
Parameters.subscriptionId,
|
|
326
|
+
Parameters.nextLink
|
|
327
|
+
],
|
|
328
|
+
headerParameters: [Parameters.accept],
|
|
329
|
+
serializer
|
|
330
|
+
};
|
|
331
|
+
//# sourceMappingURL=deployments.js.map
|