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