@azure/arm-quota 1.1.1-alpha.20250619.1 → 1.1.1-alpha.20250718.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/azureQuotaExtensionAPI.js +24 -5
- package/dist/browser/azureQuotaExtensionAPI.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 +72 -28
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/groupQuotaLimits.js +1 -0
- package/dist/browser/operations/groupQuotaLimits.js.map +1 -1
- package/dist/browser/operations/groupQuotaLimitsRequest.js +34 -46
- package/dist/browser/operations/groupQuotaLimitsRequest.js.map +1 -1
- package/dist/browser/operations/groupQuotaSubscriptionAllocation.js +1 -0
- package/dist/browser/operations/groupQuotaSubscriptionAllocation.js.map +1 -1
- package/dist/browser/operations/groupQuotaSubscriptionAllocationRequest.js +34 -46
- package/dist/browser/operations/groupQuotaSubscriptionAllocationRequest.js.map +1 -1
- package/dist/browser/operations/groupQuotaSubscriptionRequests.js +23 -40
- package/dist/browser/operations/groupQuotaSubscriptionRequests.js.map +1 -1
- package/dist/browser/operations/groupQuotaSubscriptions.js +56 -58
- package/dist/browser/operations/groupQuotaSubscriptions.js.map +1 -1
- package/dist/browser/operations/groupQuotas.js +56 -58
- package/dist/browser/operations/groupQuotas.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/quotaOperation.js +23 -40
- package/dist/browser/operations/quotaOperation.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/usages.js +23 -40
- package/dist/browser/operations/usages.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/azureQuotaExtensionAPI.js +24 -5
- package/dist/commonjs/azureQuotaExtensionAPI.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 +72 -28
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/groupQuotaLimits.js +1 -0
- package/dist/commonjs/operations/groupQuotaLimits.js.map +1 -1
- package/dist/commonjs/operations/groupQuotaLimitsRequest.js +34 -45
- package/dist/commonjs/operations/groupQuotaLimitsRequest.js.map +1 -1
- package/dist/commonjs/operations/groupQuotaSubscriptionAllocation.js +1 -0
- package/dist/commonjs/operations/groupQuotaSubscriptionAllocation.js.map +1 -1
- package/dist/commonjs/operations/groupQuotaSubscriptionAllocationRequest.js +34 -45
- package/dist/commonjs/operations/groupQuotaSubscriptionAllocationRequest.js.map +1 -1
- package/dist/commonjs/operations/groupQuotaSubscriptionRequests.js +23 -39
- package/dist/commonjs/operations/groupQuotaSubscriptionRequests.js.map +1 -1
- package/dist/commonjs/operations/groupQuotaSubscriptions.js +56 -57
- package/dist/commonjs/operations/groupQuotaSubscriptions.js.map +1 -1
- package/dist/commonjs/operations/groupQuotas.js +56 -57
- package/dist/commonjs/operations/groupQuotas.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/quotaOperation.js +23 -39
- package/dist/commonjs/operations/quotaOperation.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/usages.js +23 -39
- package/dist/commonjs/operations/usages.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/azureQuotaExtensionAPI.js +24 -5
- package/dist/esm/azureQuotaExtensionAPI.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 +72 -28
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/groupQuotaLimits.js +1 -0
- package/dist/esm/operations/groupQuotaLimits.js.map +1 -1
- package/dist/esm/operations/groupQuotaLimitsRequest.js +34 -46
- package/dist/esm/operations/groupQuotaLimitsRequest.js.map +1 -1
- package/dist/esm/operations/groupQuotaSubscriptionAllocation.js +1 -0
- package/dist/esm/operations/groupQuotaSubscriptionAllocation.js.map +1 -1
- package/dist/esm/operations/groupQuotaSubscriptionAllocationRequest.js +34 -46
- package/dist/esm/operations/groupQuotaSubscriptionAllocationRequest.js.map +1 -1
- package/dist/esm/operations/groupQuotaSubscriptionRequests.js +23 -40
- package/dist/esm/operations/groupQuotaSubscriptionRequests.js.map +1 -1
- package/dist/esm/operations/groupQuotaSubscriptions.js +56 -58
- package/dist/esm/operations/groupQuotaSubscriptions.js.map +1 -1
- package/dist/esm/operations/groupQuotas.js +56 -58
- package/dist/esm/operations/groupQuotas.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/quotaOperation.js +23 -40
- package/dist/esm/operations/quotaOperation.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/usages.js +23 -40
- package/dist/esm/operations/usages.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/azureQuotaExtensionAPI.js +24 -5
- package/dist/react-native/azureQuotaExtensionAPI.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 +72 -28
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/groupQuotaLimits.js +1 -0
- package/dist/react-native/operations/groupQuotaLimits.js.map +1 -1
- package/dist/react-native/operations/groupQuotaLimitsRequest.js +34 -46
- package/dist/react-native/operations/groupQuotaLimitsRequest.js.map +1 -1
- package/dist/react-native/operations/groupQuotaSubscriptionAllocation.js +1 -0
- package/dist/react-native/operations/groupQuotaSubscriptionAllocation.js.map +1 -1
- package/dist/react-native/operations/groupQuotaSubscriptionAllocationRequest.js +34 -46
- package/dist/react-native/operations/groupQuotaSubscriptionAllocationRequest.js.map +1 -1
- package/dist/react-native/operations/groupQuotaSubscriptionRequests.js +23 -40
- package/dist/react-native/operations/groupQuotaSubscriptionRequests.js.map +1 -1
- package/dist/react-native/operations/groupQuotaSubscriptions.js +56 -58
- package/dist/react-native/operations/groupQuotaSubscriptions.js.map +1 -1
- package/dist/react-native/operations/groupQuotas.js +56 -58
- package/dist/react-native/operations/groupQuotas.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/quotaOperation.js +23 -40
- package/dist/react-native/operations/quotaOperation.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/usages.js +23 -40
- package/dist/react-native/operations/usages.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-quota.api.md → arm-quota-node.api.md} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupQuotaSubscriptionRequests.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaSubscriptionRequests.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,kEAAkE;AAClE,MAAa,kCAAkC;IAK7C;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;I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U,EAAE,OAAO,CAAC,uCAAuC;SAC5D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;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 { GroupQuotaSubscriptionRequests } 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 { AzureQuotaExtensionAPI } from \"../azureQuotaExtensionAPI.js\";\nimport {\n GroupQuotaSubscriptionRequestStatus,\n GroupQuotaSubscriptionRequestsListNextOptionalParams,\n GroupQuotaSubscriptionRequestsListOptionalParams,\n GroupQuotaSubscriptionRequestsListResponse,\n GroupQuotaSubscriptionRequestsGetOptionalParams,\n GroupQuotaSubscriptionRequestsGetResponse,\n GroupQuotaSubscriptionRequestsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing GroupQuotaSubscriptionRequests operations. */\nexport class GroupQuotaSubscriptionRequestsImpl\n implements GroupQuotaSubscriptionRequests\n{\n private readonly client: AzureQuotaExtensionAPI;\n\n /**\n * Initialize a new instance of the class GroupQuotaSubscriptionRequests class.\n * @param client Reference to the service client\n */\n constructor(client: AzureQuotaExtensionAPI) {\n this.client = client;\n }\n\n /**\n * List API to check the status of a subscriptionId requests by requestId. Request history is\n * maintained for 1 year.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n public list(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionRequestsListOptionalParams,\n ): PagedAsyncIterableIterator<GroupQuotaSubscriptionRequestStatus> {\n const iter = this.listPagingAll(managementGroupId, groupQuotaName, options);\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 managementGroupId,\n groupQuotaName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionRequestsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<GroupQuotaSubscriptionRequestStatus[]> {\n let result: GroupQuotaSubscriptionRequestsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(managementGroupId, groupQuotaName, 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 managementGroupId,\n groupQuotaName,\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 managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionRequestsListOptionalParams,\n ): AsyncIterableIterator<GroupQuotaSubscriptionRequestStatus> {\n for await (const page of this.listPagingPage(\n managementGroupId,\n groupQuotaName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List API to check the status of a subscriptionId requests by requestId. Request history is\n * maintained for 1 year.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n private _list(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionRequestsListOptionalParams,\n ): Promise<GroupQuotaSubscriptionRequestsListResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Get API to check the status of a subscriptionIds request by requestId. Use the polling API -\n * OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in\n * seconds to check the intermediate status. This API provides the finals status with the request\n * details and status.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param requestId Request Id.\n * @param options The options parameters.\n */\n get(\n managementGroupId: string,\n groupQuotaName: string,\n requestId: string,\n options?: GroupQuotaSubscriptionRequestsGetOptionalParams,\n ): Promise<GroupQuotaSubscriptionRequestsGetResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, requestId, options },\n getOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\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 managementGroupId: string,\n groupQuotaName: string,\n nextLink: string,\n options?: GroupQuotaSubscriptionRequestsListNextOptionalParams,\n ): Promise<GroupQuotaSubscriptionRequestsListNextResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptionRequests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptionRequests/{requestId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionRequestStatus,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.requestId,\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.GroupQuotaSubscriptionRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"groupQuotaSubscriptionRequests.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaSubscriptionRequests.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,kEAAkE;AAClE,MAAa,kCAAkC;IAG5B,MAAM,CAAyB;IAEhD;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,iBAAyB,EACzB,cAAsB,EACtB,OAA0D;QAE1D,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBA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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 { GroupQuotaSubscriptionRequests } 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 { AzureQuotaExtensionAPI } from \"../azureQuotaExtensionAPI.js\";\nimport {\n GroupQuotaSubscriptionRequestStatus,\n GroupQuotaSubscriptionRequestsListNextOptionalParams,\n GroupQuotaSubscriptionRequestsListOptionalParams,\n GroupQuotaSubscriptionRequestsListResponse,\n GroupQuotaSubscriptionRequestsGetOptionalParams,\n GroupQuotaSubscriptionRequestsGetResponse,\n GroupQuotaSubscriptionRequestsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing GroupQuotaSubscriptionRequests operations. */\nexport class GroupQuotaSubscriptionRequestsImpl\n implements GroupQuotaSubscriptionRequests\n{\n private readonly client: AzureQuotaExtensionAPI;\n\n /**\n * Initialize a new instance of the class GroupQuotaSubscriptionRequests class.\n * @param client Reference to the service client\n */\n constructor(client: AzureQuotaExtensionAPI) {\n this.client = client;\n }\n\n /**\n * List API to check the status of a subscriptionId requests by requestId. Request history is\n * maintained for 1 year.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n public list(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionRequestsListOptionalParams,\n ): PagedAsyncIterableIterator<GroupQuotaSubscriptionRequestStatus> {\n const iter = this.listPagingAll(managementGroupId, groupQuotaName, options);\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 managementGroupId,\n groupQuotaName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionRequestsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<GroupQuotaSubscriptionRequestStatus[]> {\n let result: GroupQuotaSubscriptionRequestsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(managementGroupId, groupQuotaName, 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 managementGroupId,\n groupQuotaName,\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 managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionRequestsListOptionalParams,\n ): AsyncIterableIterator<GroupQuotaSubscriptionRequestStatus> {\n for await (const page of this.listPagingPage(\n managementGroupId,\n groupQuotaName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List API to check the status of a subscriptionId requests by requestId. Request history is\n * maintained for 1 year.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n private _list(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionRequestsListOptionalParams,\n ): Promise<GroupQuotaSubscriptionRequestsListResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Get API to check the status of a subscriptionIds request by requestId. Use the polling API -\n * OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in\n * seconds to check the intermediate status. This API provides the finals status with the request\n * details and status.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param requestId Request Id.\n * @param options The options parameters.\n */\n get(\n managementGroupId: string,\n groupQuotaName: string,\n requestId: string,\n options?: GroupQuotaSubscriptionRequestsGetOptionalParams,\n ): Promise<GroupQuotaSubscriptionRequestsGetResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, requestId, options },\n getOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\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 managementGroupId: string,\n groupQuotaName: string,\n nextLink: string,\n options?: GroupQuotaSubscriptionRequestsListNextOptionalParams,\n ): Promise<GroupQuotaSubscriptionRequestsListNextResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptionRequests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptionRequests/{requestId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionRequestStatus,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.requestId,\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.GroupQuotaSubscriptionRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing GroupQuotaSubscriptions operations. */
|
|
20
20
|
class GroupQuotaSubscriptionsImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class GroupQuotaSubscriptions class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -42,52 +43,35 @@ class GroupQuotaSubscriptionsImpl {
|
|
|
42
43
|
return this;
|
|
43
44
|
},
|
|
44
45
|
byPage: (settings) => {
|
|
45
|
-
if (settings
|
|
46
|
+
if (settings?.maxPageSize) {
|
|
46
47
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
47
48
|
}
|
|
48
49
|
return this.listPagingPage(managementGroupId, groupQuotaName, options, settings);
|
|
49
50
|
},
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
|
-
listPagingPage(managementGroupId, groupQuotaName, options, settings) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
});
|
|
53
|
+
async *listPagingPage(managementGroupId, groupQuotaName, options, settings) {
|
|
54
|
+
let result;
|
|
55
|
+
let continuationToken = settings?.continuationToken;
|
|
56
|
+
if (!continuationToken) {
|
|
57
|
+
result = await this._list(managementGroupId, groupQuotaName, options);
|
|
58
|
+
let page = result.value || [];
|
|
59
|
+
continuationToken = result.nextLink;
|
|
60
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
61
|
+
yield page;
|
|
62
|
+
}
|
|
63
|
+
while (continuationToken) {
|
|
64
|
+
result = await this._listNext(managementGroupId, groupQuotaName, continuationToken, options);
|
|
65
|
+
continuationToken = result.nextLink;
|
|
66
|
+
let page = result.value || [];
|
|
67
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
68
|
+
yield page;
|
|
69
|
+
}
|
|
71
70
|
}
|
|
72
|
-
listPagingAll(managementGroupId, groupQuotaName, options) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(managementGroupId, groupQuotaName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
77
|
-
_c = _f.value;
|
|
78
|
-
_d = false;
|
|
79
|
-
const page = _c;
|
|
80
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
84
|
-
finally {
|
|
85
|
-
try {
|
|
86
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
87
|
-
}
|
|
88
|
-
finally { if (e_1) throw e_1.error; }
|
|
89
|
-
}
|
|
90
|
-
});
|
|
71
|
+
async *listPagingAll(managementGroupId, groupQuotaName, options) {
|
|
72
|
+
for await (const page of this.listPagingPage(managementGroupId, groupQuotaName, options)) {
|
|
73
|
+
yield* page;
|
|
74
|
+
}
|
|
91
75
|
}
|
|
92
76
|
/**
|
|
93
77
|
* Adds a subscription to GroupQuotas. The subscriptions will be validated based on the
|
|
@@ -104,14 +88,19 @@ class GroupQuotaSubscriptionsImpl {
|
|
|
104
88
|
return this.client.sendOperationRequest(args, spec);
|
|
105
89
|
};
|
|
106
90
|
const sendOperationFn = async (args, spec) => {
|
|
107
|
-
var _a;
|
|
108
91
|
let currentRawResponse = undefined;
|
|
109
|
-
const providedCallback =
|
|
92
|
+
const providedCallback = args.options?.onResponse;
|
|
110
93
|
const callback = (rawResponse, flatResponse) => {
|
|
111
94
|
currentRawResponse = rawResponse;
|
|
112
|
-
providedCallback
|
|
95
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
96
|
+
};
|
|
97
|
+
const updatedArgs = {
|
|
98
|
+
...args,
|
|
99
|
+
options: {
|
|
100
|
+
...args.options,
|
|
101
|
+
onResponse: callback,
|
|
102
|
+
},
|
|
113
103
|
};
|
|
114
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
115
104
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
116
105
|
return {
|
|
117
106
|
flatResponse,
|
|
@@ -128,8 +117,8 @@ class GroupQuotaSubscriptionsImpl {
|
|
|
128
117
|
spec: createOrUpdateOperationSpec,
|
|
129
118
|
});
|
|
130
119
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
131
|
-
restoreFrom: options
|
|
132
|
-
intervalInMs: options
|
|
120
|
+
restoreFrom: options?.resumeFrom,
|
|
121
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
133
122
|
resourceLocationConfig: "location",
|
|
134
123
|
});
|
|
135
124
|
await poller.poll();
|
|
@@ -163,14 +152,19 @@ class GroupQuotaSubscriptionsImpl {
|
|
|
163
152
|
return this.client.sendOperationRequest(args, spec);
|
|
164
153
|
};
|
|
165
154
|
const sendOperationFn = async (args, spec) => {
|
|
166
|
-
var _a;
|
|
167
155
|
let currentRawResponse = undefined;
|
|
168
|
-
const providedCallback =
|
|
156
|
+
const providedCallback = args.options?.onResponse;
|
|
169
157
|
const callback = (rawResponse, flatResponse) => {
|
|
170
158
|
currentRawResponse = rawResponse;
|
|
171
|
-
providedCallback
|
|
159
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
160
|
+
};
|
|
161
|
+
const updatedArgs = {
|
|
162
|
+
...args,
|
|
163
|
+
options: {
|
|
164
|
+
...args.options,
|
|
165
|
+
onResponse: callback,
|
|
166
|
+
},
|
|
172
167
|
};
|
|
173
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
174
168
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
175
169
|
return {
|
|
176
170
|
flatResponse,
|
|
@@ -187,8 +181,8 @@ class GroupQuotaSubscriptionsImpl {
|
|
|
187
181
|
spec: updateOperationSpec,
|
|
188
182
|
});
|
|
189
183
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
190
|
-
restoreFrom: options
|
|
191
|
-
intervalInMs: options
|
|
184
|
+
restoreFrom: options?.resumeFrom,
|
|
185
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
192
186
|
resourceLocationConfig: "location",
|
|
193
187
|
});
|
|
194
188
|
await poller.poll();
|
|
@@ -220,14 +214,19 @@ class GroupQuotaSubscriptionsImpl {
|
|
|
220
214
|
return this.client.sendOperationRequest(args, spec);
|
|
221
215
|
};
|
|
222
216
|
const sendOperationFn = async (args, spec) => {
|
|
223
|
-
var _a;
|
|
224
217
|
let currentRawResponse = undefined;
|
|
225
|
-
const providedCallback =
|
|
218
|
+
const providedCallback = args.options?.onResponse;
|
|
226
219
|
const callback = (rawResponse, flatResponse) => {
|
|
227
220
|
currentRawResponse = rawResponse;
|
|
228
|
-
providedCallback
|
|
221
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
222
|
+
};
|
|
223
|
+
const updatedArgs = {
|
|
224
|
+
...args,
|
|
225
|
+
options: {
|
|
226
|
+
...args.options,
|
|
227
|
+
onResponse: callback,
|
|
228
|
+
},
|
|
229
229
|
};
|
|
230
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
231
230
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
232
231
|
return {
|
|
233
232
|
flatResponse,
|
|
@@ -244,8 +243,8 @@ class GroupQuotaSubscriptionsImpl {
|
|
|
244
243
|
spec: deleteOperationSpec,
|
|
245
244
|
});
|
|
246
245
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
247
|
-
restoreFrom: options
|
|
248
|
-
intervalInMs: options
|
|
246
|
+
restoreFrom: options?.resumeFrom,
|
|
247
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
249
248
|
resourceLocationConfig: "location",
|
|
250
249
|
});
|
|
251
250
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupQuotaSubscriptions.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaSubscriptions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAiB9C,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAa,2BAA2B;IAGtC;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,IAAI,CACT,iBAAyB,EACzB,cAAsB,EACtB,OAAmD;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;QAC5E,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,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E;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,2IAA2I;IACjJ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,4BAA4B;SACjD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;KAC1B;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,4BAA4B;SACjD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;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 { GroupQuotaSubscriptions } 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 { AzureQuotaExtensionAPI } from \"../azureQuotaExtensionAPI.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n GroupQuotaSubscriptionId,\n GroupQuotaSubscriptionsListNextOptionalParams,\n GroupQuotaSubscriptionsListOptionalParams,\n GroupQuotaSubscriptionsListResponse,\n GroupQuotaSubscriptionsCreateOrUpdateOptionalParams,\n GroupQuotaSubscriptionsCreateOrUpdateResponse,\n GroupQuotaSubscriptionsUpdateOptionalParams,\n GroupQuotaSubscriptionsUpdateResponse,\n GroupQuotaSubscriptionsDeleteOptionalParams,\n GroupQuotaSubscriptionsDeleteResponse,\n GroupQuotaSubscriptionsGetOptionalParams,\n GroupQuotaSubscriptionsGetResponse,\n GroupQuotaSubscriptionsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing GroupQuotaSubscriptions operations. */\nexport class GroupQuotaSubscriptionsImpl implements GroupQuotaSubscriptions {\n private readonly client: AzureQuotaExtensionAPI;\n\n /**\n * Initialize a new instance of the class GroupQuotaSubscriptions class.\n * @param client Reference to the service client\n */\n constructor(client: AzureQuotaExtensionAPI) {\n this.client = client;\n }\n\n /**\n * Returns a list of the subscriptionIds associated with the GroupQuotas.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n public list(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsListOptionalParams,\n ): PagedAsyncIterableIterator<GroupQuotaSubscriptionId> {\n const iter = this.listPagingAll(managementGroupId, groupQuotaName, options);\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 managementGroupId,\n groupQuotaName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<GroupQuotaSubscriptionId[]> {\n let result: GroupQuotaSubscriptionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(managementGroupId, groupQuotaName, 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 managementGroupId,\n groupQuotaName,\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 managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsListOptionalParams,\n ): AsyncIterableIterator<GroupQuotaSubscriptionId> {\n for await (const page of this.listPagingPage(\n managementGroupId,\n groupQuotaName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Adds a subscription to GroupQuotas. The subscriptions will be validated based on the\n * additionalAttributes defined in the GroupQuota. The additionalAttributes works as filter for the\n * subscriptions, which can be included in the GroupQuotas. The request's TenantId is validated against\n * the subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<GroupQuotaSubscriptionsCreateOrUpdateResponse>,\n GroupQuotaSubscriptionsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<GroupQuotaSubscriptionsCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { managementGroupId, groupQuotaName, options },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n GroupQuotaSubscriptionsCreateOrUpdateResponse,\n OperationState<GroupQuotaSubscriptionsCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Adds a subscription to GroupQuotas. The subscriptions will be validated based on the\n * additionalAttributes defined in the GroupQuota. The additionalAttributes works as filter for the\n * subscriptions, which can be included in the GroupQuotas. The request's TenantId is validated against\n * the subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsCreateOrUpdateOptionalParams,\n ): Promise<GroupQuotaSubscriptionsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n managementGroupId,\n groupQuotaName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates the GroupQuotas with the subscription to add to the subscriptions list. The subscriptions\n * will be validated if additionalAttributes are defined in the GroupQuota. The request's TenantId is\n * validated against the subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginUpdate(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<GroupQuotaSubscriptionsUpdateResponse>,\n GroupQuotaSubscriptionsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<GroupQuotaSubscriptionsUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { managementGroupId, groupQuotaName, options },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n GroupQuotaSubscriptionsUpdateResponse,\n OperationState<GroupQuotaSubscriptionsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates the GroupQuotas with the subscription to add to the subscriptions list. The subscriptions\n * will be validated if additionalAttributes are defined in the GroupQuota. The request's TenantId is\n * validated against the subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsUpdateOptionalParams,\n ): Promise<GroupQuotaSubscriptionsUpdateResponse> {\n const poller = await this.beginUpdate(\n managementGroupId,\n groupQuotaName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Removes the subscription from GroupQuotas. The request's TenantId is validated against the\n * subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginDelete(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<GroupQuotaSubscriptionsDeleteResponse>,\n GroupQuotaSubscriptionsDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<GroupQuotaSubscriptionsDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { managementGroupId, groupQuotaName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n GroupQuotaSubscriptionsDeleteResponse,\n OperationState<GroupQuotaSubscriptionsDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Removes the subscription from GroupQuotas. The request's TenantId is validated against the\n * subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsDeleteOptionalParams,\n ): Promise<GroupQuotaSubscriptionsDeleteResponse> {\n const poller = await this.beginDelete(\n managementGroupId,\n groupQuotaName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Returns the subscriptionIds along with its provisioning state for being associated with the\n * GroupQuota. If the subscription is not a member of GroupQuota, it will return 404, else 200.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n get(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsGetOptionalParams,\n ): Promise<GroupQuotaSubscriptionsGetResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Returns a list of the subscriptionIds associated with the GroupQuotas.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n private _list(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsListOptionalParams,\n ): Promise<GroupQuotaSubscriptionsListResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, options },\n listOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\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 managementGroupId: string,\n groupQuotaName: string,\n nextLink: string,\n options?: GroupQuotaSubscriptionsListNextOptionalParams,\n ): Promise<GroupQuotaSubscriptionsListNextResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptions/{subscriptionId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 201: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 202: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 204: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptions/{subscriptionId}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 201: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 202: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 204: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptions/{subscriptionId}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.GroupQuotaSubscriptionsDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.GroupQuotaSubscriptionsDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.GroupQuotaSubscriptionsDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.GroupQuotaSubscriptionsDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptions/{subscriptionId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionIdList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\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.GroupQuotaSubscriptionIdList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"groupQuotaSubscriptions.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaSubscriptions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAiB9C,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAa,2BAA2B;IACrB,MAAM,CAAyB;IAEhD;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,IAAI,CACT,iBAAyB,EACzB,cAAsB,EACtB,OAAmD;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;QAC5E,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO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C,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;KAC1B;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,4BAA4B;SACjD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;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 { GroupQuotaSubscriptions } 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 { AzureQuotaExtensionAPI } from \"../azureQuotaExtensionAPI.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n GroupQuotaSubscriptionId,\n GroupQuotaSubscriptionsListNextOptionalParams,\n GroupQuotaSubscriptionsListOptionalParams,\n GroupQuotaSubscriptionsListResponse,\n GroupQuotaSubscriptionsCreateOrUpdateOptionalParams,\n GroupQuotaSubscriptionsCreateOrUpdateResponse,\n GroupQuotaSubscriptionsUpdateOptionalParams,\n GroupQuotaSubscriptionsUpdateResponse,\n GroupQuotaSubscriptionsDeleteOptionalParams,\n GroupQuotaSubscriptionsDeleteResponse,\n GroupQuotaSubscriptionsGetOptionalParams,\n GroupQuotaSubscriptionsGetResponse,\n GroupQuotaSubscriptionsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing GroupQuotaSubscriptions operations. */\nexport class GroupQuotaSubscriptionsImpl implements GroupQuotaSubscriptions {\n private readonly client: AzureQuotaExtensionAPI;\n\n /**\n * Initialize a new instance of the class GroupQuotaSubscriptions class.\n * @param client Reference to the service client\n */\n constructor(client: AzureQuotaExtensionAPI) {\n this.client = client;\n }\n\n /**\n * Returns a list of the subscriptionIds associated with the GroupQuotas.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n public list(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsListOptionalParams,\n ): PagedAsyncIterableIterator<GroupQuotaSubscriptionId> {\n const iter = this.listPagingAll(managementGroupId, groupQuotaName, options);\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 managementGroupId,\n groupQuotaName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<GroupQuotaSubscriptionId[]> {\n let result: GroupQuotaSubscriptionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(managementGroupId, groupQuotaName, 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 managementGroupId,\n groupQuotaName,\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 managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsListOptionalParams,\n ): AsyncIterableIterator<GroupQuotaSubscriptionId> {\n for await (const page of this.listPagingPage(\n managementGroupId,\n groupQuotaName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Adds a subscription to GroupQuotas. The subscriptions will be validated based on the\n * additionalAttributes defined in the GroupQuota. The additionalAttributes works as filter for the\n * subscriptions, which can be included in the GroupQuotas. The request's TenantId is validated against\n * the subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<GroupQuotaSubscriptionsCreateOrUpdateResponse>,\n GroupQuotaSubscriptionsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<GroupQuotaSubscriptionsCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { managementGroupId, groupQuotaName, options },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n GroupQuotaSubscriptionsCreateOrUpdateResponse,\n OperationState<GroupQuotaSubscriptionsCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Adds a subscription to GroupQuotas. The subscriptions will be validated based on the\n * additionalAttributes defined in the GroupQuota. The additionalAttributes works as filter for the\n * subscriptions, which can be included in the GroupQuotas. The request's TenantId is validated against\n * the subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsCreateOrUpdateOptionalParams,\n ): Promise<GroupQuotaSubscriptionsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n managementGroupId,\n groupQuotaName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates the GroupQuotas with the subscription to add to the subscriptions list. The subscriptions\n * will be validated if additionalAttributes are defined in the GroupQuota. The request's TenantId is\n * validated against the subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginUpdate(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<GroupQuotaSubscriptionsUpdateResponse>,\n GroupQuotaSubscriptionsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<GroupQuotaSubscriptionsUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { managementGroupId, groupQuotaName, options },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n GroupQuotaSubscriptionsUpdateResponse,\n OperationState<GroupQuotaSubscriptionsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates the GroupQuotas with the subscription to add to the subscriptions list. The subscriptions\n * will be validated if additionalAttributes are defined in the GroupQuota. The request's TenantId is\n * validated against the subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsUpdateOptionalParams,\n ): Promise<GroupQuotaSubscriptionsUpdateResponse> {\n const poller = await this.beginUpdate(\n managementGroupId,\n groupQuotaName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Removes the subscription from GroupQuotas. The request's TenantId is validated against the\n * subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginDelete(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<GroupQuotaSubscriptionsDeleteResponse>,\n GroupQuotaSubscriptionsDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<GroupQuotaSubscriptionsDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { managementGroupId, groupQuotaName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n GroupQuotaSubscriptionsDeleteResponse,\n OperationState<GroupQuotaSubscriptionsDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Removes the subscription from GroupQuotas. The request's TenantId is validated against the\n * subscription's TenantId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsDeleteOptionalParams,\n ): Promise<GroupQuotaSubscriptionsDeleteResponse> {\n const poller = await this.beginDelete(\n managementGroupId,\n groupQuotaName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Returns the subscriptionIds along with its provisioning state for being associated with the\n * GroupQuota. If the subscription is not a member of GroupQuota, it will return 404, else 200.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n get(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsGetOptionalParams,\n ): Promise<GroupQuotaSubscriptionsGetResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Returns a list of the subscriptionIds associated with the GroupQuotas.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param options The options parameters.\n */\n private _list(\n managementGroupId: string,\n groupQuotaName: string,\n options?: GroupQuotaSubscriptionsListOptionalParams,\n ): Promise<GroupQuotaSubscriptionsListResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, options },\n listOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\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 managementGroupId: string,\n groupQuotaName: string,\n nextLink: string,\n options?: GroupQuotaSubscriptionsListNextOptionalParams,\n ): Promise<GroupQuotaSubscriptionsListNextResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptions/{subscriptionId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 201: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 202: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 204: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptions/{subscriptionId}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 201: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 202: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n 204: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptions/{subscriptionId}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.GroupQuotaSubscriptionsDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.GroupQuotaSubscriptionsDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.GroupQuotaSubscriptionsDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.GroupQuotaSubscriptionsDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptions/{subscriptionId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionId,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/subscriptions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaSubscriptionIdList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\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.GroupQuotaSubscriptionIdList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing GroupQuotas operations. */
|
|
20
20
|
class GroupQuotasImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class GroupQuotas class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -41,52 +42,35 @@ class GroupQuotasImpl {
|
|
|
41
42
|
return this;
|
|
42
43
|
},
|
|
43
44
|
byPage: (settings) => {
|
|
44
|
-
if (settings
|
|
45
|
+
if (settings?.maxPageSize) {
|
|
45
46
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
46
47
|
}
|
|
47
48
|
return this.listPagingPage(managementGroupId, options, settings);
|
|
48
49
|
},
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
listPagingPage(managementGroupId, options, settings) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
});
|
|
52
|
+
async *listPagingPage(managementGroupId, options, settings) {
|
|
53
|
+
let result;
|
|
54
|
+
let continuationToken = settings?.continuationToken;
|
|
55
|
+
if (!continuationToken) {
|
|
56
|
+
result = await this._list(managementGroupId, options);
|
|
57
|
+
let page = result.value || [];
|
|
58
|
+
continuationToken = result.nextLink;
|
|
59
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
60
|
+
yield page;
|
|
61
|
+
}
|
|
62
|
+
while (continuationToken) {
|
|
63
|
+
result = await this._listNext(managementGroupId, continuationToken, options);
|
|
64
|
+
continuationToken = result.nextLink;
|
|
65
|
+
let page = result.value || [];
|
|
66
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
67
|
+
yield page;
|
|
68
|
+
}
|
|
70
69
|
}
|
|
71
|
-
listPagingAll(managementGroupId, options) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(managementGroupId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
76
|
-
_c = _f.value;
|
|
77
|
-
_d = false;
|
|
78
|
-
const page = _c;
|
|
79
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
83
|
-
finally {
|
|
84
|
-
try {
|
|
85
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
86
|
-
}
|
|
87
|
-
finally { if (e_1) throw e_1.error; }
|
|
88
|
-
}
|
|
89
|
-
});
|
|
70
|
+
async *listPagingAll(managementGroupId, options) {
|
|
71
|
+
for await (const page of this.listPagingPage(managementGroupId, options)) {
|
|
72
|
+
yield* page;
|
|
73
|
+
}
|
|
90
74
|
}
|
|
91
75
|
/**
|
|
92
76
|
* Creates a new GroupQuota for the name passed. A RequestId will be returned by the Service. The
|
|
@@ -105,14 +89,19 @@ class GroupQuotasImpl {
|
|
|
105
89
|
return this.client.sendOperationRequest(args, spec);
|
|
106
90
|
};
|
|
107
91
|
const sendOperationFn = async (args, spec) => {
|
|
108
|
-
var _a;
|
|
109
92
|
let currentRawResponse = undefined;
|
|
110
|
-
const providedCallback =
|
|
93
|
+
const providedCallback = args.options?.onResponse;
|
|
111
94
|
const callback = (rawResponse, flatResponse) => {
|
|
112
95
|
currentRawResponse = rawResponse;
|
|
113
|
-
providedCallback
|
|
96
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
97
|
+
};
|
|
98
|
+
const updatedArgs = {
|
|
99
|
+
...args,
|
|
100
|
+
options: {
|
|
101
|
+
...args.options,
|
|
102
|
+
onResponse: callback,
|
|
103
|
+
},
|
|
114
104
|
};
|
|
115
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
116
105
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
117
106
|
return {
|
|
118
107
|
flatResponse,
|
|
@@ -129,8 +118,8 @@ class GroupQuotasImpl {
|
|
|
129
118
|
spec: createOrUpdateOperationSpec,
|
|
130
119
|
});
|
|
131
120
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
132
|
-
restoreFrom: options
|
|
133
|
-
intervalInMs: options
|
|
121
|
+
restoreFrom: options?.resumeFrom,
|
|
122
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
134
123
|
resourceLocationConfig: "location",
|
|
135
124
|
});
|
|
136
125
|
await poller.poll();
|
|
@@ -172,14 +161,19 @@ class GroupQuotasImpl {
|
|
|
172
161
|
return this.client.sendOperationRequest(args, spec);
|
|
173
162
|
};
|
|
174
163
|
const sendOperationFn = async (args, spec) => {
|
|
175
|
-
var _a;
|
|
176
164
|
let currentRawResponse = undefined;
|
|
177
|
-
const providedCallback =
|
|
165
|
+
const providedCallback = args.options?.onResponse;
|
|
178
166
|
const callback = (rawResponse, flatResponse) => {
|
|
179
167
|
currentRawResponse = rawResponse;
|
|
180
|
-
providedCallback
|
|
168
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
169
|
+
};
|
|
170
|
+
const updatedArgs = {
|
|
171
|
+
...args,
|
|
172
|
+
options: {
|
|
173
|
+
...args.options,
|
|
174
|
+
onResponse: callback,
|
|
175
|
+
},
|
|
181
176
|
};
|
|
182
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
183
177
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
184
178
|
return {
|
|
185
179
|
flatResponse,
|
|
@@ -196,8 +190,8 @@ class GroupQuotasImpl {
|
|
|
196
190
|
spec: updateOperationSpec,
|
|
197
191
|
});
|
|
198
192
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
199
|
-
restoreFrom: options
|
|
200
|
-
intervalInMs: options
|
|
193
|
+
restoreFrom: options?.resumeFrom,
|
|
194
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
201
195
|
resourceLocationConfig: "location",
|
|
202
196
|
});
|
|
203
197
|
await poller.poll();
|
|
@@ -246,14 +240,19 @@ class GroupQuotasImpl {
|
|
|
246
240
|
return this.client.sendOperationRequest(args, spec);
|
|
247
241
|
};
|
|
248
242
|
const sendOperationFn = async (args, spec) => {
|
|
249
|
-
var _a;
|
|
250
243
|
let currentRawResponse = undefined;
|
|
251
|
-
const providedCallback =
|
|
244
|
+
const providedCallback = args.options?.onResponse;
|
|
252
245
|
const callback = (rawResponse, flatResponse) => {
|
|
253
246
|
currentRawResponse = rawResponse;
|
|
254
|
-
providedCallback
|
|
247
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
248
|
+
};
|
|
249
|
+
const updatedArgs = {
|
|
250
|
+
...args,
|
|
251
|
+
options: {
|
|
252
|
+
...args.options,
|
|
253
|
+
onResponse: callback,
|
|
254
|
+
},
|
|
255
255
|
};
|
|
256
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
257
256
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
258
257
|
return {
|
|
259
258
|
flatResponse,
|
|
@@ -270,8 +269,8 @@ class GroupQuotasImpl {
|
|
|
270
269
|
spec: deleteOperationSpec,
|
|
271
270
|
});
|
|
272
271
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
273
|
-
restoreFrom: options
|
|
274
|
-
intervalInMs: options
|
|
272
|
+
restoreFrom: options?.resumeFrom,
|
|
273
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
275
274
|
resourceLocationConfig: "location",
|
|
276
275
|
});
|
|
277
276
|
await poller.poll();
|