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