@azure/arm-reservations 9.0.1-alpha.20250718.1 → 9.0.1-alpha.20250730.1
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/dist/browser/azureReservationAPI.js +42 -45
- package/dist/browser/azureReservationAPI.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +21 -9
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/calculateExchange.js +12 -6
- package/dist/browser/operations/calculateExchange.js.map +1 -1
- package/dist/browser/operations/calculateRefund.js +1 -0
- package/dist/browser/operations/calculateRefund.js.map +1 -1
- package/dist/browser/operations/exchange.js +12 -6
- package/dist/browser/operations/exchange.js.map +1 -1
- package/dist/browser/operations/operation.js +23 -40
- package/dist/browser/operations/operation.js.map +1 -1
- package/dist/browser/operations/quota.js +45 -52
- package/dist/browser/operations/quota.js.map +1 -1
- package/dist/browser/operations/quotaRequestStatus.js +23 -40
- package/dist/browser/operations/quotaRequestStatus.js.map +1 -1
- package/dist/browser/operations/reservation.js +111 -142
- package/dist/browser/operations/reservation.js.map +1 -1
- package/dist/browser/operations/reservationOrder.js +34 -46
- package/dist/browser/operations/reservationOrder.js.map +1 -1
- package/dist/browser/operations/return.js +12 -6
- package/dist/browser/operations/return.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/azureReservationAPI.js +42 -44
- package/dist/commonjs/azureReservationAPI.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +21 -9
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/calculateExchange.js +12 -6
- package/dist/commonjs/operations/calculateExchange.js.map +1 -1
- package/dist/commonjs/operations/calculateRefund.js +1 -0
- package/dist/commonjs/operations/calculateRefund.js.map +1 -1
- package/dist/commonjs/operations/exchange.js +12 -6
- package/dist/commonjs/operations/exchange.js.map +1 -1
- package/dist/commonjs/operations/operation.js +23 -39
- package/dist/commonjs/operations/operation.js.map +1 -1
- package/dist/commonjs/operations/quota.js +45 -51
- package/dist/commonjs/operations/quota.js.map +1 -1
- package/dist/commonjs/operations/quotaRequestStatus.js +23 -39
- package/dist/commonjs/operations/quotaRequestStatus.js.map +1 -1
- package/dist/commonjs/operations/reservation.js +111 -141
- package/dist/commonjs/operations/reservation.js.map +1 -1
- package/dist/commonjs/operations/reservationOrder.js +34 -45
- package/dist/commonjs/operations/reservationOrder.js.map +1 -1
- package/dist/commonjs/operations/return.js +12 -6
- package/dist/commonjs/operations/return.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/azureReservationAPI.js +42 -45
- package/dist/esm/azureReservationAPI.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +21 -9
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/calculateExchange.js +12 -6
- package/dist/esm/operations/calculateExchange.js.map +1 -1
- package/dist/esm/operations/calculateRefund.js +1 -0
- package/dist/esm/operations/calculateRefund.js.map +1 -1
- package/dist/esm/operations/exchange.js +12 -6
- package/dist/esm/operations/exchange.js.map +1 -1
- package/dist/esm/operations/operation.js +23 -40
- package/dist/esm/operations/operation.js.map +1 -1
- package/dist/esm/operations/quota.js +45 -52
- package/dist/esm/operations/quota.js.map +1 -1
- package/dist/esm/operations/quotaRequestStatus.js +23 -40
- package/dist/esm/operations/quotaRequestStatus.js.map +1 -1
- package/dist/esm/operations/reservation.js +111 -142
- package/dist/esm/operations/reservation.js.map +1 -1
- package/dist/esm/operations/reservationOrder.js +34 -46
- package/dist/esm/operations/reservationOrder.js.map +1 -1
- package/dist/esm/operations/return.js +12 -6
- package/dist/esm/operations/return.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/azureReservationAPI.js +42 -45
- package/dist/react-native/azureReservationAPI.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +21 -9
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/calculateExchange.js +12 -6
- package/dist/react-native/operations/calculateExchange.js.map +1 -1
- package/dist/react-native/operations/calculateRefund.js +1 -0
- package/dist/react-native/operations/calculateRefund.js.map +1 -1
- package/dist/react-native/operations/exchange.js +12 -6
- package/dist/react-native/operations/exchange.js.map +1 -1
- package/dist/react-native/operations/operation.js +23 -40
- package/dist/react-native/operations/operation.js.map +1 -1
- package/dist/react-native/operations/quota.js +45 -52
- package/dist/react-native/operations/quota.js.map +1 -1
- package/dist/react-native/operations/quotaRequestStatus.js +23 -40
- package/dist/react-native/operations/quotaRequestStatus.js.map +1 -1
- package/dist/react-native/operations/reservation.js +111 -142
- package/dist/react-native/operations/reservation.js.map +1 -1
- package/dist/react-native/operations/reservationOrder.js +34 -46
- package/dist/react-native/operations/reservationOrder.js.map +1 -1
- package/dist/react-native/operations/return.js +12 -6
- package/dist/react-native/operations/return.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-reservations-node.api.md +1675 -1675
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing QuotaRequestStatus operations. */
|
|
15
14
|
export class QuotaRequestStatusImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class QuotaRequestStatus class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -38,52 +38,35 @@ export class QuotaRequestStatusImpl {
|
|
|
38
38
|
return this;
|
|
39
39
|
},
|
|
40
40
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
42
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
43
|
}
|
|
44
44
|
return this.listPagingPage(subscriptionId, providerId, location, options, settings);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
listPagingPage(subscriptionId, providerId, location, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
48
|
+
async *listPagingPage(subscriptionId, providerId, location, options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._list(subscriptionId, providerId, location, options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
setContinuationToken(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listNext(subscriptionId, providerId, location, continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
setContinuationToken(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
67
65
|
}
|
|
68
|
-
listPagingAll(subscriptionId, providerId, location, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(subscriptionId, providerId, location, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
66
|
+
async *listPagingAll(subscriptionId, providerId, location, options) {
|
|
67
|
+
for await (const page of this.listPagingPage(subscriptionId, providerId, location, options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
87
70
|
}
|
|
88
71
|
/**
|
|
89
72
|
* For the specified Azure region (location), get the details and status of the quota request by the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotaRequestStatus.js","sourceRoot":"","sources":["../../../src/operations/quotaRequestStatus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAM,OAAO,sBAAsB;IAGjC;;;OAGG;IACH,YAAY,MAA2B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;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { QuotaRequestStatus } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AzureReservationAPI } from \"../azureReservationAPI.js\";\nimport {\n QuotaRequestDetails,\n QuotaRequestStatusListNextOptionalParams,\n QuotaRequestStatusListOptionalParams,\n QuotaRequestStatusListResponse,\n QuotaRequestStatusGetOptionalParams,\n QuotaRequestStatusGetResponse,\n QuotaRequestStatusListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing QuotaRequestStatus operations. */\nexport class QuotaRequestStatusImpl implements QuotaRequestStatus {\n private readonly client: AzureReservationAPI;\n\n /**\n * Initialize a new instance of the class QuotaRequestStatus class.\n * @param client Reference to the service client\n */\n constructor(client: AzureReservationAPI) {\n this.client = client;\n }\n\n /**\n * For the specified Azure region (location), subscription, and resource provider, get the history of\n * the quota requests for the past year. To select specific quota requests, use the oData filter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param options The options parameters.\n */\n public list(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): PagedAsyncIterableIterator<QuotaRequestDetails> {\n const iter = this.listPagingAll(\n subscriptionId,\n providerId,\n location,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n subscriptionId,\n providerId,\n location,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<QuotaRequestDetails[]> {\n let result: QuotaRequestStatusListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(subscriptionId, providerId, location, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n subscriptionId,\n providerId,\n location,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): AsyncIterableIterator<QuotaRequestDetails> {\n for await (const page of this.listPagingPage(\n subscriptionId,\n providerId,\n location,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * For the specified Azure region (location), get the details and status of the quota request by the\n * quota request ID for the resources of the resource provider. The PUT request for the quota (service\n * limit) returns a response with the requestId parameter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param id Quota Request ID.\n * @param options The options parameters.\n */\n get(\n subscriptionId: string,\n providerId: string,\n location: string,\n id: string,\n options?: QuotaRequestStatusGetOptionalParams\n ): Promise<QuotaRequestStatusGetResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, id, options },\n getOperationSpec\n );\n }\n\n /**\n * For the specified Azure region (location), subscription, and resource provider, get the history of\n * the quota requests for the past year. To select specific quota requests, use the oData filter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param options The options parameters.\n */\n private _list(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): Promise<QuotaRequestStatusListResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n subscriptionId: string,\n providerId: string,\n location: string,\n nextLink: string,\n options?: QuotaRequestStatusListNextOptionalParams\n ): Promise<QuotaRequestStatusListNextResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests/{id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetails\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1,\n Parameters.id\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetailsList\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n queryParameters: [\n Parameters.filter,\n Parameters.apiVersion1,\n Parameters.top,\n Parameters.skiptoken1\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetailsList\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"quotaRequestStatus.js","sourceRoot":"","sources":["../../../src/operations/quotaRequestStatus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAM,OAAO,sBAAsB;IAChB,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IA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T,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { QuotaRequestStatus } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AzureReservationAPI } from \"../azureReservationAPI.js\";\nimport {\n QuotaRequestDetails,\n QuotaRequestStatusListNextOptionalParams,\n QuotaRequestStatusListOptionalParams,\n QuotaRequestStatusListResponse,\n QuotaRequestStatusGetOptionalParams,\n QuotaRequestStatusGetResponse,\n QuotaRequestStatusListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing QuotaRequestStatus operations. */\nexport class QuotaRequestStatusImpl implements QuotaRequestStatus {\n private readonly client: AzureReservationAPI;\n\n /**\n * Initialize a new instance of the class QuotaRequestStatus class.\n * @param client Reference to the service client\n */\n constructor(client: AzureReservationAPI) {\n this.client = client;\n }\n\n /**\n * For the specified Azure region (location), subscription, and resource provider, get the history of\n * the quota requests for the past year. To select specific quota requests, use the oData filter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param options The options parameters.\n */\n public list(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): PagedAsyncIterableIterator<QuotaRequestDetails> {\n const iter = this.listPagingAll(\n subscriptionId,\n providerId,\n location,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n subscriptionId,\n providerId,\n location,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<QuotaRequestDetails[]> {\n let result: QuotaRequestStatusListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(subscriptionId, providerId, location, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n subscriptionId,\n providerId,\n location,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): AsyncIterableIterator<QuotaRequestDetails> {\n for await (const page of this.listPagingPage(\n subscriptionId,\n providerId,\n location,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * For the specified Azure region (location), get the details and status of the quota request by the\n * quota request ID for the resources of the resource provider. The PUT request for the quota (service\n * limit) returns a response with the requestId parameter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param id Quota Request ID.\n * @param options The options parameters.\n */\n get(\n subscriptionId: string,\n providerId: string,\n location: string,\n id: string,\n options?: QuotaRequestStatusGetOptionalParams\n ): Promise<QuotaRequestStatusGetResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, id, options },\n getOperationSpec\n );\n }\n\n /**\n * For the specified Azure region (location), subscription, and resource provider, get the history of\n * the quota requests for the past year. To select specific quota requests, use the oData filter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param options The options parameters.\n */\n private _list(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): Promise<QuotaRequestStatusListResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n subscriptionId: string,\n providerId: string,\n location: string,\n nextLink: string,\n options?: QuotaRequestStatusListNextOptionalParams\n ): Promise<QuotaRequestStatusListNextResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests/{id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetails\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1,\n Parameters.id\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetailsList\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n queryParameters: [\n Parameters.filter,\n Parameters.apiVersion1,\n Parameters.top,\n Parameters.skiptoken1\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetailsList\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing Reservation operations. */
|
|
17
16
|
export class ReservationImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class Reservation class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -37,52 +37,35 @@ export class ReservationImpl {
|
|
|
37
37
|
return this;
|
|
38
38
|
},
|
|
39
39
|
byPage: (settings) => {
|
|
40
|
-
if (settings
|
|
40
|
+
if (settings?.maxPageSize) {
|
|
41
41
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
42
42
|
}
|
|
43
43
|
return this.listPagingPage(reservationOrderId, options, settings);
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
listPagingPage(reservationOrderId, options, settings) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
47
|
+
async *listPagingPage(reservationOrderId, options, settings) {
|
|
48
|
+
let result;
|
|
49
|
+
let continuationToken = settings?.continuationToken;
|
|
50
|
+
if (!continuationToken) {
|
|
51
|
+
result = await this._list(reservationOrderId, options);
|
|
52
|
+
let page = result.value || [];
|
|
53
|
+
continuationToken = result.nextLink;
|
|
54
|
+
setContinuationToken(page, continuationToken);
|
|
55
|
+
yield page;
|
|
56
|
+
}
|
|
57
|
+
while (continuationToken) {
|
|
58
|
+
result = await this._listNext(reservationOrderId, continuationToken, options);
|
|
59
|
+
continuationToken = result.nextLink;
|
|
60
|
+
let page = result.value || [];
|
|
61
|
+
setContinuationToken(page, continuationToken);
|
|
62
|
+
yield page;
|
|
63
|
+
}
|
|
66
64
|
}
|
|
67
|
-
listPagingAll(reservationOrderId, options) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(reservationOrderId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
72
|
-
_c = _f.value;
|
|
73
|
-
_d = false;
|
|
74
|
-
const page = _c;
|
|
75
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
79
|
-
finally {
|
|
80
|
-
try {
|
|
81
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
82
|
-
}
|
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
|
84
|
-
}
|
|
85
|
-
});
|
|
65
|
+
async *listPagingAll(reservationOrderId, options) {
|
|
66
|
+
for await (const page of this.listPagingPage(reservationOrderId, options)) {
|
|
67
|
+
yield* page;
|
|
68
|
+
}
|
|
86
69
|
}
|
|
87
70
|
/**
|
|
88
71
|
* List of all the revisions for the `Reservation`.
|
|
@@ -100,52 +83,35 @@ export class ReservationImpl {
|
|
|
100
83
|
return this;
|
|
101
84
|
},
|
|
102
85
|
byPage: (settings) => {
|
|
103
|
-
if (settings
|
|
86
|
+
if (settings?.maxPageSize) {
|
|
104
87
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
105
88
|
}
|
|
106
89
|
return this.listRevisionsPagingPage(reservationOrderId, reservationId, options, settings);
|
|
107
90
|
}
|
|
108
91
|
};
|
|
109
92
|
}
|
|
110
|
-
listRevisionsPagingPage(reservationOrderId, reservationId, options, settings) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
});
|
|
93
|
+
async *listRevisionsPagingPage(reservationOrderId, reservationId, options, settings) {
|
|
94
|
+
let result;
|
|
95
|
+
let continuationToken = settings?.continuationToken;
|
|
96
|
+
if (!continuationToken) {
|
|
97
|
+
result = await this._listRevisions(reservationOrderId, reservationId, options);
|
|
98
|
+
let page = result.value || [];
|
|
99
|
+
continuationToken = result.nextLink;
|
|
100
|
+
setContinuationToken(page, continuationToken);
|
|
101
|
+
yield page;
|
|
102
|
+
}
|
|
103
|
+
while (continuationToken) {
|
|
104
|
+
result = await this._listRevisionsNext(reservationOrderId, reservationId, continuationToken, options);
|
|
105
|
+
continuationToken = result.nextLink;
|
|
106
|
+
let page = result.value || [];
|
|
107
|
+
setContinuationToken(page, continuationToken);
|
|
108
|
+
yield page;
|
|
109
|
+
}
|
|
129
110
|
}
|
|
130
|
-
listRevisionsPagingAll(reservationOrderId, reservationId, options) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
for (var _d = true, _e = __asyncValues(this.listRevisionsPagingPage(reservationOrderId, reservationId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
135
|
-
_c = _f.value;
|
|
136
|
-
_d = false;
|
|
137
|
-
const page = _c;
|
|
138
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
142
|
-
finally {
|
|
143
|
-
try {
|
|
144
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
145
|
-
}
|
|
146
|
-
finally { if (e_2) throw e_2.error; }
|
|
147
|
-
}
|
|
148
|
-
});
|
|
111
|
+
async *listRevisionsPagingAll(reservationOrderId, reservationId, options) {
|
|
112
|
+
for await (const page of this.listRevisionsPagingPage(reservationOrderId, reservationId, options)) {
|
|
113
|
+
yield* page;
|
|
114
|
+
}
|
|
149
115
|
}
|
|
150
116
|
/**
|
|
151
117
|
* List the reservations and the roll up counts of reservations group by provisioning states that the
|
|
@@ -162,52 +128,35 @@ export class ReservationImpl {
|
|
|
162
128
|
return this;
|
|
163
129
|
},
|
|
164
130
|
byPage: (settings) => {
|
|
165
|
-
if (settings
|
|
131
|
+
if (settings?.maxPageSize) {
|
|
166
132
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
167
133
|
}
|
|
168
134
|
return this.listAllPagingPage(options, settings);
|
|
169
135
|
}
|
|
170
136
|
};
|
|
171
137
|
}
|
|
172
|
-
listAllPagingPage(options, settings) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
});
|
|
138
|
+
async *listAllPagingPage(options, settings) {
|
|
139
|
+
let result;
|
|
140
|
+
let continuationToken = settings?.continuationToken;
|
|
141
|
+
if (!continuationToken) {
|
|
142
|
+
result = await this._listAll(options);
|
|
143
|
+
let page = result.value || [];
|
|
144
|
+
continuationToken = result.nextLink;
|
|
145
|
+
setContinuationToken(page, continuationToken);
|
|
146
|
+
yield page;
|
|
147
|
+
}
|
|
148
|
+
while (continuationToken) {
|
|
149
|
+
result = await this._listAllNext(continuationToken, options);
|
|
150
|
+
continuationToken = result.nextLink;
|
|
151
|
+
let page = result.value || [];
|
|
152
|
+
setContinuationToken(page, continuationToken);
|
|
153
|
+
yield page;
|
|
154
|
+
}
|
|
191
155
|
}
|
|
192
|
-
listAllPagingAll(options) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
for (var _d = true, _e = __asyncValues(this.listAllPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
197
|
-
_c = _f.value;
|
|
198
|
-
_d = false;
|
|
199
|
-
const page = _c;
|
|
200
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
204
|
-
finally {
|
|
205
|
-
try {
|
|
206
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
207
|
-
}
|
|
208
|
-
finally { if (e_3) throw e_3.error; }
|
|
209
|
-
}
|
|
210
|
-
});
|
|
156
|
+
async *listAllPagingAll(options) {
|
|
157
|
+
for await (const page of this.listAllPagingPage(options)) {
|
|
158
|
+
yield* page;
|
|
159
|
+
}
|
|
211
160
|
}
|
|
212
161
|
/**
|
|
213
162
|
* Check whether the scopes from request is valid for `Reservation`.
|
|
@@ -222,14 +171,19 @@ export class ReservationImpl {
|
|
|
222
171
|
return this.client.sendOperationRequest(args, spec);
|
|
223
172
|
};
|
|
224
173
|
const sendOperationFn = async (args, spec) => {
|
|
225
|
-
var _a;
|
|
226
174
|
let currentRawResponse = undefined;
|
|
227
|
-
const providedCallback =
|
|
175
|
+
const providedCallback = args.options?.onResponse;
|
|
228
176
|
const callback = (rawResponse, flatResponse) => {
|
|
229
177
|
currentRawResponse = rawResponse;
|
|
230
|
-
providedCallback
|
|
178
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
179
|
+
};
|
|
180
|
+
const updatedArgs = {
|
|
181
|
+
...args,
|
|
182
|
+
options: {
|
|
183
|
+
...args.options,
|
|
184
|
+
onResponse: callback
|
|
185
|
+
}
|
|
231
186
|
};
|
|
232
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
233
187
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
234
188
|
return {
|
|
235
189
|
flatResponse,
|
|
@@ -246,8 +200,8 @@ export class ReservationImpl {
|
|
|
246
200
|
spec: availableScopesOperationSpec
|
|
247
201
|
});
|
|
248
202
|
const poller = await createHttpPoller(lro, {
|
|
249
|
-
restoreFrom: options
|
|
250
|
-
intervalInMs: options
|
|
203
|
+
restoreFrom: options?.resumeFrom,
|
|
204
|
+
intervalInMs: options?.updateIntervalInMs
|
|
251
205
|
});
|
|
252
206
|
await poller.poll();
|
|
253
207
|
return poller;
|
|
@@ -275,14 +229,19 @@ export class ReservationImpl {
|
|
|
275
229
|
return this.client.sendOperationRequest(args, spec);
|
|
276
230
|
};
|
|
277
231
|
const sendOperationFn = async (args, spec) => {
|
|
278
|
-
var _a;
|
|
279
232
|
let currentRawResponse = undefined;
|
|
280
|
-
const providedCallback =
|
|
233
|
+
const providedCallback = args.options?.onResponse;
|
|
281
234
|
const callback = (rawResponse, flatResponse) => {
|
|
282
235
|
currentRawResponse = rawResponse;
|
|
283
|
-
providedCallback
|
|
236
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
237
|
+
};
|
|
238
|
+
const updatedArgs = {
|
|
239
|
+
...args,
|
|
240
|
+
options: {
|
|
241
|
+
...args.options,
|
|
242
|
+
onResponse: callback
|
|
243
|
+
}
|
|
284
244
|
};
|
|
285
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
286
245
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
287
246
|
return {
|
|
288
247
|
flatResponse,
|
|
@@ -299,8 +258,8 @@ export class ReservationImpl {
|
|
|
299
258
|
spec: splitOperationSpec
|
|
300
259
|
});
|
|
301
260
|
const poller = await createHttpPoller(lro, {
|
|
302
|
-
restoreFrom: options
|
|
303
|
-
intervalInMs: options
|
|
261
|
+
restoreFrom: options?.resumeFrom,
|
|
262
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
304
263
|
resourceLocationConfig: "location"
|
|
305
264
|
});
|
|
306
265
|
await poller.poll();
|
|
@@ -328,14 +287,19 @@ export class ReservationImpl {
|
|
|
328
287
|
return this.client.sendOperationRequest(args, spec);
|
|
329
288
|
};
|
|
330
289
|
const sendOperationFn = async (args, spec) => {
|
|
331
|
-
var _a;
|
|
332
290
|
let currentRawResponse = undefined;
|
|
333
|
-
const providedCallback =
|
|
291
|
+
const providedCallback = args.options?.onResponse;
|
|
334
292
|
const callback = (rawResponse, flatResponse) => {
|
|
335
293
|
currentRawResponse = rawResponse;
|
|
336
|
-
providedCallback
|
|
294
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
295
|
+
};
|
|
296
|
+
const updatedArgs = {
|
|
297
|
+
...args,
|
|
298
|
+
options: {
|
|
299
|
+
...args.options,
|
|
300
|
+
onResponse: callback
|
|
301
|
+
}
|
|
337
302
|
};
|
|
338
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
339
303
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
340
304
|
return {
|
|
341
305
|
flatResponse,
|
|
@@ -352,8 +316,8 @@ export class ReservationImpl {
|
|
|
352
316
|
spec: mergeOperationSpec
|
|
353
317
|
});
|
|
354
318
|
const poller = await createHttpPoller(lro, {
|
|
355
|
-
restoreFrom: options
|
|
356
|
-
intervalInMs: options
|
|
319
|
+
restoreFrom: options?.resumeFrom,
|
|
320
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
357
321
|
resourceLocationConfig: "location"
|
|
358
322
|
});
|
|
359
323
|
await poller.poll();
|
|
@@ -399,14 +363,19 @@ export class ReservationImpl {
|
|
|
399
363
|
return this.client.sendOperationRequest(args, spec);
|
|
400
364
|
};
|
|
401
365
|
const sendOperationFn = async (args, spec) => {
|
|
402
|
-
var _a;
|
|
403
366
|
let currentRawResponse = undefined;
|
|
404
|
-
const providedCallback =
|
|
367
|
+
const providedCallback = args.options?.onResponse;
|
|
405
368
|
const callback = (rawResponse, flatResponse) => {
|
|
406
369
|
currentRawResponse = rawResponse;
|
|
407
|
-
providedCallback
|
|
370
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
371
|
+
};
|
|
372
|
+
const updatedArgs = {
|
|
373
|
+
...args,
|
|
374
|
+
options: {
|
|
375
|
+
...args.options,
|
|
376
|
+
onResponse: callback
|
|
377
|
+
}
|
|
408
378
|
};
|
|
409
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
410
379
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
411
380
|
return {
|
|
412
381
|
flatResponse,
|
|
@@ -423,8 +392,8 @@ export class ReservationImpl {
|
|
|
423
392
|
spec: updateOperationSpec
|
|
424
393
|
});
|
|
425
394
|
const poller = await createHttpPoller(lro, {
|
|
426
|
-
restoreFrom: options
|
|
427
|
-
intervalInMs: options
|
|
395
|
+
restoreFrom: options?.resumeFrom,
|
|
396
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
428
397
|
resourceLocationConfig: "azure-async-operation"
|
|
429
398
|
});
|
|
430
399
|
await poller.poll();
|