@azure/arm-cognitiveservices 7.4.1-alpha.20230717.1 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -10
- package/dist/index.js +770 -166
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/accountsCreateSample.js +2 -2
- package/dist-esm/samples-dev/accountsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/accountsGetSample.js +1 -1
- package/dist-esm/samples-dev/accountsListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/accountsListKeysSample.js +1 -1
- package/dist-esm/samples-dev/accountsListModelsSample.js +1 -1
- package/dist-esm/samples-dev/accountsListSample.js +1 -1
- package/dist-esm/samples-dev/accountsListSkusSample.js +1 -1
- package/dist-esm/samples-dev/accountsListUsagesSample.js +1 -1
- package/dist-esm/samples-dev/accountsRegenerateKeySample.js +1 -1
- package/dist-esm/samples-dev/accountsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/checkDomainAvailabilitySample.js +1 -1
- package/dist-esm/samples-dev/checkSkuAvailabilitySample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansCreateOrUpdatePlanSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansDeleteAssociationSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansDeletePlanSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansDeleteSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansGetAssociationSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansGetPlanSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansGetSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansListAssociationsSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansListPlansByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansListPlansBySubscriptionSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansListSample.js +1 -1
- package/dist-esm/samples-dev/commitmentPlansUpdatePlanSample.js +1 -1
- package/dist-esm/samples-dev/commitmentTiersListSample.js +1 -1
- package/dist-esm/samples-dev/deletedAccountsGetSample.js +1 -1
- package/dist-esm/samples-dev/deletedAccountsListSample.js +1 -1
- package/dist-esm/samples-dev/deletedAccountsPurgeSample.js +1 -1
- package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js +3 -5
- package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/deploymentsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/deploymentsGetSample.js +1 -1
- package/dist-esm/samples-dev/deploymentsListSample.js +1 -1
- package/dist-esm/samples-dev/modelsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/modelsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/modelsListSample.js +59 -0
- package/dist-esm/samples-dev/modelsListSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesListSample.js +1 -1
- package/dist-esm/samples-dev/resourceSkusListSample.js +1 -1
- package/dist-esm/samples-dev/usagesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/usagesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usagesListSample.js +59 -0
- package/dist-esm/samples-dev/usagesListSample.js.map +1 -0
- package/dist-esm/src/cognitiveServicesManagementClient.d.ts +3 -1
- package/dist-esm/src/cognitiveServicesManagementClient.d.ts.map +1 -1
- package/dist-esm/src/cognitiveServicesManagementClient.js +5 -3
- package/dist-esm/src/cognitiveServicesManagementClient.js.map +1 -1
- package/dist-esm/src/lroImpl.d.ts +6 -11
- package/dist-esm/src/lroImpl.d.ts.map +1 -1
- package/dist-esm/src/lroImpl.js +12 -20
- package/dist-esm/src/lroImpl.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +144 -5
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +24 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +5 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +229 -1
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.js +1 -1
- package/dist-esm/src/operations/accounts.d.ts +4 -4
- package/dist-esm/src/operations/accounts.d.ts.map +1 -1
- package/dist-esm/src/operations/accounts.js +26 -14
- package/dist-esm/src/operations/accounts.js.map +1 -1
- package/dist-esm/src/operations/commitmentPlans.d.ts +7 -7
- package/dist-esm/src/operations/commitmentPlans.d.ts.map +1 -1
- package/dist-esm/src/operations/commitmentPlans.js +66 -42
- package/dist-esm/src/operations/commitmentPlans.js.map +1 -1
- package/dist-esm/src/operations/deletedAccounts.d.ts +2 -2
- package/dist-esm/src/operations/deletedAccounts.d.ts.map +1 -1
- package/dist-esm/src/operations/deletedAccounts.js +10 -6
- package/dist-esm/src/operations/deletedAccounts.js.map +1 -1
- package/dist-esm/src/operations/deployments.d.ts +3 -3
- package/dist-esm/src/operations/deployments.d.ts.map +1 -1
- package/dist-esm/src/operations/deployments.js +26 -11
- package/dist-esm/src/operations/deployments.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +2 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +2 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/models.d.ts +35 -0
- package/dist-esm/src/operations/models.d.ts.map +1 -0
- package/dist-esm/src/operations/models.js +150 -0
- package/dist-esm/src/operations/models.js.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +3 -3
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.js +29 -21
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operations/usages.d.ts +35 -0
- package/dist-esm/src/operations/usages.d.ts.map +1 -0
- package/dist-esm/src/operations/usages.js +150 -0
- package/dist-esm/src/operations/usages.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/accounts.d.ts +4 -4
- package/dist-esm/src/operationsInterfaces/accounts.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts +7 -7
- package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts +2 -2
- package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/deployments.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/deployments.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +2 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/models.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/models.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/models.js +9 -0
- package/dist-esm/src/operationsInterfaces/models.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/usages.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/usages.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/usages.js +9 -0
- package/dist-esm/src/operationsInterfaces/usages.js.map +1 -0
- package/dist-esm/test/cognitiveservices_congitiveservice.spec.js +1 -1
- package/dist-esm/test/cognitiveservices_congitiveservice.spec.js.map +1 -1
- package/dist-esm/test/cognitiveservices_openai.spec.js +1 -2
- package/dist-esm/test/cognitiveservices_openai.spec.js.map +1 -1
- package/package.json +7 -7
- package/review/arm-cognitiveservices.api.md +127 -16
- package/src/cognitiveServicesManagementClient.ts +10 -2
- package/src/lroImpl.ts +31 -23
- package/src/models/index.ts +160 -5
- package/src/models/mappers.ts +236 -0
- package/src/models/parameters.ts +1 -1
- package/src/operations/accounts.ts +41 -31
- package/src/operations/commitmentPlans.ts +77 -64
- package/src/operations/deletedAccounts.ts +15 -11
- package/src/operations/deployments.ts +36 -22
- package/src/operations/index.ts +2 -0
- package/src/operations/models.ts +170 -0
- package/src/operations/privateEndpointConnections.ts +28 -21
- package/src/operations/usages.ts +170 -0
- package/src/operationsInterfaces/accounts.ts +6 -6
- package/src/operationsInterfaces/commitmentPlans.ts +10 -10
- package/src/operationsInterfaces/deletedAccounts.ts +2 -2
- package/src/operationsInterfaces/deployments.ts +4 -4
- package/src/operationsInterfaces/index.ts +2 -0
- package/src/operationsInterfaces/models.ts +24 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +4 -4
- package/src/operationsInterfaces/usages.ts +24 -0
- package/types/arm-cognitiveservices.d.ts +199 -21
- package/types/tsdoc-metadata.json +1 -1
|
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
|
|
|
13
13
|
import * as Mappers from "../models/mappers";
|
|
14
14
|
import * as Parameters from "../models/parameters";
|
|
15
15
|
import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
18
22
|
import {
|
|
19
23
|
Account,
|
|
20
24
|
AccountsListByResourceGroupNextOptionalParams,
|
|
@@ -278,8 +282,8 @@ export class AccountsImpl implements Accounts {
|
|
|
278
282
|
account: Account,
|
|
279
283
|
options?: AccountsCreateOptionalParams
|
|
280
284
|
): Promise<
|
|
281
|
-
|
|
282
|
-
|
|
285
|
+
SimplePollerLike<
|
|
286
|
+
OperationState<AccountsCreateResponse>,
|
|
283
287
|
AccountsCreateResponse
|
|
284
288
|
>
|
|
285
289
|
> {
|
|
@@ -289,7 +293,7 @@ export class AccountsImpl implements Accounts {
|
|
|
289
293
|
): Promise<AccountsCreateResponse> => {
|
|
290
294
|
return this.client.sendOperationRequest(args, spec);
|
|
291
295
|
};
|
|
292
|
-
const
|
|
296
|
+
const sendOperationFn = async (
|
|
293
297
|
args: coreClient.OperationArguments,
|
|
294
298
|
spec: coreClient.OperationSpec
|
|
295
299
|
) => {
|
|
@@ -322,13 +326,16 @@ export class AccountsImpl implements Accounts {
|
|
|
322
326
|
};
|
|
323
327
|
};
|
|
324
328
|
|
|
325
|
-
const lro =
|
|
326
|
-
|
|
327
|
-
{ resourceGroupName, accountName, account, options },
|
|
328
|
-
createOperationSpec
|
|
329
|
-
);
|
|
330
|
-
const poller =
|
|
331
|
-
|
|
329
|
+
const lro = createLroSpec({
|
|
330
|
+
sendOperationFn,
|
|
331
|
+
args: { resourceGroupName, accountName, account, options },
|
|
332
|
+
spec: createOperationSpec
|
|
333
|
+
});
|
|
334
|
+
const poller = await createHttpPoller<
|
|
335
|
+
AccountsCreateResponse,
|
|
336
|
+
OperationState<AccountsCreateResponse>
|
|
337
|
+
>(lro, {
|
|
338
|
+
restoreFrom: options?.resumeFrom,
|
|
332
339
|
intervalInMs: options?.updateIntervalInMs
|
|
333
340
|
});
|
|
334
341
|
await poller.poll();
|
|
@@ -371,8 +378,8 @@ export class AccountsImpl implements Accounts {
|
|
|
371
378
|
account: Account,
|
|
372
379
|
options?: AccountsUpdateOptionalParams
|
|
373
380
|
): Promise<
|
|
374
|
-
|
|
375
|
-
|
|
381
|
+
SimplePollerLike<
|
|
382
|
+
OperationState<AccountsUpdateResponse>,
|
|
376
383
|
AccountsUpdateResponse
|
|
377
384
|
>
|
|
378
385
|
> {
|
|
@@ -382,7 +389,7 @@ export class AccountsImpl implements Accounts {
|
|
|
382
389
|
): Promise<AccountsUpdateResponse> => {
|
|
383
390
|
return this.client.sendOperationRequest(args, spec);
|
|
384
391
|
};
|
|
385
|
-
const
|
|
392
|
+
const sendOperationFn = async (
|
|
386
393
|
args: coreClient.OperationArguments,
|
|
387
394
|
spec: coreClient.OperationSpec
|
|
388
395
|
) => {
|
|
@@ -415,13 +422,16 @@ export class AccountsImpl implements Accounts {
|
|
|
415
422
|
};
|
|
416
423
|
};
|
|
417
424
|
|
|
418
|
-
const lro =
|
|
419
|
-
|
|
420
|
-
{ resourceGroupName, accountName, account, options },
|
|
421
|
-
updateOperationSpec
|
|
422
|
-
);
|
|
423
|
-
const poller =
|
|
424
|
-
|
|
425
|
+
const lro = createLroSpec({
|
|
426
|
+
sendOperationFn,
|
|
427
|
+
args: { resourceGroupName, accountName, account, options },
|
|
428
|
+
spec: updateOperationSpec
|
|
429
|
+
});
|
|
430
|
+
const poller = await createHttpPoller<
|
|
431
|
+
AccountsUpdateResponse,
|
|
432
|
+
OperationState<AccountsUpdateResponse>
|
|
433
|
+
>(lro, {
|
|
434
|
+
restoreFrom: options?.resumeFrom,
|
|
425
435
|
intervalInMs: options?.updateIntervalInMs
|
|
426
436
|
});
|
|
427
437
|
await poller.poll();
|
|
@@ -460,14 +470,14 @@ export class AccountsImpl implements Accounts {
|
|
|
460
470
|
resourceGroupName: string,
|
|
461
471
|
accountName: string,
|
|
462
472
|
options?: AccountsDeleteOptionalParams
|
|
463
|
-
): Promise<
|
|
473
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
464
474
|
const directSendOperation = async (
|
|
465
475
|
args: coreClient.OperationArguments,
|
|
466
476
|
spec: coreClient.OperationSpec
|
|
467
477
|
): Promise<void> => {
|
|
468
478
|
return this.client.sendOperationRequest(args, spec);
|
|
469
479
|
};
|
|
470
|
-
const
|
|
480
|
+
const sendOperationFn = async (
|
|
471
481
|
args: coreClient.OperationArguments,
|
|
472
482
|
spec: coreClient.OperationSpec
|
|
473
483
|
) => {
|
|
@@ -500,13 +510,13 @@ export class AccountsImpl implements Accounts {
|
|
|
500
510
|
};
|
|
501
511
|
};
|
|
502
512
|
|
|
503
|
-
const lro =
|
|
504
|
-
|
|
505
|
-
{ resourceGroupName, accountName, options },
|
|
506
|
-
deleteOperationSpec
|
|
507
|
-
);
|
|
508
|
-
const poller =
|
|
509
|
-
|
|
513
|
+
const lro = createLroSpec({
|
|
514
|
+
sendOperationFn,
|
|
515
|
+
args: { resourceGroupName, accountName, options },
|
|
516
|
+
spec: deleteOperationSpec
|
|
517
|
+
});
|
|
518
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
519
|
+
restoreFrom: options?.resumeFrom,
|
|
510
520
|
intervalInMs: options?.updateIntervalInMs
|
|
511
521
|
});
|
|
512
522
|
await poller.poll();
|
|
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
|
|
|
13
13
|
import * as Mappers from "../models/mappers";
|
|
14
14
|
import * as Parameters from "../models/parameters";
|
|
15
15
|
import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
18
22
|
import {
|
|
19
23
|
CommitmentPlan,
|
|
20
24
|
CommitmentPlansListNextOptionalParams,
|
|
@@ -435,14 +439,14 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
435
439
|
accountName: string,
|
|
436
440
|
commitmentPlanName: string,
|
|
437
441
|
options?: CommitmentPlansDeleteOptionalParams
|
|
438
|
-
): Promise<
|
|
442
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
439
443
|
const directSendOperation = async (
|
|
440
444
|
args: coreClient.OperationArguments,
|
|
441
445
|
spec: coreClient.OperationSpec
|
|
442
446
|
): Promise<void> => {
|
|
443
447
|
return this.client.sendOperationRequest(args, spec);
|
|
444
448
|
};
|
|
445
|
-
const
|
|
449
|
+
const sendOperationFn = async (
|
|
446
450
|
args: coreClient.OperationArguments,
|
|
447
451
|
spec: coreClient.OperationSpec
|
|
448
452
|
) => {
|
|
@@ -475,13 +479,13 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
475
479
|
};
|
|
476
480
|
};
|
|
477
481
|
|
|
478
|
-
const lro =
|
|
479
|
-
|
|
480
|
-
{ resourceGroupName, accountName, commitmentPlanName, options },
|
|
481
|
-
deleteOperationSpec
|
|
482
|
-
);
|
|
483
|
-
const poller =
|
|
484
|
-
|
|
482
|
+
const lro = createLroSpec({
|
|
483
|
+
sendOperationFn,
|
|
484
|
+
args: { resourceGroupName, accountName, commitmentPlanName, options },
|
|
485
|
+
spec: deleteOperationSpec
|
|
486
|
+
});
|
|
487
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
488
|
+
restoreFrom: options?.resumeFrom,
|
|
485
489
|
intervalInMs: options?.updateIntervalInMs
|
|
486
490
|
});
|
|
487
491
|
await poller.poll();
|
|
@@ -525,8 +529,8 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
525
529
|
commitmentPlan: CommitmentPlan,
|
|
526
530
|
options?: CommitmentPlansCreateOrUpdatePlanOptionalParams
|
|
527
531
|
): Promise<
|
|
528
|
-
|
|
529
|
-
|
|
532
|
+
SimplePollerLike<
|
|
533
|
+
OperationState<CommitmentPlansCreateOrUpdatePlanResponse>,
|
|
530
534
|
CommitmentPlansCreateOrUpdatePlanResponse
|
|
531
535
|
>
|
|
532
536
|
> {
|
|
@@ -536,7 +540,7 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
536
540
|
): Promise<CommitmentPlansCreateOrUpdatePlanResponse> => {
|
|
537
541
|
return this.client.sendOperationRequest(args, spec);
|
|
538
542
|
};
|
|
539
|
-
const
|
|
543
|
+
const sendOperationFn = async (
|
|
540
544
|
args: coreClient.OperationArguments,
|
|
541
545
|
spec: coreClient.OperationSpec
|
|
542
546
|
) => {
|
|
@@ -569,15 +573,18 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
569
573
|
};
|
|
570
574
|
};
|
|
571
575
|
|
|
572
|
-
const lro =
|
|
573
|
-
|
|
574
|
-
{ resourceGroupName, commitmentPlanName, commitmentPlan, options },
|
|
575
|
-
createOrUpdatePlanOperationSpec
|
|
576
|
-
);
|
|
577
|
-
const poller =
|
|
578
|
-
|
|
576
|
+
const lro = createLroSpec({
|
|
577
|
+
sendOperationFn,
|
|
578
|
+
args: { resourceGroupName, commitmentPlanName, commitmentPlan, options },
|
|
579
|
+
spec: createOrUpdatePlanOperationSpec
|
|
580
|
+
});
|
|
581
|
+
const poller = await createHttpPoller<
|
|
582
|
+
CommitmentPlansCreateOrUpdatePlanResponse,
|
|
583
|
+
OperationState<CommitmentPlansCreateOrUpdatePlanResponse>
|
|
584
|
+
>(lro, {
|
|
585
|
+
restoreFrom: options?.resumeFrom,
|
|
579
586
|
intervalInMs: options?.updateIntervalInMs,
|
|
580
|
-
|
|
587
|
+
resourceLocationConfig: "azure-async-operation"
|
|
581
588
|
});
|
|
582
589
|
await poller.poll();
|
|
583
590
|
return poller;
|
|
@@ -620,8 +627,8 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
620
627
|
commitmentPlan: PatchResourceTagsAndSku,
|
|
621
628
|
options?: CommitmentPlansUpdatePlanOptionalParams
|
|
622
629
|
): Promise<
|
|
623
|
-
|
|
624
|
-
|
|
630
|
+
SimplePollerLike<
|
|
631
|
+
OperationState<CommitmentPlansUpdatePlanResponse>,
|
|
625
632
|
CommitmentPlansUpdatePlanResponse
|
|
626
633
|
>
|
|
627
634
|
> {
|
|
@@ -631,7 +638,7 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
631
638
|
): Promise<CommitmentPlansUpdatePlanResponse> => {
|
|
632
639
|
return this.client.sendOperationRequest(args, spec);
|
|
633
640
|
};
|
|
634
|
-
const
|
|
641
|
+
const sendOperationFn = async (
|
|
635
642
|
args: coreClient.OperationArguments,
|
|
636
643
|
spec: coreClient.OperationSpec
|
|
637
644
|
) => {
|
|
@@ -664,15 +671,18 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
664
671
|
};
|
|
665
672
|
};
|
|
666
673
|
|
|
667
|
-
const lro =
|
|
668
|
-
|
|
669
|
-
{ resourceGroupName, commitmentPlanName, commitmentPlan, options },
|
|
670
|
-
updatePlanOperationSpec
|
|
671
|
-
);
|
|
672
|
-
const poller =
|
|
673
|
-
|
|
674
|
+
const lro = createLroSpec({
|
|
675
|
+
sendOperationFn,
|
|
676
|
+
args: { resourceGroupName, commitmentPlanName, commitmentPlan, options },
|
|
677
|
+
spec: updatePlanOperationSpec
|
|
678
|
+
});
|
|
679
|
+
const poller = await createHttpPoller<
|
|
680
|
+
CommitmentPlansUpdatePlanResponse,
|
|
681
|
+
OperationState<CommitmentPlansUpdatePlanResponse>
|
|
682
|
+
>(lro, {
|
|
683
|
+
restoreFrom: options?.resumeFrom,
|
|
674
684
|
intervalInMs: options?.updateIntervalInMs,
|
|
675
|
-
|
|
685
|
+
resourceLocationConfig: "location"
|
|
676
686
|
});
|
|
677
687
|
await poller.poll();
|
|
678
688
|
return poller;
|
|
@@ -712,14 +722,14 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
712
722
|
resourceGroupName: string,
|
|
713
723
|
commitmentPlanName: string,
|
|
714
724
|
options?: CommitmentPlansDeletePlanOptionalParams
|
|
715
|
-
): Promise<
|
|
725
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
716
726
|
const directSendOperation = async (
|
|
717
727
|
args: coreClient.OperationArguments,
|
|
718
728
|
spec: coreClient.OperationSpec
|
|
719
729
|
): Promise<void> => {
|
|
720
730
|
return this.client.sendOperationRequest(args, spec);
|
|
721
731
|
};
|
|
722
|
-
const
|
|
732
|
+
const sendOperationFn = async (
|
|
723
733
|
args: coreClient.OperationArguments,
|
|
724
734
|
spec: coreClient.OperationSpec
|
|
725
735
|
) => {
|
|
@@ -752,15 +762,15 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
752
762
|
};
|
|
753
763
|
};
|
|
754
764
|
|
|
755
|
-
const lro =
|
|
756
|
-
|
|
757
|
-
{ resourceGroupName, commitmentPlanName, options },
|
|
758
|
-
deletePlanOperationSpec
|
|
759
|
-
);
|
|
760
|
-
const poller =
|
|
761
|
-
|
|
765
|
+
const lro = createLroSpec({
|
|
766
|
+
sendOperationFn,
|
|
767
|
+
args: { resourceGroupName, commitmentPlanName, options },
|
|
768
|
+
spec: deletePlanOperationSpec
|
|
769
|
+
});
|
|
770
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
771
|
+
restoreFrom: options?.resumeFrom,
|
|
762
772
|
intervalInMs: options?.updateIntervalInMs,
|
|
763
|
-
|
|
773
|
+
resourceLocationConfig: "location"
|
|
764
774
|
});
|
|
765
775
|
await poller.poll();
|
|
766
776
|
return poller;
|
|
@@ -893,8 +903,8 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
893
903
|
association: CommitmentPlanAccountAssociation,
|
|
894
904
|
options?: CommitmentPlansCreateOrUpdateAssociationOptionalParams
|
|
895
905
|
): Promise<
|
|
896
|
-
|
|
897
|
-
|
|
906
|
+
SimplePollerLike<
|
|
907
|
+
OperationState<CommitmentPlansCreateOrUpdateAssociationResponse>,
|
|
898
908
|
CommitmentPlansCreateOrUpdateAssociationResponse
|
|
899
909
|
>
|
|
900
910
|
> {
|
|
@@ -904,7 +914,7 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
904
914
|
): Promise<CommitmentPlansCreateOrUpdateAssociationResponse> => {
|
|
905
915
|
return this.client.sendOperationRequest(args, spec);
|
|
906
916
|
};
|
|
907
|
-
const
|
|
917
|
+
const sendOperationFn = async (
|
|
908
918
|
args: coreClient.OperationArguments,
|
|
909
919
|
spec: coreClient.OperationSpec
|
|
910
920
|
) => {
|
|
@@ -937,21 +947,24 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
937
947
|
};
|
|
938
948
|
};
|
|
939
949
|
|
|
940
|
-
const lro =
|
|
941
|
-
|
|
942
|
-
{
|
|
950
|
+
const lro = createLroSpec({
|
|
951
|
+
sendOperationFn,
|
|
952
|
+
args: {
|
|
943
953
|
resourceGroupName,
|
|
944
954
|
commitmentPlanName,
|
|
945
955
|
commitmentPlanAssociationName,
|
|
946
956
|
association,
|
|
947
957
|
options
|
|
948
958
|
},
|
|
949
|
-
createOrUpdateAssociationOperationSpec
|
|
950
|
-
);
|
|
951
|
-
const poller =
|
|
952
|
-
|
|
959
|
+
spec: createOrUpdateAssociationOperationSpec
|
|
960
|
+
});
|
|
961
|
+
const poller = await createHttpPoller<
|
|
962
|
+
CommitmentPlansCreateOrUpdateAssociationResponse,
|
|
963
|
+
OperationState<CommitmentPlansCreateOrUpdateAssociationResponse>
|
|
964
|
+
>(lro, {
|
|
965
|
+
restoreFrom: options?.resumeFrom,
|
|
953
966
|
intervalInMs: options?.updateIntervalInMs,
|
|
954
|
-
|
|
967
|
+
resourceLocationConfig: "azure-async-operation"
|
|
955
968
|
});
|
|
956
969
|
await poller.poll();
|
|
957
970
|
return poller;
|
|
@@ -998,14 +1011,14 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
998
1011
|
commitmentPlanName: string,
|
|
999
1012
|
commitmentPlanAssociationName: string,
|
|
1000
1013
|
options?: CommitmentPlansDeleteAssociationOptionalParams
|
|
1001
|
-
): Promise<
|
|
1014
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
1002
1015
|
const directSendOperation = async (
|
|
1003
1016
|
args: coreClient.OperationArguments,
|
|
1004
1017
|
spec: coreClient.OperationSpec
|
|
1005
1018
|
): Promise<void> => {
|
|
1006
1019
|
return this.client.sendOperationRequest(args, spec);
|
|
1007
1020
|
};
|
|
1008
|
-
const
|
|
1021
|
+
const sendOperationFn = async (
|
|
1009
1022
|
args: coreClient.OperationArguments,
|
|
1010
1023
|
spec: coreClient.OperationSpec
|
|
1011
1024
|
) => {
|
|
@@ -1038,20 +1051,20 @@ export class CommitmentPlansImpl implements CommitmentPlans {
|
|
|
1038
1051
|
};
|
|
1039
1052
|
};
|
|
1040
1053
|
|
|
1041
|
-
const lro =
|
|
1042
|
-
|
|
1043
|
-
{
|
|
1054
|
+
const lro = createLroSpec({
|
|
1055
|
+
sendOperationFn,
|
|
1056
|
+
args: {
|
|
1044
1057
|
resourceGroupName,
|
|
1045
1058
|
commitmentPlanName,
|
|
1046
1059
|
commitmentPlanAssociationName,
|
|
1047
1060
|
options
|
|
1048
1061
|
},
|
|
1049
|
-
deleteAssociationOperationSpec
|
|
1050
|
-
);
|
|
1051
|
-
const poller =
|
|
1052
|
-
|
|
1062
|
+
spec: deleteAssociationOperationSpec
|
|
1063
|
+
});
|
|
1064
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
1065
|
+
restoreFrom: options?.resumeFrom,
|
|
1053
1066
|
intervalInMs: options?.updateIntervalInMs,
|
|
1054
|
-
|
|
1067
|
+
resourceLocationConfig: "location"
|
|
1055
1068
|
});
|
|
1056
1069
|
await poller.poll();
|
|
1057
1070
|
return poller;
|
|
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
|
|
|
13
13
|
import * as Mappers from "../models/mappers";
|
|
14
14
|
import * as Parameters from "../models/parameters";
|
|
15
15
|
import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
18
22
|
import {
|
|
19
23
|
Account,
|
|
20
24
|
DeletedAccountsListNextOptionalParams,
|
|
@@ -124,14 +128,14 @@ export class DeletedAccountsImpl implements DeletedAccounts {
|
|
|
124
128
|
resourceGroupName: string,
|
|
125
129
|
accountName: string,
|
|
126
130
|
options?: DeletedAccountsPurgeOptionalParams
|
|
127
|
-
): Promise<
|
|
131
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
128
132
|
const directSendOperation = async (
|
|
129
133
|
args: coreClient.OperationArguments,
|
|
130
134
|
spec: coreClient.OperationSpec
|
|
131
135
|
): Promise<void> => {
|
|
132
136
|
return this.client.sendOperationRequest(args, spec);
|
|
133
137
|
};
|
|
134
|
-
const
|
|
138
|
+
const sendOperationFn = async (
|
|
135
139
|
args: coreClient.OperationArguments,
|
|
136
140
|
spec: coreClient.OperationSpec
|
|
137
141
|
) => {
|
|
@@ -164,13 +168,13 @@ export class DeletedAccountsImpl implements DeletedAccounts {
|
|
|
164
168
|
};
|
|
165
169
|
};
|
|
166
170
|
|
|
167
|
-
const lro =
|
|
168
|
-
|
|
169
|
-
{ location, resourceGroupName, accountName, options },
|
|
170
|
-
purgeOperationSpec
|
|
171
|
-
);
|
|
172
|
-
const poller =
|
|
173
|
-
|
|
171
|
+
const lro = createLroSpec({
|
|
172
|
+
sendOperationFn,
|
|
173
|
+
args: { location, resourceGroupName, accountName, options },
|
|
174
|
+
spec: purgeOperationSpec
|
|
175
|
+
});
|
|
176
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
177
|
+
restoreFrom: options?.resumeFrom,
|
|
174
178
|
intervalInMs: options?.updateIntervalInMs
|
|
175
179
|
});
|
|
176
180
|
await poller.poll();
|
|
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
|
|
|
13
13
|
import * as Mappers from "../models/mappers";
|
|
14
14
|
import * as Parameters from "../models/parameters";
|
|
15
15
|
import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
18
22
|
import {
|
|
19
23
|
Deployment,
|
|
20
24
|
DeploymentsListNextOptionalParams,
|
|
@@ -168,8 +172,8 @@ export class DeploymentsImpl implements Deployments {
|
|
|
168
172
|
deployment: Deployment,
|
|
169
173
|
options?: DeploymentsCreateOrUpdateOptionalParams
|
|
170
174
|
): Promise<
|
|
171
|
-
|
|
172
|
-
|
|
175
|
+
SimplePollerLike<
|
|
176
|
+
OperationState<DeploymentsCreateOrUpdateResponse>,
|
|
173
177
|
DeploymentsCreateOrUpdateResponse
|
|
174
178
|
>
|
|
175
179
|
> {
|
|
@@ -179,7 +183,7 @@ export class DeploymentsImpl implements Deployments {
|
|
|
179
183
|
): Promise<DeploymentsCreateOrUpdateResponse> => {
|
|
180
184
|
return this.client.sendOperationRequest(args, spec);
|
|
181
185
|
};
|
|
182
|
-
const
|
|
186
|
+
const sendOperationFn = async (
|
|
183
187
|
args: coreClient.OperationArguments,
|
|
184
188
|
spec: coreClient.OperationSpec
|
|
185
189
|
) => {
|
|
@@ -212,14 +216,24 @@ export class DeploymentsImpl implements Deployments {
|
|
|
212
216
|
};
|
|
213
217
|
};
|
|
214
218
|
|
|
215
|
-
const lro =
|
|
216
|
-
|
|
217
|
-
{
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
const lro = createLroSpec({
|
|
220
|
+
sendOperationFn,
|
|
221
|
+
args: {
|
|
222
|
+
resourceGroupName,
|
|
223
|
+
accountName,
|
|
224
|
+
deploymentName,
|
|
225
|
+
deployment,
|
|
226
|
+
options
|
|
227
|
+
},
|
|
228
|
+
spec: createOrUpdateOperationSpec
|
|
229
|
+
});
|
|
230
|
+
const poller = await createHttpPoller<
|
|
231
|
+
DeploymentsCreateOrUpdateResponse,
|
|
232
|
+
OperationState<DeploymentsCreateOrUpdateResponse>
|
|
233
|
+
>(lro, {
|
|
234
|
+
restoreFrom: options?.resumeFrom,
|
|
235
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
236
|
+
resourceLocationConfig: "azure-async-operation"
|
|
223
237
|
});
|
|
224
238
|
await poller.poll();
|
|
225
239
|
return poller;
|
|
@@ -262,14 +276,14 @@ export class DeploymentsImpl implements Deployments {
|
|
|
262
276
|
accountName: string,
|
|
263
277
|
deploymentName: string,
|
|
264
278
|
options?: DeploymentsDeleteOptionalParams
|
|
265
|
-
): Promise<
|
|
279
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
266
280
|
const directSendOperation = async (
|
|
267
281
|
args: coreClient.OperationArguments,
|
|
268
282
|
spec: coreClient.OperationSpec
|
|
269
283
|
): Promise<void> => {
|
|
270
284
|
return this.client.sendOperationRequest(args, spec);
|
|
271
285
|
};
|
|
272
|
-
const
|
|
286
|
+
const sendOperationFn = async (
|
|
273
287
|
args: coreClient.OperationArguments,
|
|
274
288
|
spec: coreClient.OperationSpec
|
|
275
289
|
) => {
|
|
@@ -302,13 +316,13 @@ export class DeploymentsImpl implements Deployments {
|
|
|
302
316
|
};
|
|
303
317
|
};
|
|
304
318
|
|
|
305
|
-
const lro =
|
|
306
|
-
|
|
307
|
-
{ resourceGroupName, accountName, deploymentName, options },
|
|
308
|
-
deleteOperationSpec
|
|
309
|
-
);
|
|
310
|
-
const poller =
|
|
311
|
-
|
|
319
|
+
const lro = createLroSpec({
|
|
320
|
+
sendOperationFn,
|
|
321
|
+
args: { resourceGroupName, accountName, deploymentName, options },
|
|
322
|
+
spec: deleteOperationSpec
|
|
323
|
+
});
|
|
324
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
325
|
+
restoreFrom: options?.resumeFrom,
|
|
312
326
|
intervalInMs: options?.updateIntervalInMs
|
|
313
327
|
});
|
|
314
328
|
await poller.poll();
|
package/src/operations/index.ts
CHANGED
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
export * from "./accounts";
|
|
10
10
|
export * from "./deletedAccounts";
|
|
11
11
|
export * from "./resourceSkus";
|
|
12
|
+
export * from "./usages";
|
|
12
13
|
export * from "./operations";
|
|
13
14
|
export * from "./commitmentTiers";
|
|
15
|
+
export * from "./models";
|
|
14
16
|
export * from "./privateEndpointConnections";
|
|
15
17
|
export * from "./privateLinkResources";
|
|
16
18
|
export * from "./deployments";
|