@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
|
@@ -3,804 +3,807 @@
|
|
|
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
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
13
|
-
import * as Mappers from "../models/
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Accounts } 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 {
|
|
14
|
+
import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
Account,
|
|
19
|
+
AccountsListByResourceGroupNextOptionalParams,
|
|
20
|
+
AccountsListByResourceGroupOptionalParams,
|
|
21
|
+
AccountsListNextOptionalParams,
|
|
22
|
+
AccountsListOptionalParams,
|
|
23
|
+
AccountsCreateOptionalParams,
|
|
24
|
+
AccountsCreateResponse,
|
|
25
|
+
AccountsUpdateOptionalParams,
|
|
26
|
+
AccountsUpdateResponse,
|
|
27
|
+
AccountsDeleteOptionalParams,
|
|
28
|
+
AccountsGetOptionalParams,
|
|
29
|
+
AccountsGetResponse,
|
|
30
|
+
AccountsListByResourceGroupResponse,
|
|
31
|
+
AccountsListResponse,
|
|
32
|
+
AccountsListKeysOptionalParams,
|
|
33
|
+
AccountsListKeysResponse,
|
|
34
|
+
KeyName,
|
|
35
|
+
AccountsRegenerateKeyOptionalParams,
|
|
36
|
+
AccountsRegenerateKeyResponse,
|
|
37
|
+
AccountsListSkusOptionalParams,
|
|
38
|
+
AccountsListSkusResponse,
|
|
39
|
+
AccountsListUsagesOptionalParams,
|
|
40
|
+
AccountsListUsagesResponse,
|
|
41
|
+
AccountsListByResourceGroupNextResponse,
|
|
42
|
+
AccountsListNextResponse
|
|
43
|
+
} from "../models";
|
|
16
44
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
45
|
+
/// <reference lib="esnext.asynciterable" />
|
|
46
|
+
/** Class containing Accounts operations. */
|
|
47
|
+
export class AccountsImpl implements Accounts {
|
|
48
|
+
private readonly client: CognitiveServicesManagementClient;
|
|
20
49
|
|
|
21
50
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
51
|
+
* Initialize a new instance of the class Accounts class.
|
|
52
|
+
* @param client Reference to the service client
|
|
24
53
|
*/
|
|
25
|
-
constructor(client:
|
|
54
|
+
constructor(client: CognitiveServicesManagementClient) {
|
|
26
55
|
this.client = client;
|
|
27
56
|
}
|
|
28
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Returns all the resources of a particular type belonging to a resource group
|
|
60
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
61
|
+
* @param options The options parameters.
|
|
62
|
+
*/
|
|
63
|
+
public listByResourceGroup(
|
|
64
|
+
resourceGroupName: string,
|
|
65
|
+
options?: AccountsListByResourceGroupOptionalParams
|
|
66
|
+
): PagedAsyncIterableIterator<Account> {
|
|
67
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
68
|
+
return {
|
|
69
|
+
next() {
|
|
70
|
+
return iter.next();
|
|
71
|
+
},
|
|
72
|
+
[Symbol.asyncIterator]() {
|
|
73
|
+
return this;
|
|
74
|
+
},
|
|
75
|
+
byPage: () => {
|
|
76
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private async *listByResourceGroupPagingPage(
|
|
82
|
+
resourceGroupName: string,
|
|
83
|
+
options?: AccountsListByResourceGroupOptionalParams
|
|
84
|
+
): AsyncIterableIterator<Account[]> {
|
|
85
|
+
let result = await this._listByResourceGroup(resourceGroupName, options);
|
|
86
|
+
yield result.value || [];
|
|
87
|
+
let continuationToken = result.nextLink;
|
|
88
|
+
while (continuationToken) {
|
|
89
|
+
result = await this._listByResourceGroupNext(
|
|
90
|
+
resourceGroupName,
|
|
91
|
+
continuationToken,
|
|
92
|
+
options
|
|
93
|
+
);
|
|
94
|
+
continuationToken = result.nextLink;
|
|
95
|
+
yield result.value || [];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
private async *listByResourceGroupPagingAll(
|
|
100
|
+
resourceGroupName: string,
|
|
101
|
+
options?: AccountsListByResourceGroupOptionalParams
|
|
102
|
+
): AsyncIterableIterator<Account> {
|
|
103
|
+
for await (const page of this.listByResourceGroupPagingPage(
|
|
104
|
+
resourceGroupName,
|
|
105
|
+
options
|
|
106
|
+
)) {
|
|
107
|
+
yield* page;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Returns all the resources of a particular type belonging to a subscription.
|
|
113
|
+
* @param options The options parameters.
|
|
114
|
+
*/
|
|
115
|
+
public list(
|
|
116
|
+
options?: AccountsListOptionalParams
|
|
117
|
+
): PagedAsyncIterableIterator<Account> {
|
|
118
|
+
const iter = this.listPagingAll(options);
|
|
119
|
+
return {
|
|
120
|
+
next() {
|
|
121
|
+
return iter.next();
|
|
122
|
+
},
|
|
123
|
+
[Symbol.asyncIterator]() {
|
|
124
|
+
return this;
|
|
125
|
+
},
|
|
126
|
+
byPage: () => {
|
|
127
|
+
return this.listPagingPage(options);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
private async *listPagingPage(
|
|
133
|
+
options?: AccountsListOptionalParams
|
|
134
|
+
): AsyncIterableIterator<Account[]> {
|
|
135
|
+
let result = await this._list(options);
|
|
136
|
+
yield result.value || [];
|
|
137
|
+
let continuationToken = result.nextLink;
|
|
138
|
+
while (continuationToken) {
|
|
139
|
+
result = await this._listNext(continuationToken, options);
|
|
140
|
+
continuationToken = result.nextLink;
|
|
141
|
+
yield result.value || [];
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
private async *listPagingAll(
|
|
146
|
+
options?: AccountsListOptionalParams
|
|
147
|
+
): AsyncIterableIterator<Account> {
|
|
148
|
+
for await (const page of this.listPagingPage(options)) {
|
|
149
|
+
yield* page;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
29
153
|
/**
|
|
30
154
|
* Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the
|
|
31
155
|
* keys for developer to access intelligent APIs. It's also the resource type for billing.
|
|
32
156
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
33
157
|
* @param accountName The name of Cognitive Services account.
|
|
34
158
|
* @param account The parameters to provide for the created account.
|
|
35
|
-
* @param
|
|
36
|
-
* @returns Promise<Models.AccountsCreateResponse>
|
|
159
|
+
* @param options The options parameters.
|
|
37
160
|
*/
|
|
38
|
-
|
|
161
|
+
async beginCreate(
|
|
39
162
|
resourceGroupName: string,
|
|
40
163
|
accountName: string,
|
|
41
|
-
account:
|
|
42
|
-
options?:
|
|
43
|
-
): Promise<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
164
|
+
account: Account,
|
|
165
|
+
options?: AccountsCreateOptionalParams
|
|
166
|
+
): Promise<
|
|
167
|
+
PollerLike<
|
|
168
|
+
PollOperationState<AccountsCreateResponse>,
|
|
169
|
+
AccountsCreateResponse
|
|
170
|
+
>
|
|
171
|
+
> {
|
|
172
|
+
const directSendOperation = async (
|
|
173
|
+
args: coreClient.OperationArguments,
|
|
174
|
+
spec: coreClient.OperationSpec
|
|
175
|
+
): Promise<AccountsCreateResponse> => {
|
|
176
|
+
return this.client.sendOperationRequest(args, spec);
|
|
177
|
+
};
|
|
178
|
+
const sendOperation = async (
|
|
179
|
+
args: coreClient.OperationArguments,
|
|
180
|
+
spec: coreClient.OperationSpec
|
|
181
|
+
) => {
|
|
182
|
+
let currentRawResponse:
|
|
183
|
+
| coreClient.FullOperationResponse
|
|
184
|
+
| undefined = undefined;
|
|
185
|
+
const providedCallback = args.options?.onResponse;
|
|
186
|
+
const callback: coreClient.RawResponseCallback = (
|
|
187
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
188
|
+
flatResponse: unknown
|
|
189
|
+
) => {
|
|
190
|
+
currentRawResponse = rawResponse;
|
|
191
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
192
|
+
};
|
|
193
|
+
const updatedArgs = {
|
|
194
|
+
...args,
|
|
195
|
+
options: {
|
|
196
|
+
...args.options,
|
|
197
|
+
onResponse: callback
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
201
|
+
return {
|
|
202
|
+
flatResponse,
|
|
203
|
+
rawResponse: {
|
|
204
|
+
statusCode: currentRawResponse!.status,
|
|
205
|
+
body: currentRawResponse!.parsedBody,
|
|
206
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const lro = new LroImpl(
|
|
212
|
+
sendOperation,
|
|
213
|
+
{ resourceGroupName, accountName, account, options },
|
|
214
|
+
createOperationSpec
|
|
215
|
+
);
|
|
216
|
+
return new LroEngine(lro, {
|
|
217
|
+
resumeFrom: options?.resumeFrom,
|
|
218
|
+
intervalInMs: options?.updateIntervalInMs
|
|
219
|
+
});
|
|
47
220
|
}
|
|
48
221
|
|
|
49
222
|
/**
|
|
50
|
-
*
|
|
223
|
+
* Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the
|
|
224
|
+
* keys for developer to access intelligent APIs. It's also the resource type for billing.
|
|
51
225
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
52
226
|
* @param accountName The name of Cognitive Services account.
|
|
53
227
|
* @param account The parameters to provide for the created account.
|
|
54
|
-
* @param
|
|
55
|
-
* @returns Promise<Models.AccountsUpdateResponse>
|
|
228
|
+
* @param options The options parameters.
|
|
56
229
|
*/
|
|
57
|
-
|
|
230
|
+
async beginCreateAndWait(
|
|
58
231
|
resourceGroupName: string,
|
|
59
232
|
accountName: string,
|
|
60
|
-
account:
|
|
61
|
-
options?:
|
|
62
|
-
): Promise<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
233
|
+
account: Account,
|
|
234
|
+
options?: AccountsCreateOptionalParams
|
|
235
|
+
): Promise<AccountsCreateResponse> {
|
|
236
|
+
const poller = await this.beginCreate(
|
|
237
|
+
resourceGroupName,
|
|
238
|
+
accountName,
|
|
239
|
+
account,
|
|
240
|
+
options
|
|
241
|
+
);
|
|
242
|
+
return poller.pollUntilDone();
|
|
66
243
|
}
|
|
67
244
|
|
|
68
245
|
/**
|
|
69
|
-
*
|
|
246
|
+
* Updates a Cognitive Services account
|
|
70
247
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
71
248
|
* @param accountName The name of Cognitive Services account.
|
|
72
|
-
* @param
|
|
73
|
-
* @
|
|
249
|
+
* @param account The parameters to provide for the created account.
|
|
250
|
+
* @param options The options parameters.
|
|
74
251
|
*/
|
|
75
|
-
|
|
252
|
+
async beginUpdate(
|
|
76
253
|
resourceGroupName: string,
|
|
77
254
|
accountName: string,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
255
|
+
account: Account,
|
|
256
|
+
options?: AccountsUpdateOptionalParams
|
|
257
|
+
): Promise<
|
|
258
|
+
PollerLike<
|
|
259
|
+
PollOperationState<AccountsUpdateResponse>,
|
|
260
|
+
AccountsUpdateResponse
|
|
261
|
+
>
|
|
262
|
+
> {
|
|
263
|
+
const directSendOperation = async (
|
|
264
|
+
args: coreClient.OperationArguments,
|
|
265
|
+
spec: coreClient.OperationSpec
|
|
266
|
+
): Promise<AccountsUpdateResponse> => {
|
|
267
|
+
return this.client.sendOperationRequest(args, spec);
|
|
268
|
+
};
|
|
269
|
+
const sendOperation = async (
|
|
270
|
+
args: coreClient.OperationArguments,
|
|
271
|
+
spec: coreClient.OperationSpec
|
|
272
|
+
) => {
|
|
273
|
+
let currentRawResponse:
|
|
274
|
+
| coreClient.FullOperationResponse
|
|
275
|
+
| undefined = undefined;
|
|
276
|
+
const providedCallback = args.options?.onResponse;
|
|
277
|
+
const callback: coreClient.RawResponseCallback = (
|
|
278
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
279
|
+
flatResponse: unknown
|
|
280
|
+
) => {
|
|
281
|
+
currentRawResponse = rawResponse;
|
|
282
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
283
|
+
};
|
|
284
|
+
const updatedArgs = {
|
|
285
|
+
...args,
|
|
286
|
+
options: {
|
|
287
|
+
...args.options,
|
|
288
|
+
onResponse: callback
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
292
|
+
return {
|
|
293
|
+
flatResponse,
|
|
294
|
+
rawResponse: {
|
|
295
|
+
statusCode: currentRawResponse!.status,
|
|
296
|
+
body: currentRawResponse!.parsedBody,
|
|
297
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
const lro = new LroImpl(
|
|
303
|
+
sendOperation,
|
|
304
|
+
{ resourceGroupName, accountName, account, options },
|
|
305
|
+
updateOperationSpec
|
|
82
306
|
);
|
|
307
|
+
return new LroEngine(lro, {
|
|
308
|
+
resumeFrom: options?.resumeFrom,
|
|
309
|
+
intervalInMs: options?.updateIntervalInMs
|
|
310
|
+
});
|
|
83
311
|
}
|
|
84
312
|
|
|
85
313
|
/**
|
|
86
|
-
*
|
|
314
|
+
* Updates a Cognitive Services account
|
|
87
315
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
88
316
|
* @param accountName The name of Cognitive Services account.
|
|
89
|
-
* @param
|
|
90
|
-
* @
|
|
317
|
+
* @param account The parameters to provide for the created account.
|
|
318
|
+
* @param options The options parameters.
|
|
91
319
|
*/
|
|
92
|
-
|
|
320
|
+
async beginUpdateAndWait(
|
|
93
321
|
resourceGroupName: string,
|
|
94
322
|
accountName: string,
|
|
95
|
-
|
|
96
|
-
|
|
323
|
+
account: Account,
|
|
324
|
+
options?: AccountsUpdateOptionalParams
|
|
325
|
+
): Promise<AccountsUpdateResponse> {
|
|
326
|
+
const poller = await this.beginUpdate(
|
|
327
|
+
resourceGroupName,
|
|
328
|
+
accountName,
|
|
329
|
+
account,
|
|
330
|
+
options
|
|
331
|
+
);
|
|
332
|
+
return poller.pollUntilDone();
|
|
333
|
+
}
|
|
334
|
+
|
|
97
335
|
/**
|
|
336
|
+
* Deletes a Cognitive Services account from the resource group.
|
|
98
337
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
99
338
|
* @param accountName The name of Cognitive Services account.
|
|
100
|
-
* @param
|
|
339
|
+
* @param options The options parameters.
|
|
101
340
|
*/
|
|
102
|
-
|
|
341
|
+
async beginDelete(
|
|
103
342
|
resourceGroupName: string,
|
|
104
343
|
accountName: string,
|
|
105
|
-
|
|
106
|
-
): void
|
|
344
|
+
options?: AccountsDeleteOptionalParams
|
|
345
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
346
|
+
const directSendOperation = async (
|
|
347
|
+
args: coreClient.OperationArguments,
|
|
348
|
+
spec: coreClient.OperationSpec
|
|
349
|
+
): Promise<void> => {
|
|
350
|
+
return this.client.sendOperationRequest(args, spec);
|
|
351
|
+
};
|
|
352
|
+
const sendOperation = async (
|
|
353
|
+
args: coreClient.OperationArguments,
|
|
354
|
+
spec: coreClient.OperationSpec
|
|
355
|
+
) => {
|
|
356
|
+
let currentRawResponse:
|
|
357
|
+
| coreClient.FullOperationResponse
|
|
358
|
+
| undefined = undefined;
|
|
359
|
+
const providedCallback = args.options?.onResponse;
|
|
360
|
+
const callback: coreClient.RawResponseCallback = (
|
|
361
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
362
|
+
flatResponse: unknown
|
|
363
|
+
) => {
|
|
364
|
+
currentRawResponse = rawResponse;
|
|
365
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
366
|
+
};
|
|
367
|
+
const updatedArgs = {
|
|
368
|
+
...args,
|
|
369
|
+
options: {
|
|
370
|
+
...args.options,
|
|
371
|
+
onResponse: callback
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
375
|
+
return {
|
|
376
|
+
flatResponse,
|
|
377
|
+
rawResponse: {
|
|
378
|
+
statusCode: currentRawResponse!.status,
|
|
379
|
+
body: currentRawResponse!.parsedBody,
|
|
380
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
const lro = new LroImpl(
|
|
386
|
+
sendOperation,
|
|
387
|
+
{ resourceGroupName, accountName, options },
|
|
388
|
+
deleteOperationSpec
|
|
389
|
+
);
|
|
390
|
+
return new LroEngine(lro, {
|
|
391
|
+
resumeFrom: options?.resumeFrom,
|
|
392
|
+
intervalInMs: options?.updateIntervalInMs
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
|
|
107
396
|
/**
|
|
397
|
+
* Deletes a Cognitive Services account from the resource group.
|
|
108
398
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
109
399
|
* @param accountName The name of Cognitive Services account.
|
|
110
|
-
* @param options The
|
|
111
|
-
* @param callback The callback
|
|
400
|
+
* @param options The options parameters.
|
|
112
401
|
*/
|
|
113
|
-
|
|
402
|
+
async beginDeleteAndWait(
|
|
114
403
|
resourceGroupName: string,
|
|
115
404
|
accountName: string,
|
|
116
|
-
options
|
|
117
|
-
|
|
118
|
-
|
|
405
|
+
options?: AccountsDeleteOptionalParams
|
|
406
|
+
): Promise<void> {
|
|
407
|
+
const poller = await this.beginDelete(
|
|
408
|
+
resourceGroupName,
|
|
409
|
+
accountName,
|
|
410
|
+
options
|
|
411
|
+
);
|
|
412
|
+
return poller.pollUntilDone();
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Returns a Cognitive Services account specified by the parameters.
|
|
417
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
418
|
+
* @param accountName The name of Cognitive Services account.
|
|
419
|
+
* @param options The options parameters.
|
|
420
|
+
*/
|
|
119
421
|
get(
|
|
120
422
|
resourceGroupName: string,
|
|
121
423
|
accountName: string,
|
|
122
|
-
options?:
|
|
123
|
-
|
|
124
|
-
): Promise<Models.AccountsGetResponse> {
|
|
424
|
+
options?: AccountsGetOptionalParams
|
|
425
|
+
): Promise<AccountsGetResponse> {
|
|
125
426
|
return this.client.sendOperationRequest(
|
|
126
|
-
{
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
options
|
|
130
|
-
},
|
|
131
|
-
getOperationSpec,
|
|
132
|
-
callback
|
|
133
|
-
) as Promise<Models.AccountsGetResponse>;
|
|
427
|
+
{ resourceGroupName, accountName, options },
|
|
428
|
+
getOperationSpec
|
|
429
|
+
);
|
|
134
430
|
}
|
|
135
431
|
|
|
136
432
|
/**
|
|
137
433
|
* Returns all the resources of a particular type belonging to a resource group
|
|
138
434
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
139
|
-
* @param
|
|
140
|
-
* @returns Promise<Models.AccountsListByResourceGroupResponse>
|
|
141
|
-
*/
|
|
142
|
-
listByResourceGroup(
|
|
143
|
-
resourceGroupName: string,
|
|
144
|
-
options?: msRest.RequestOptionsBase
|
|
145
|
-
): Promise<Models.AccountsListByResourceGroupResponse>;
|
|
146
|
-
/**
|
|
147
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
148
|
-
* @param callback The callback
|
|
149
|
-
*/
|
|
150
|
-
listByResourceGroup(
|
|
151
|
-
resourceGroupName: string,
|
|
152
|
-
callback: msRest.ServiceCallback<Models.AccountListResult>
|
|
153
|
-
): void;
|
|
154
|
-
/**
|
|
155
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
156
|
-
* @param options The optional parameters
|
|
157
|
-
* @param callback The callback
|
|
435
|
+
* @param options The options parameters.
|
|
158
436
|
*/
|
|
159
|
-
|
|
160
|
-
resourceGroupName: string,
|
|
161
|
-
options: msRest.RequestOptionsBase,
|
|
162
|
-
callback: msRest.ServiceCallback<Models.AccountListResult>
|
|
163
|
-
): void;
|
|
164
|
-
listByResourceGroup(
|
|
437
|
+
private _listByResourceGroup(
|
|
165
438
|
resourceGroupName: string,
|
|
166
|
-
options?:
|
|
167
|
-
|
|
168
|
-
): Promise<Models.AccountsListByResourceGroupResponse> {
|
|
439
|
+
options?: AccountsListByResourceGroupOptionalParams
|
|
440
|
+
): Promise<AccountsListByResourceGroupResponse> {
|
|
169
441
|
return this.client.sendOperationRequest(
|
|
170
|
-
{
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
},
|
|
174
|
-
listByResourceGroupOperationSpec,
|
|
175
|
-
callback
|
|
176
|
-
) as Promise<Models.AccountsListByResourceGroupResponse>;
|
|
442
|
+
{ resourceGroupName, options },
|
|
443
|
+
listByResourceGroupOperationSpec
|
|
444
|
+
);
|
|
177
445
|
}
|
|
178
446
|
|
|
179
447
|
/**
|
|
180
448
|
* Returns all the resources of a particular type belonging to a subscription.
|
|
181
|
-
* @param
|
|
182
|
-
* @returns Promise<Models.AccountsListResponse>
|
|
449
|
+
* @param options The options parameters.
|
|
183
450
|
*/
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
list(callback: msRest.ServiceCallback<Models.AccountListResult>): void;
|
|
189
|
-
/**
|
|
190
|
-
* @param options The optional parameters
|
|
191
|
-
* @param callback The callback
|
|
192
|
-
*/
|
|
193
|
-
list(
|
|
194
|
-
options: msRest.RequestOptionsBase,
|
|
195
|
-
callback: msRest.ServiceCallback<Models.AccountListResult>
|
|
196
|
-
): void;
|
|
197
|
-
list(
|
|
198
|
-
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AccountListResult>,
|
|
199
|
-
callback?: msRest.ServiceCallback<Models.AccountListResult>
|
|
200
|
-
): Promise<Models.AccountsListResponse> {
|
|
201
|
-
return this.client.sendOperationRequest(
|
|
202
|
-
{
|
|
203
|
-
options
|
|
204
|
-
},
|
|
205
|
-
listOperationSpec,
|
|
206
|
-
callback
|
|
207
|
-
) as Promise<Models.AccountsListResponse>;
|
|
451
|
+
private _list(
|
|
452
|
+
options?: AccountsListOptionalParams
|
|
453
|
+
): Promise<AccountsListResponse> {
|
|
454
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
208
455
|
}
|
|
209
456
|
|
|
210
457
|
/**
|
|
211
458
|
* Lists the account keys for the specified Cognitive Services account.
|
|
212
459
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
213
460
|
* @param accountName The name of Cognitive Services account.
|
|
214
|
-
* @param
|
|
215
|
-
* @returns Promise<Models.AccountsListKeysResponse>
|
|
216
|
-
*/
|
|
217
|
-
listKeys(
|
|
218
|
-
resourceGroupName: string,
|
|
219
|
-
accountName: string,
|
|
220
|
-
options?: msRest.RequestOptionsBase
|
|
221
|
-
): Promise<Models.AccountsListKeysResponse>;
|
|
222
|
-
/**
|
|
223
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
224
|
-
* @param accountName The name of Cognitive Services account.
|
|
225
|
-
* @param callback The callback
|
|
461
|
+
* @param options The options parameters.
|
|
226
462
|
*/
|
|
227
463
|
listKeys(
|
|
228
464
|
resourceGroupName: string,
|
|
229
465
|
accountName: string,
|
|
230
|
-
|
|
231
|
-
):
|
|
232
|
-
/**
|
|
233
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
234
|
-
* @param accountName The name of Cognitive Services account.
|
|
235
|
-
* @param options The optional parameters
|
|
236
|
-
* @param callback The callback
|
|
237
|
-
*/
|
|
238
|
-
listKeys(
|
|
239
|
-
resourceGroupName: string,
|
|
240
|
-
accountName: string,
|
|
241
|
-
options: msRest.RequestOptionsBase,
|
|
242
|
-
callback: msRest.ServiceCallback<Models.ApiKeys>
|
|
243
|
-
): void;
|
|
244
|
-
listKeys(
|
|
245
|
-
resourceGroupName: string,
|
|
246
|
-
accountName: string,
|
|
247
|
-
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ApiKeys>,
|
|
248
|
-
callback?: msRest.ServiceCallback<Models.ApiKeys>
|
|
249
|
-
): Promise<Models.AccountsListKeysResponse> {
|
|
466
|
+
options?: AccountsListKeysOptionalParams
|
|
467
|
+
): Promise<AccountsListKeysResponse> {
|
|
250
468
|
return this.client.sendOperationRequest(
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
options
|
|
255
|
-
},
|
|
256
|
-
listKeysOperationSpec,
|
|
257
|
-
callback
|
|
258
|
-
) as Promise<Models.AccountsListKeysResponse>;
|
|
469
|
+
{ resourceGroupName, accountName, options },
|
|
470
|
+
listKeysOperationSpec
|
|
471
|
+
);
|
|
259
472
|
}
|
|
260
473
|
|
|
261
474
|
/**
|
|
262
475
|
* Regenerates the specified account key for the specified Cognitive Services account.
|
|
263
476
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
264
477
|
* @param accountName The name of Cognitive Services account.
|
|
265
|
-
* @param keyName key name to generate (Key1|Key2)
|
|
266
|
-
* @param
|
|
267
|
-
* @returns Promise<Models.AccountsRegenerateKeyResponse>
|
|
478
|
+
* @param keyName key name to generate (Key1|Key2)
|
|
479
|
+
* @param options The options parameters.
|
|
268
480
|
*/
|
|
269
481
|
regenerateKey(
|
|
270
482
|
resourceGroupName: string,
|
|
271
483
|
accountName: string,
|
|
272
|
-
keyName:
|
|
273
|
-
options?:
|
|
274
|
-
): Promise<
|
|
275
|
-
/**
|
|
276
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
277
|
-
* @param accountName The name of Cognitive Services account.
|
|
278
|
-
* @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2'
|
|
279
|
-
* @param callback The callback
|
|
280
|
-
*/
|
|
281
|
-
regenerateKey(
|
|
282
|
-
resourceGroupName: string,
|
|
283
|
-
accountName: string,
|
|
284
|
-
keyName: Models.KeyName,
|
|
285
|
-
callback: msRest.ServiceCallback<Models.ApiKeys>
|
|
286
|
-
): void;
|
|
287
|
-
/**
|
|
288
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
289
|
-
* @param accountName The name of Cognitive Services account.
|
|
290
|
-
* @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2'
|
|
291
|
-
* @param options The optional parameters
|
|
292
|
-
* @param callback The callback
|
|
293
|
-
*/
|
|
294
|
-
regenerateKey(
|
|
295
|
-
resourceGroupName: string,
|
|
296
|
-
accountName: string,
|
|
297
|
-
keyName: Models.KeyName,
|
|
298
|
-
options: msRest.RequestOptionsBase,
|
|
299
|
-
callback: msRest.ServiceCallback<Models.ApiKeys>
|
|
300
|
-
): void;
|
|
301
|
-
regenerateKey(
|
|
302
|
-
resourceGroupName: string,
|
|
303
|
-
accountName: string,
|
|
304
|
-
keyName: Models.KeyName,
|
|
305
|
-
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ApiKeys>,
|
|
306
|
-
callback?: msRest.ServiceCallback<Models.ApiKeys>
|
|
307
|
-
): Promise<Models.AccountsRegenerateKeyResponse> {
|
|
484
|
+
keyName: KeyName,
|
|
485
|
+
options?: AccountsRegenerateKeyOptionalParams
|
|
486
|
+
): Promise<AccountsRegenerateKeyResponse> {
|
|
308
487
|
return this.client.sendOperationRequest(
|
|
309
|
-
{
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
keyName,
|
|
313
|
-
options
|
|
314
|
-
},
|
|
315
|
-
regenerateKeyOperationSpec,
|
|
316
|
-
callback
|
|
317
|
-
) as Promise<Models.AccountsRegenerateKeyResponse>;
|
|
488
|
+
{ resourceGroupName, accountName, keyName, options },
|
|
489
|
+
regenerateKeyOperationSpec
|
|
490
|
+
);
|
|
318
491
|
}
|
|
319
492
|
|
|
320
493
|
/**
|
|
321
494
|
* List available SKUs for the requested Cognitive Services account
|
|
322
495
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
323
496
|
* @param accountName The name of Cognitive Services account.
|
|
324
|
-
* @param
|
|
325
|
-
* @returns Promise<Models.AccountsListSkusResponse>
|
|
497
|
+
* @param options The options parameters.
|
|
326
498
|
*/
|
|
327
499
|
listSkus(
|
|
328
500
|
resourceGroupName: string,
|
|
329
501
|
accountName: string,
|
|
330
|
-
options?:
|
|
331
|
-
): Promise<
|
|
332
|
-
/**
|
|
333
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
334
|
-
* @param accountName The name of Cognitive Services account.
|
|
335
|
-
* @param callback The callback
|
|
336
|
-
*/
|
|
337
|
-
listSkus(
|
|
338
|
-
resourceGroupName: string,
|
|
339
|
-
accountName: string,
|
|
340
|
-
callback: msRest.ServiceCallback<Models.AccountSkuListResult>
|
|
341
|
-
): void;
|
|
342
|
-
/**
|
|
343
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
344
|
-
* @param accountName The name of Cognitive Services account.
|
|
345
|
-
* @param options The optional parameters
|
|
346
|
-
* @param callback The callback
|
|
347
|
-
*/
|
|
348
|
-
listSkus(
|
|
349
|
-
resourceGroupName: string,
|
|
350
|
-
accountName: string,
|
|
351
|
-
options: msRest.RequestOptionsBase,
|
|
352
|
-
callback: msRest.ServiceCallback<Models.AccountSkuListResult>
|
|
353
|
-
): void;
|
|
354
|
-
listSkus(
|
|
355
|
-
resourceGroupName: string,
|
|
356
|
-
accountName: string,
|
|
357
|
-
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AccountSkuListResult>,
|
|
358
|
-
callback?: msRest.ServiceCallback<Models.AccountSkuListResult>
|
|
359
|
-
): Promise<Models.AccountsListSkusResponse> {
|
|
502
|
+
options?: AccountsListSkusOptionalParams
|
|
503
|
+
): Promise<AccountsListSkusResponse> {
|
|
360
504
|
return this.client.sendOperationRequest(
|
|
361
|
-
{
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
options
|
|
365
|
-
},
|
|
366
|
-
listSkusOperationSpec,
|
|
367
|
-
callback
|
|
368
|
-
) as Promise<Models.AccountsListSkusResponse>;
|
|
505
|
+
{ resourceGroupName, accountName, options },
|
|
506
|
+
listSkusOperationSpec
|
|
507
|
+
);
|
|
369
508
|
}
|
|
370
509
|
|
|
371
510
|
/**
|
|
372
511
|
* Get usages for the requested Cognitive Services account
|
|
373
512
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
374
513
|
* @param accountName The name of Cognitive Services account.
|
|
375
|
-
* @param
|
|
376
|
-
* @returns Promise<Models.AccountsListUsagesResponse>
|
|
377
|
-
*/
|
|
378
|
-
listUsages(
|
|
379
|
-
resourceGroupName: string,
|
|
380
|
-
accountName: string,
|
|
381
|
-
options?: Models.AccountsListUsagesOptionalParams
|
|
382
|
-
): Promise<Models.AccountsListUsagesResponse>;
|
|
383
|
-
/**
|
|
384
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
385
|
-
* @param accountName The name of Cognitive Services account.
|
|
386
|
-
* @param callback The callback
|
|
387
|
-
*/
|
|
388
|
-
listUsages(
|
|
389
|
-
resourceGroupName: string,
|
|
390
|
-
accountName: string,
|
|
391
|
-
callback: msRest.ServiceCallback<Models.UsageListResult>
|
|
392
|
-
): void;
|
|
393
|
-
/**
|
|
394
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
395
|
-
* @param accountName The name of Cognitive Services account.
|
|
396
|
-
* @param options The optional parameters
|
|
397
|
-
* @param callback The callback
|
|
514
|
+
* @param options The options parameters.
|
|
398
515
|
*/
|
|
399
516
|
listUsages(
|
|
400
517
|
resourceGroupName: string,
|
|
401
518
|
accountName: string,
|
|
402
|
-
options
|
|
403
|
-
|
|
404
|
-
): void;
|
|
405
|
-
listUsages(
|
|
406
|
-
resourceGroupName: string,
|
|
407
|
-
accountName: string,
|
|
408
|
-
options?:
|
|
409
|
-
| Models.AccountsListUsagesOptionalParams
|
|
410
|
-
| msRest.ServiceCallback<Models.UsageListResult>,
|
|
411
|
-
callback?: msRest.ServiceCallback<Models.UsageListResult>
|
|
412
|
-
): Promise<Models.AccountsListUsagesResponse> {
|
|
519
|
+
options?: AccountsListUsagesOptionalParams
|
|
520
|
+
): Promise<AccountsListUsagesResponse> {
|
|
413
521
|
return this.client.sendOperationRequest(
|
|
414
|
-
{
|
|
415
|
-
|
|
416
|
-
accountName,
|
|
417
|
-
options
|
|
418
|
-
},
|
|
419
|
-
listUsagesOperationSpec,
|
|
420
|
-
callback
|
|
421
|
-
) as Promise<Models.AccountsListUsagesResponse>;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the
|
|
426
|
-
* keys for developer to access intelligent APIs. It's also the resource type for billing.
|
|
427
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
428
|
-
* @param accountName The name of Cognitive Services account.
|
|
429
|
-
* @param account The parameters to provide for the created account.
|
|
430
|
-
* @param [options] The optional parameters
|
|
431
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
432
|
-
*/
|
|
433
|
-
beginCreate(
|
|
434
|
-
resourceGroupName: string,
|
|
435
|
-
accountName: string,
|
|
436
|
-
account: Models.Account,
|
|
437
|
-
options?: msRest.RequestOptionsBase
|
|
438
|
-
): Promise<msRestAzure.LROPoller> {
|
|
439
|
-
return this.client.sendLRORequest(
|
|
440
|
-
{
|
|
441
|
-
resourceGroupName,
|
|
442
|
-
accountName,
|
|
443
|
-
account,
|
|
444
|
-
options
|
|
445
|
-
},
|
|
446
|
-
beginCreateOperationSpec,
|
|
447
|
-
options
|
|
522
|
+
{ resourceGroupName, accountName, options },
|
|
523
|
+
listUsagesOperationSpec
|
|
448
524
|
);
|
|
449
525
|
}
|
|
450
526
|
|
|
451
527
|
/**
|
|
452
|
-
*
|
|
528
|
+
* ListByResourceGroupNext
|
|
453
529
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
454
|
-
* @param
|
|
455
|
-
* @param
|
|
456
|
-
* @param [options] The optional parameters
|
|
457
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
530
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
531
|
+
* @param options The options parameters.
|
|
458
532
|
*/
|
|
459
|
-
|
|
533
|
+
private _listByResourceGroupNext(
|
|
460
534
|
resourceGroupName: string,
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
): Promise<msRestAzure.LROPoller> {
|
|
465
|
-
return this.client.sendLRORequest(
|
|
466
|
-
{
|
|
467
|
-
resourceGroupName,
|
|
468
|
-
accountName,
|
|
469
|
-
account,
|
|
470
|
-
options
|
|
471
|
-
},
|
|
472
|
-
beginUpdateOperationSpec,
|
|
473
|
-
options
|
|
474
|
-
);
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* Deletes a Cognitive Services account from the resource group.
|
|
479
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
480
|
-
* @param accountName The name of Cognitive Services account.
|
|
481
|
-
* @param [options] The optional parameters
|
|
482
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
483
|
-
*/
|
|
484
|
-
beginDeleteMethod(
|
|
485
|
-
resourceGroupName: string,
|
|
486
|
-
accountName: string,
|
|
487
|
-
options?: msRest.RequestOptionsBase
|
|
488
|
-
): Promise<msRestAzure.LROPoller> {
|
|
489
|
-
return this.client.sendLRORequest(
|
|
490
|
-
{
|
|
491
|
-
resourceGroupName,
|
|
492
|
-
accountName,
|
|
493
|
-
options
|
|
494
|
-
},
|
|
495
|
-
beginDeleteMethodOperationSpec,
|
|
496
|
-
options
|
|
497
|
-
);
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Returns all the resources of a particular type belonging to a resource group
|
|
502
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
503
|
-
* @param [options] The optional parameters
|
|
504
|
-
* @returns Promise<Models.AccountsListByResourceGroupNextResponse>
|
|
505
|
-
*/
|
|
506
|
-
listByResourceGroupNext(
|
|
507
|
-
nextPageLink: string,
|
|
508
|
-
options?: msRest.RequestOptionsBase
|
|
509
|
-
): Promise<Models.AccountsListByResourceGroupNextResponse>;
|
|
510
|
-
/**
|
|
511
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
512
|
-
* @param callback The callback
|
|
513
|
-
*/
|
|
514
|
-
listByResourceGroupNext(
|
|
515
|
-
nextPageLink: string,
|
|
516
|
-
callback: msRest.ServiceCallback<Models.AccountListResult>
|
|
517
|
-
): void;
|
|
518
|
-
/**
|
|
519
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
520
|
-
* @param options The optional parameters
|
|
521
|
-
* @param callback The callback
|
|
522
|
-
*/
|
|
523
|
-
listByResourceGroupNext(
|
|
524
|
-
nextPageLink: string,
|
|
525
|
-
options: msRest.RequestOptionsBase,
|
|
526
|
-
callback: msRest.ServiceCallback<Models.AccountListResult>
|
|
527
|
-
): void;
|
|
528
|
-
listByResourceGroupNext(
|
|
529
|
-
nextPageLink: string,
|
|
530
|
-
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AccountListResult>,
|
|
531
|
-
callback?: msRest.ServiceCallback<Models.AccountListResult>
|
|
532
|
-
): Promise<Models.AccountsListByResourceGroupNextResponse> {
|
|
535
|
+
nextLink: string,
|
|
536
|
+
options?: AccountsListByResourceGroupNextOptionalParams
|
|
537
|
+
): Promise<AccountsListByResourceGroupNextResponse> {
|
|
533
538
|
return this.client.sendOperationRequest(
|
|
534
|
-
{
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
},
|
|
538
|
-
listByResourceGroupNextOperationSpec,
|
|
539
|
-
callback
|
|
540
|
-
) as Promise<Models.AccountsListByResourceGroupNextResponse>;
|
|
539
|
+
{ resourceGroupName, nextLink, options },
|
|
540
|
+
listByResourceGroupNextOperationSpec
|
|
541
|
+
);
|
|
541
542
|
}
|
|
542
543
|
|
|
543
544
|
/**
|
|
544
|
-
*
|
|
545
|
-
* @param
|
|
546
|
-
* @param
|
|
547
|
-
* @returns Promise<Models.AccountsListNextResponse>
|
|
548
|
-
*/
|
|
549
|
-
listNext(
|
|
550
|
-
nextPageLink: string,
|
|
551
|
-
options?: msRest.RequestOptionsBase
|
|
552
|
-
): Promise<Models.AccountsListNextResponse>;
|
|
553
|
-
/**
|
|
554
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
555
|
-
* @param callback The callback
|
|
556
|
-
*/
|
|
557
|
-
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.AccountListResult>): void;
|
|
558
|
-
/**
|
|
559
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
560
|
-
* @param options The optional parameters
|
|
561
|
-
* @param callback The callback
|
|
545
|
+
* ListNext
|
|
546
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
547
|
+
* @param options The options parameters.
|
|
562
548
|
*/
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
options
|
|
566
|
-
|
|
567
|
-
): void;
|
|
568
|
-
listNext(
|
|
569
|
-
nextPageLink: string,
|
|
570
|
-
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AccountListResult>,
|
|
571
|
-
callback?: msRest.ServiceCallback<Models.AccountListResult>
|
|
572
|
-
): Promise<Models.AccountsListNextResponse> {
|
|
549
|
+
private _listNext(
|
|
550
|
+
nextLink: string,
|
|
551
|
+
options?: AccountsListNextOptionalParams
|
|
552
|
+
): Promise<AccountsListNextResponse> {
|
|
573
553
|
return this.client.sendOperationRequest(
|
|
574
|
-
{
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
},
|
|
578
|
-
listNextOperationSpec,
|
|
579
|
-
callback
|
|
580
|
-
) as Promise<Models.AccountsListNextResponse>;
|
|
554
|
+
{ nextLink, options },
|
|
555
|
+
listNextOperationSpec
|
|
556
|
+
);
|
|
581
557
|
}
|
|
582
558
|
}
|
|
583
|
-
|
|
584
559
|
// Operation Specifications
|
|
585
|
-
const serializer =
|
|
586
|
-
|
|
587
|
-
|
|
560
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
561
|
+
|
|
562
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
|
588
563
|
path:
|
|
589
|
-
"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
|
|
590
|
-
|
|
591
|
-
queryParameters: [Parameters.apiVersion],
|
|
592
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
564
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
|
|
565
|
+
httpMethod: "PUT",
|
|
593
566
|
responses: {
|
|
594
567
|
200: {
|
|
595
568
|
bodyMapper: Mappers.Account
|
|
596
569
|
},
|
|
570
|
+
201: {
|
|
571
|
+
bodyMapper: Mappers.Account
|
|
572
|
+
},
|
|
573
|
+
202: {
|
|
574
|
+
bodyMapper: Mappers.Account
|
|
575
|
+
},
|
|
576
|
+
204: {
|
|
577
|
+
bodyMapper: Mappers.Account
|
|
578
|
+
},
|
|
597
579
|
default: {
|
|
598
580
|
bodyMapper: Mappers.ErrorResponse
|
|
599
581
|
}
|
|
600
582
|
},
|
|
583
|
+
requestBody: Parameters.account,
|
|
584
|
+
queryParameters: [Parameters.apiVersion],
|
|
585
|
+
urlParameters: [
|
|
586
|
+
Parameters.$host,
|
|
587
|
+
Parameters.resourceGroupName,
|
|
588
|
+
Parameters.accountName,
|
|
589
|
+
Parameters.subscriptionId
|
|
590
|
+
],
|
|
591
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
592
|
+
mediaType: "json",
|
|
601
593
|
serializer
|
|
602
594
|
};
|
|
603
|
-
|
|
604
|
-
const listByResourceGroupOperationSpec: msRest.OperationSpec = {
|
|
605
|
-
httpMethod: "GET",
|
|
595
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
606
596
|
path:
|
|
607
|
-
"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts",
|
|
608
|
-
|
|
609
|
-
queryParameters: [Parameters.apiVersion],
|
|
610
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
597
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
|
|
598
|
+
httpMethod: "PATCH",
|
|
611
599
|
responses: {
|
|
612
600
|
200: {
|
|
613
|
-
bodyMapper: Mappers.
|
|
601
|
+
bodyMapper: Mappers.Account
|
|
602
|
+
},
|
|
603
|
+
201: {
|
|
604
|
+
bodyMapper: Mappers.Account
|
|
605
|
+
},
|
|
606
|
+
202: {
|
|
607
|
+
bodyMapper: Mappers.Account
|
|
608
|
+
},
|
|
609
|
+
204: {
|
|
610
|
+
bodyMapper: Mappers.Account
|
|
614
611
|
},
|
|
615
612
|
default: {
|
|
616
613
|
bodyMapper: Mappers.ErrorResponse
|
|
617
614
|
}
|
|
618
615
|
},
|
|
616
|
+
requestBody: Parameters.account,
|
|
617
|
+
queryParameters: [Parameters.apiVersion],
|
|
618
|
+
urlParameters: [
|
|
619
|
+
Parameters.$host,
|
|
620
|
+
Parameters.resourceGroupName,
|
|
621
|
+
Parameters.accountName,
|
|
622
|
+
Parameters.subscriptionId
|
|
623
|
+
],
|
|
624
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
625
|
+
mediaType: "json",
|
|
619
626
|
serializer
|
|
620
627
|
};
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
urlParameters: [Parameters.subscriptionId],
|
|
626
|
-
queryParameters: [Parameters.apiVersion],
|
|
627
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
628
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
629
|
+
path:
|
|
630
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
|
|
631
|
+
httpMethod: "DELETE",
|
|
628
632
|
responses: {
|
|
629
|
-
200: {
|
|
630
|
-
|
|
631
|
-
},
|
|
633
|
+
200: {},
|
|
634
|
+
201: {},
|
|
635
|
+
202: {},
|
|
636
|
+
204: {},
|
|
632
637
|
default: {
|
|
633
638
|
bodyMapper: Mappers.ErrorResponse
|
|
634
639
|
}
|
|
635
640
|
},
|
|
641
|
+
queryParameters: [Parameters.apiVersion],
|
|
642
|
+
urlParameters: [
|
|
643
|
+
Parameters.$host,
|
|
644
|
+
Parameters.resourceGroupName,
|
|
645
|
+
Parameters.accountName,
|
|
646
|
+
Parameters.subscriptionId
|
|
647
|
+
],
|
|
648
|
+
headerParameters: [Parameters.accept],
|
|
636
649
|
serializer
|
|
637
650
|
};
|
|
638
|
-
|
|
639
|
-
const listKeysOperationSpec: msRest.OperationSpec = {
|
|
640
|
-
httpMethod: "POST",
|
|
651
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
641
652
|
path:
|
|
642
|
-
"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}
|
|
643
|
-
|
|
644
|
-
queryParameters: [Parameters.apiVersion],
|
|
645
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
653
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
|
|
654
|
+
httpMethod: "GET",
|
|
646
655
|
responses: {
|
|
647
656
|
200: {
|
|
648
|
-
bodyMapper: Mappers.
|
|
657
|
+
bodyMapper: Mappers.Account
|
|
649
658
|
},
|
|
650
659
|
default: {
|
|
651
660
|
bodyMapper: Mappers.ErrorResponse
|
|
652
661
|
}
|
|
653
662
|
},
|
|
663
|
+
queryParameters: [Parameters.apiVersion],
|
|
664
|
+
urlParameters: [
|
|
665
|
+
Parameters.$host,
|
|
666
|
+
Parameters.resourceGroupName,
|
|
667
|
+
Parameters.accountName,
|
|
668
|
+
Parameters.subscriptionId
|
|
669
|
+
],
|
|
670
|
+
headerParameters: [Parameters.accept],
|
|
654
671
|
serializer
|
|
655
672
|
};
|
|
656
|
-
|
|
657
|
-
const regenerateKeyOperationSpec: msRest.OperationSpec = {
|
|
658
|
-
httpMethod: "POST",
|
|
673
|
+
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
659
674
|
path:
|
|
660
|
-
"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts
|
|
661
|
-
|
|
662
|
-
queryParameters: [Parameters.apiVersion],
|
|
663
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
664
|
-
requestBody: {
|
|
665
|
-
parameterPath: {
|
|
666
|
-
keyName: "keyName"
|
|
667
|
-
},
|
|
668
|
-
mapper: {
|
|
669
|
-
...Mappers.RegenerateKeyParameters,
|
|
670
|
-
required: true
|
|
671
|
-
}
|
|
672
|
-
},
|
|
675
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts",
|
|
676
|
+
httpMethod: "GET",
|
|
673
677
|
responses: {
|
|
674
678
|
200: {
|
|
675
|
-
bodyMapper: Mappers.
|
|
679
|
+
bodyMapper: Mappers.AccountListResult
|
|
676
680
|
},
|
|
677
681
|
default: {
|
|
678
682
|
bodyMapper: Mappers.ErrorResponse
|
|
679
683
|
}
|
|
680
684
|
},
|
|
685
|
+
queryParameters: [Parameters.apiVersion],
|
|
686
|
+
urlParameters: [
|
|
687
|
+
Parameters.$host,
|
|
688
|
+
Parameters.resourceGroupName,
|
|
689
|
+
Parameters.subscriptionId
|
|
690
|
+
],
|
|
691
|
+
headerParameters: [Parameters.accept],
|
|
681
692
|
serializer
|
|
682
693
|
};
|
|
683
|
-
|
|
684
|
-
const listSkusOperationSpec: msRest.OperationSpec = {
|
|
685
|
-
httpMethod: "GET",
|
|
694
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
686
695
|
path:
|
|
687
|
-
"subscriptions/{subscriptionId}/
|
|
688
|
-
|
|
689
|
-
queryParameters: [Parameters.apiVersion],
|
|
690
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
696
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts",
|
|
697
|
+
httpMethod: "GET",
|
|
691
698
|
responses: {
|
|
692
699
|
200: {
|
|
693
|
-
bodyMapper: Mappers.
|
|
700
|
+
bodyMapper: Mappers.AccountListResult
|
|
694
701
|
},
|
|
695
702
|
default: {
|
|
696
703
|
bodyMapper: Mappers.ErrorResponse
|
|
697
704
|
}
|
|
698
705
|
},
|
|
706
|
+
queryParameters: [Parameters.apiVersion],
|
|
707
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
708
|
+
headerParameters: [Parameters.accept],
|
|
699
709
|
serializer
|
|
700
710
|
};
|
|
701
|
-
|
|
702
|
-
const listUsagesOperationSpec: msRest.OperationSpec = {
|
|
703
|
-
httpMethod: "GET",
|
|
711
|
+
const listKeysOperationSpec: coreClient.OperationSpec = {
|
|
704
712
|
path:
|
|
705
|
-
"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/
|
|
706
|
-
|
|
707
|
-
queryParameters: [Parameters.apiVersion, Parameters.filter],
|
|
708
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
713
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys",
|
|
714
|
+
httpMethod: "POST",
|
|
709
715
|
responses: {
|
|
710
716
|
200: {
|
|
711
|
-
bodyMapper: Mappers.
|
|
717
|
+
bodyMapper: Mappers.ApiKeys
|
|
712
718
|
},
|
|
713
719
|
default: {
|
|
714
720
|
bodyMapper: Mappers.ErrorResponse
|
|
715
721
|
}
|
|
716
722
|
},
|
|
723
|
+
queryParameters: [Parameters.apiVersion],
|
|
724
|
+
urlParameters: [
|
|
725
|
+
Parameters.$host,
|
|
726
|
+
Parameters.resourceGroupName,
|
|
727
|
+
Parameters.accountName,
|
|
728
|
+
Parameters.subscriptionId
|
|
729
|
+
],
|
|
730
|
+
headerParameters: [Parameters.accept],
|
|
717
731
|
serializer
|
|
718
732
|
};
|
|
719
|
-
|
|
720
|
-
const beginCreateOperationSpec: msRest.OperationSpec = {
|
|
721
|
-
httpMethod: "PUT",
|
|
733
|
+
const regenerateKeyOperationSpec: coreClient.OperationSpec = {
|
|
722
734
|
path:
|
|
723
|
-
"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
|
|
724
|
-
|
|
725
|
-
queryParameters: [Parameters.apiVersion],
|
|
726
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
727
|
-
requestBody: {
|
|
728
|
-
parameterPath: "account",
|
|
729
|
-
mapper: {
|
|
730
|
-
...Mappers.Account,
|
|
731
|
-
required: true
|
|
732
|
-
}
|
|
733
|
-
},
|
|
735
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey",
|
|
736
|
+
httpMethod: "POST",
|
|
734
737
|
responses: {
|
|
735
738
|
200: {
|
|
736
|
-
bodyMapper: Mappers.
|
|
737
|
-
},
|
|
738
|
-
201: {
|
|
739
|
-
bodyMapper: Mappers.Account
|
|
740
|
-
},
|
|
741
|
-
202: {
|
|
742
|
-
bodyMapper: Mappers.Account
|
|
739
|
+
bodyMapper: Mappers.ApiKeys
|
|
743
740
|
},
|
|
744
741
|
default: {
|
|
745
742
|
bodyMapper: Mappers.ErrorResponse
|
|
746
743
|
}
|
|
747
744
|
},
|
|
745
|
+
requestBody: {
|
|
746
|
+
parameterPath: { keyName: ["keyName"] },
|
|
747
|
+
mapper: { ...Mappers.RegenerateKeyParameters, required: true }
|
|
748
|
+
},
|
|
749
|
+
queryParameters: [Parameters.apiVersion],
|
|
750
|
+
urlParameters: [
|
|
751
|
+
Parameters.$host,
|
|
752
|
+
Parameters.resourceGroupName,
|
|
753
|
+
Parameters.accountName,
|
|
754
|
+
Parameters.subscriptionId
|
|
755
|
+
],
|
|
756
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
757
|
+
mediaType: "json",
|
|
748
758
|
serializer
|
|
749
759
|
};
|
|
750
|
-
|
|
751
|
-
const beginUpdateOperationSpec: msRest.OperationSpec = {
|
|
752
|
-
httpMethod: "PATCH",
|
|
760
|
+
const listSkusOperationSpec: coreClient.OperationSpec = {
|
|
753
761
|
path:
|
|
754
|
-
"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
|
|
755
|
-
|
|
756
|
-
queryParameters: [Parameters.apiVersion],
|
|
757
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
758
|
-
requestBody: {
|
|
759
|
-
parameterPath: "account",
|
|
760
|
-
mapper: {
|
|
761
|
-
...Mappers.Account,
|
|
762
|
-
required: true
|
|
763
|
-
}
|
|
764
|
-
},
|
|
762
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus",
|
|
763
|
+
httpMethod: "GET",
|
|
765
764
|
responses: {
|
|
766
765
|
200: {
|
|
767
|
-
bodyMapper: Mappers.
|
|
768
|
-
},
|
|
769
|
-
202: {
|
|
770
|
-
bodyMapper: Mappers.Account
|
|
766
|
+
bodyMapper: Mappers.AccountSkuListResult
|
|
771
767
|
},
|
|
772
768
|
default: {
|
|
773
769
|
bodyMapper: Mappers.ErrorResponse
|
|
774
770
|
}
|
|
775
771
|
},
|
|
772
|
+
queryParameters: [Parameters.apiVersion],
|
|
773
|
+
urlParameters: [
|
|
774
|
+
Parameters.$host,
|
|
775
|
+
Parameters.resourceGroupName,
|
|
776
|
+
Parameters.accountName,
|
|
777
|
+
Parameters.subscriptionId
|
|
778
|
+
],
|
|
779
|
+
headerParameters: [Parameters.accept],
|
|
776
780
|
serializer
|
|
777
781
|
};
|
|
778
|
-
|
|
779
|
-
const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
|
|
780
|
-
httpMethod: "DELETE",
|
|
782
|
+
const listUsagesOperationSpec: coreClient.OperationSpec = {
|
|
781
783
|
path:
|
|
782
|
-
"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
|
|
783
|
-
|
|
784
|
-
queryParameters: [Parameters.apiVersion],
|
|
785
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
784
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/usages",
|
|
785
|
+
httpMethod: "GET",
|
|
786
786
|
responses: {
|
|
787
|
-
200: {
|
|
788
|
-
|
|
789
|
-
|
|
787
|
+
200: {
|
|
788
|
+
bodyMapper: Mappers.UsageListResult
|
|
789
|
+
},
|
|
790
790
|
default: {
|
|
791
791
|
bodyMapper: Mappers.ErrorResponse
|
|
792
792
|
}
|
|
793
793
|
},
|
|
794
|
+
queryParameters: [Parameters.apiVersion, Parameters.filter],
|
|
795
|
+
urlParameters: [
|
|
796
|
+
Parameters.$host,
|
|
797
|
+
Parameters.resourceGroupName,
|
|
798
|
+
Parameters.accountName,
|
|
799
|
+
Parameters.subscriptionId
|
|
800
|
+
],
|
|
801
|
+
headerParameters: [Parameters.accept],
|
|
794
802
|
serializer
|
|
795
803
|
};
|
|
796
|
-
|
|
797
|
-
const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
|
|
798
|
-
httpMethod: "GET",
|
|
799
|
-
baseUrl: "https://management.azure.com",
|
|
804
|
+
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
800
805
|
path: "{nextLink}",
|
|
801
|
-
|
|
802
|
-
queryParameters: [Parameters.apiVersion],
|
|
803
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
806
|
+
httpMethod: "GET",
|
|
804
807
|
responses: {
|
|
805
808
|
200: {
|
|
806
809
|
bodyMapper: Mappers.AccountListResult
|
|
@@ -809,16 +812,19 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
|
|
|
809
812
|
bodyMapper: Mappers.ErrorResponse
|
|
810
813
|
}
|
|
811
814
|
},
|
|
815
|
+
queryParameters: [Parameters.apiVersion],
|
|
816
|
+
urlParameters: [
|
|
817
|
+
Parameters.$host,
|
|
818
|
+
Parameters.resourceGroupName,
|
|
819
|
+
Parameters.subscriptionId,
|
|
820
|
+
Parameters.nextLink
|
|
821
|
+
],
|
|
822
|
+
headerParameters: [Parameters.accept],
|
|
812
823
|
serializer
|
|
813
824
|
};
|
|
814
|
-
|
|
815
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
816
|
-
httpMethod: "GET",
|
|
817
|
-
baseUrl: "https://management.azure.com",
|
|
825
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
818
826
|
path: "{nextLink}",
|
|
819
|
-
|
|
820
|
-
queryParameters: [Parameters.apiVersion],
|
|
821
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
827
|
+
httpMethod: "GET",
|
|
822
828
|
responses: {
|
|
823
829
|
200: {
|
|
824
830
|
bodyMapper: Mappers.AccountListResult
|
|
@@ -827,5 +833,12 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|
|
827
833
|
bodyMapper: Mappers.ErrorResponse
|
|
828
834
|
}
|
|
829
835
|
},
|
|
836
|
+
queryParameters: [Parameters.apiVersion],
|
|
837
|
+
urlParameters: [
|
|
838
|
+
Parameters.$host,
|
|
839
|
+
Parameters.subscriptionId,
|
|
840
|
+
Parameters.nextLink
|
|
841
|
+
],
|
|
842
|
+
headerParameters: [Parameters.accept],
|
|
830
843
|
serializer
|
|
831
844
|
};
|