@azure/arm-authorization-profile-2020-09-01-hybrid 2.1.1-alpha.20250619.1 → 2.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/authorizationManagementClient.js +18 -5
- package/dist/browser/authorizationManagementClient.js.map +1 -1
- package/dist/browser/operations/globalAdministrator.js +1 -0
- package/dist/browser/operations/globalAdministrator.js.map +1 -1
- package/dist/browser/operations/permissions.js +45 -79
- package/dist/browser/operations/permissions.js.map +1 -1
- package/dist/browser/operations/providerOperationsMetadataOperations.js +23 -40
- package/dist/browser/operations/providerOperationsMetadataOperations.js.map +1 -1
- package/dist/browser/operations/roleAssignments.js +89 -157
- package/dist/browser/operations/roleAssignments.js.map +1 -1
- package/dist/browser/operations/roleDefinitions.js +23 -40
- package/dist/browser/operations/roleDefinitions.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/authorizationManagementClient.js +18 -5
- package/dist/commonjs/authorizationManagementClient.js.map +1 -1
- package/dist/commonjs/operations/globalAdministrator.js +1 -0
- package/dist/commonjs/operations/globalAdministrator.js.map +1 -1
- package/dist/commonjs/operations/permissions.js +45 -78
- package/dist/commonjs/operations/permissions.js.map +1 -1
- package/dist/commonjs/operations/providerOperationsMetadataOperations.js +23 -39
- package/dist/commonjs/operations/providerOperationsMetadataOperations.js.map +1 -1
- package/dist/commonjs/operations/roleAssignments.js +89 -156
- package/dist/commonjs/operations/roleAssignments.js.map +1 -1
- package/dist/commonjs/operations/roleDefinitions.js +23 -39
- package/dist/commonjs/operations/roleDefinitions.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/authorizationManagementClient.js +18 -5
- package/dist/esm/authorizationManagementClient.js.map +1 -1
- package/dist/esm/operations/globalAdministrator.js +1 -0
- package/dist/esm/operations/globalAdministrator.js.map +1 -1
- package/dist/esm/operations/permissions.js +45 -79
- package/dist/esm/operations/permissions.js.map +1 -1
- package/dist/esm/operations/providerOperationsMetadataOperations.js +23 -40
- package/dist/esm/operations/providerOperationsMetadataOperations.js.map +1 -1
- package/dist/esm/operations/roleAssignments.js +89 -157
- package/dist/esm/operations/roleAssignments.js.map +1 -1
- package/dist/esm/operations/roleDefinitions.js +23 -40
- package/dist/esm/operations/roleDefinitions.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/authorizationManagementClient.js +18 -5
- package/dist/react-native/authorizationManagementClient.js.map +1 -1
- package/dist/react-native/operations/globalAdministrator.js +1 -0
- package/dist/react-native/operations/globalAdministrator.js.map +1 -1
- package/dist/react-native/operations/permissions.js +45 -79
- package/dist/react-native/operations/permissions.js.map +1 -1
- package/dist/react-native/operations/providerOperationsMetadataOperations.js +23 -40
- package/dist/react-native/operations/providerOperationsMetadataOperations.js.map +1 -1
- package/dist/react-native/operations/roleAssignments.js +89 -157
- package/dist/react-native/operations/roleAssignments.js.map +1 -1
- package/dist/react-native/operations/roleDefinitions.js +23 -40
- package/dist/react-native/operations/roleDefinitions.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-authorization-profile-2020-09-01-hybrid.api.md → arm-authorization-profile-2020-09-01-hybrid-node.api.md} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roleDefinitions.js","sourceRoot":"","sources":["../../../src/operations/roleDefinitions.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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,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;IACnD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EAAE,qBAAqB;IAC3B,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,cAAc;SACnC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC;IAC/D,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,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;IACxE,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 { RoleDefinitions } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport {\n RoleDefinition,\n RoleDefinitionsListNextOptionalParams,\n RoleDefinitionsListOptionalParams,\n RoleDefinitionsListResponse,\n RoleDefinitionsDeleteOptionalParams,\n RoleDefinitionsDeleteResponse,\n RoleDefinitionsGetOptionalParams,\n RoleDefinitionsGetResponse,\n RoleDefinitionsCreateOrUpdateOptionalParams,\n RoleDefinitionsCreateOrUpdateResponse,\n RoleDefinitionsGetByIdOptionalParams,\n RoleDefinitionsGetByIdResponse,\n RoleDefinitionsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RoleDefinitions operations. */\nexport class RoleDefinitionsImpl implements RoleDefinitions {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class RoleDefinitions class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Get all role definitions that are applicable at scope and above.\n * @param scope The scope of the role definition.\n * @param options The options parameters.\n */\n public list(\n scope: string,\n options?: RoleDefinitionsListOptionalParams\n ): PagedAsyncIterableIterator<RoleDefinition> {\n const iter = this.listPagingAll(scope, 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(scope, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n scope: string,\n options?: RoleDefinitionsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<RoleDefinition[]> {\n let result: RoleDefinitionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(scope, 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(scope, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n scope: string,\n options?: RoleDefinitionsListOptionalParams\n ): AsyncIterableIterator<RoleDefinition> {\n for await (const page of this.listPagingPage(scope, options)) {\n yield* page;\n }\n }\n\n /**\n * Deletes a role definition.\n * @param scope The scope of the role definition.\n * @param roleDefinitionId The ID of the role definition to delete.\n * @param options The options parameters.\n */\n delete(\n scope: string,\n roleDefinitionId: string,\n options?: RoleDefinitionsDeleteOptionalParams\n ): Promise<RoleDefinitionsDeleteResponse> {\n return this.client.sendOperationRequest(\n { scope, roleDefinitionId, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Get role definition by name (GUID).\n * @param scope The scope of the role definition.\n * @param roleDefinitionId The ID of the role definition.\n * @param options The options parameters.\n */\n get(\n scope: string,\n roleDefinitionId: string,\n options?: RoleDefinitionsGetOptionalParams\n ): Promise<RoleDefinitionsGetResponse> {\n return this.client.sendOperationRequest(\n { scope, roleDefinitionId, options },\n getOperationSpec\n );\n }\n\n /**\n * Creates or updates a role definition.\n * @param scope The scope of the role definition.\n * @param roleDefinitionId The ID of the role definition.\n * @param roleDefinition The values for the role definition.\n * @param options The options parameters.\n */\n createOrUpdate(\n scope: string,\n roleDefinitionId: string,\n roleDefinition: RoleDefinition,\n options?: RoleDefinitionsCreateOrUpdateOptionalParams\n ): Promise<RoleDefinitionsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { scope, roleDefinitionId, roleDefinition, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Get all role definitions that are applicable at scope and above.\n * @param scope The scope of the role definition.\n * @param options The options parameters.\n */\n private _list(\n scope: string,\n options?: RoleDefinitionsListOptionalParams\n ): Promise<RoleDefinitionsListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n\n /**\n * Gets a role definition by ID.\n * @param roleDefinitionId The fully qualified role definition ID. Use the format,\n * /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for\n * subscription level role definitions, or\n * /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant level role\n * definitions.\n * @param options The options parameters.\n */\n getById(\n roleDefinitionId: string,\n options?: RoleDefinitionsGetByIdOptionalParams\n ): Promise<RoleDefinitionsGetByIdResponse> {\n return this.client.sendOperationRequest(\n { roleDefinitionId, options },\n getByIdOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param scope The scope of the role definition.\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 scope: string,\n nextLink: string,\n options?: RoleDefinitionsListNextOptionalParams\n ): Promise<RoleDefinitionsListNextResponse> {\n return this.client.sendOperationRequest(\n { scope, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinition\n },\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.scope,\n Parameters.roleDefinitionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinition\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.scope,\n Parameters.roleDefinitionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.RoleDefinition\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.roleDefinition,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.scope,\n Parameters.roleDefinitionId\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Authorization/roleDefinitions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinitionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getByIdOperationSpec: coreClient.OperationSpec = {\n path: \"/{roleDefinitionId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinition\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.roleDefinitionId1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinitionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"roleDefinitions.js","sourceRoot":"","sources":["../../../src/operations/roleDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC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U;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EAAE,qBAAqB;IAC3B,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,cAAc;SACnC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC;IAC/D,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,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;IACxE,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 { RoleDefinitions } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport {\n RoleDefinition,\n RoleDefinitionsListNextOptionalParams,\n RoleDefinitionsListOptionalParams,\n RoleDefinitionsListResponse,\n RoleDefinitionsDeleteOptionalParams,\n RoleDefinitionsDeleteResponse,\n RoleDefinitionsGetOptionalParams,\n RoleDefinitionsGetResponse,\n RoleDefinitionsCreateOrUpdateOptionalParams,\n RoleDefinitionsCreateOrUpdateResponse,\n RoleDefinitionsGetByIdOptionalParams,\n RoleDefinitionsGetByIdResponse,\n RoleDefinitionsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RoleDefinitions operations. */\nexport class RoleDefinitionsImpl implements RoleDefinitions {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class RoleDefinitions class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Get all role definitions that are applicable at scope and above.\n * @param scope The scope of the role definition.\n * @param options The options parameters.\n */\n public list(\n scope: string,\n options?: RoleDefinitionsListOptionalParams\n ): PagedAsyncIterableIterator<RoleDefinition> {\n const iter = this.listPagingAll(scope, 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(scope, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n scope: string,\n options?: RoleDefinitionsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<RoleDefinition[]> {\n let result: RoleDefinitionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(scope, 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(scope, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n scope: string,\n options?: RoleDefinitionsListOptionalParams\n ): AsyncIterableIterator<RoleDefinition> {\n for await (const page of this.listPagingPage(scope, options)) {\n yield* page;\n }\n }\n\n /**\n * Deletes a role definition.\n * @param scope The scope of the role definition.\n * @param roleDefinitionId The ID of the role definition to delete.\n * @param options The options parameters.\n */\n delete(\n scope: string,\n roleDefinitionId: string,\n options?: RoleDefinitionsDeleteOptionalParams\n ): Promise<RoleDefinitionsDeleteResponse> {\n return this.client.sendOperationRequest(\n { scope, roleDefinitionId, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Get role definition by name (GUID).\n * @param scope The scope of the role definition.\n * @param roleDefinitionId The ID of the role definition.\n * @param options The options parameters.\n */\n get(\n scope: string,\n roleDefinitionId: string,\n options?: RoleDefinitionsGetOptionalParams\n ): Promise<RoleDefinitionsGetResponse> {\n return this.client.sendOperationRequest(\n { scope, roleDefinitionId, options },\n getOperationSpec\n );\n }\n\n /**\n * Creates or updates a role definition.\n * @param scope The scope of the role definition.\n * @param roleDefinitionId The ID of the role definition.\n * @param roleDefinition The values for the role definition.\n * @param options The options parameters.\n */\n createOrUpdate(\n scope: string,\n roleDefinitionId: string,\n roleDefinition: RoleDefinition,\n options?: RoleDefinitionsCreateOrUpdateOptionalParams\n ): Promise<RoleDefinitionsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { scope, roleDefinitionId, roleDefinition, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Get all role definitions that are applicable at scope and above.\n * @param scope The scope of the role definition.\n * @param options The options parameters.\n */\n private _list(\n scope: string,\n options?: RoleDefinitionsListOptionalParams\n ): Promise<RoleDefinitionsListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n\n /**\n * Gets a role definition by ID.\n * @param roleDefinitionId The fully qualified role definition ID. Use the format,\n * /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for\n * subscription level role definitions, or\n * /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant level role\n * definitions.\n * @param options The options parameters.\n */\n getById(\n roleDefinitionId: string,\n options?: RoleDefinitionsGetByIdOptionalParams\n ): Promise<RoleDefinitionsGetByIdResponse> {\n return this.client.sendOperationRequest(\n { roleDefinitionId, options },\n getByIdOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param scope The scope of the role definition.\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 scope: string,\n nextLink: string,\n options?: RoleDefinitionsListNextOptionalParams\n ): Promise<RoleDefinitionsListNextResponse> {\n return this.client.sendOperationRequest(\n { scope, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinition\n },\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.scope,\n Parameters.roleDefinitionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinition\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.scope,\n Parameters.roleDefinitionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.RoleDefinition\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.roleDefinition,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.scope,\n Parameters.roleDefinitionId\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Authorization/roleDefinitions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinitionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getByIdOperationSpec: coreClient.OperationSpec = {\n path: \"/{roleDefinitionId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinition\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.roleDefinitionId1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinitionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
|
|
|
14
14
|
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
15
15
|
*/
|
|
16
16
|
export function getContinuationToken(page) {
|
|
17
|
-
var _a;
|
|
18
17
|
if (typeof page !== "object" || page === null) {
|
|
19
18
|
return undefined;
|
|
20
19
|
}
|
|
21
|
-
return
|
|
20
|
+
return pageMap.get(page)?.continuationToken;
|
|
22
21
|
}
|
|
23
22
|
export function setContinuationToken(page, continuationToken) {
|
|
24
|
-
var _a;
|
|
25
23
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
26
24
|
return;
|
|
27
25
|
}
|
|
28
|
-
const pageInfo =
|
|
26
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
29
27
|
pageInfo.continuationToken = continuationToken;
|
|
30
28
|
pageMap.set(page, pageInfo);
|
|
31
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
|
|
@@ -13,6 +13,9 @@ const coreClient = tslib_1.__importStar(require("@azure/core-client"));
|
|
|
13
13
|
const coreRestPipeline = tslib_1.__importStar(require("@azure/core-rest-pipeline"));
|
|
14
14
|
const index_js_1 = require("./operations/index.js");
|
|
15
15
|
class AuthorizationManagementClient extends coreClient.ServiceClient {
|
|
16
|
+
$host;
|
|
17
|
+
apiVersion;
|
|
18
|
+
subscriptionId;
|
|
16
19
|
/**
|
|
17
20
|
* Initializes a new instance of the AuthorizationManagementClient class.
|
|
18
21
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -20,7 +23,6 @@ class AuthorizationManagementClient extends coreClient.ServiceClient {
|
|
|
20
23
|
* @param options The parameter options
|
|
21
24
|
*/
|
|
22
25
|
constructor(credentials, subscriptionId, options) {
|
|
23
|
-
var _a, _b, _c;
|
|
24
26
|
if (credentials === undefined) {
|
|
25
27
|
throw new Error("'credentials' cannot be null");
|
|
26
28
|
}
|
|
@@ -39,12 +41,17 @@ class AuthorizationManagementClient extends coreClient.ServiceClient {
|
|
|
39
41
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
40
42
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
41
43
|
: `${packageDetails}`;
|
|
42
|
-
const optionsWithDefaults =
|
|
44
|
+
const optionsWithDefaults = {
|
|
45
|
+
...defaults,
|
|
46
|
+
...options,
|
|
47
|
+
userAgentOptions: {
|
|
43
48
|
userAgentPrefix
|
|
44
|
-
},
|
|
49
|
+
},
|
|
50
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
51
|
+
};
|
|
45
52
|
super(optionsWithDefaults);
|
|
46
53
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
47
|
-
if (
|
|
54
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
48
55
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
49
56
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
50
57
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -58,7 +65,8 @@ class AuthorizationManagementClient extends coreClient.ServiceClient {
|
|
|
58
65
|
});
|
|
59
66
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
60
67
|
credential: credentials,
|
|
61
|
-
scopes:
|
|
68
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
69
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
62
70
|
challengeCallbacks: {
|
|
63
71
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
64
72
|
}
|
|
@@ -101,6 +109,11 @@ class AuthorizationManagementClient extends coreClient.ServiceClient {
|
|
|
101
109
|
};
|
|
102
110
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
103
111
|
}
|
|
112
|
+
permissions;
|
|
113
|
+
roleDefinitions;
|
|
114
|
+
providerOperationsMetadataOperations;
|
|
115
|
+
globalAdministrator;
|
|
116
|
+
roleAssignments;
|
|
104
117
|
}
|
|
105
118
|
exports.AuthorizationManagementClient = AuthorizationManagementClient;
|
|
106
119
|
//# sourceMappingURL=authorizationManagementClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorizationManagementClient.js","sourceRoot":"","sources":["../../src/authorizationManagementClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDAM+B;AAU/B,MAAa,6BAA8B,SAAQ,UAAU,CAAC,aAAa;
|
|
1
|
+
{"version":3,"file":"authorizationManagementClient.js","sourceRoot":"","sources":["../../src/authorizationManagementClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDAM+B;AAU/B,MAAa,6BAA8B,SAAQ,UAAU,CAAC,aAAa;IACzE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAqD;QAErD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAgD;YAC5D,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,4DAA4D,CAAC;QACpF,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OA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M,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,WAAW,CAAc;IACzB,eAAe,CAAkB;IACjC,oCAAoC,CAAuC;IAC3E,mBAAmB,CAAsB;IACzC,eAAe,CAAkB;CAClC;AAjID,sEAiIC","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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n PermissionsImpl,\n RoleDefinitionsImpl,\n ProviderOperationsMetadataOperationsImpl,\n GlobalAdministratorImpl,\n RoleAssignmentsImpl\n} from \"./operations/index.js\";\nimport {\n Permissions,\n RoleDefinitions,\n ProviderOperationsMetadataOperations,\n GlobalAdministrator,\n RoleAssignments\n} from \"./operationsInterfaces/index.js\";\nimport { AuthorizationManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class AuthorizationManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the AuthorizationManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: AuthorizationManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: AuthorizationManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-authorization-profile-2020-09-01-hybrid/2.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2015-07-01\";\n this.permissions = new PermissionsImpl(this);\n this.roleDefinitions = new RoleDefinitionsImpl(this);\n this.providerOperationsMetadataOperations = new ProviderOperationsMetadataOperationsImpl(\n this\n );\n this.globalAdministrator = new GlobalAdministratorImpl(this);\n this.roleAssignments = new RoleAssignmentsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n permissions: Permissions;\n roleDefinitions: RoleDefinitions;\n providerOperationsMetadataOperations: ProviderOperationsMetadataOperations;\n globalAdministrator: GlobalAdministrator;\n roleAssignments: RoleAssignments;\n}\n"]}
|
|
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
|
|
14
14
|
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
15
15
|
/** Class containing GlobalAdministrator operations. */
|
|
16
16
|
class GlobalAdministratorImpl {
|
|
17
|
+
client;
|
|
17
18
|
/**
|
|
18
19
|
* Initialize a new instance of the class GlobalAdministrator class.
|
|
19
20
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalAdministrator.js","sourceRoot":"","sources":["../../../src/operations/globalAdministrator.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAItD,uDAAuD;AACvD,MAAa,uBAAuB;
|
|
1
|
+
{"version":3,"file":"globalAdministrator.js","sourceRoot":"","sources":["../../../src/operations/globalAdministrator.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAItD,uDAAuD;AACvD,MAAa,uBAAuB;IACjB,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,aAAa,CACX,OAAwD;QAExD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,EACX,0BAA0B,CAC3B,CAAC;IACJ,CAAC;CACF;AAvBD,0DAuBC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,kDAAkD;IACxD,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,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 { GlobalAdministrator } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport { GlobalAdministratorElevateAccessOptionalParams } from \"../models/index.js\";\n\n/** Class containing GlobalAdministrator operations. */\nexport class GlobalAdministratorImpl implements GlobalAdministrator {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class GlobalAdministrator class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Elevates access for a Global Administrator.\n * @param options The options parameters.\n */\n elevateAccess(\n options?: GlobalAdministratorElevateAccessOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { options },\n elevateAccessOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst elevateAccessOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Authorization/elevateAccess\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing Permissions operations. */
|
|
18
18
|
class PermissionsImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class Permissions class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -38,52 +39,35 @@ class PermissionsImpl {
|
|
|
38
39
|
return this;
|
|
39
40
|
},
|
|
40
41
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
42
|
+
if (settings?.maxPageSize) {
|
|
42
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
44
|
}
|
|
44
45
|
return this.listForResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
|
-
listForResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
49
|
+
async *listForResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
50
|
+
let result;
|
|
51
|
+
let continuationToken = settings?.continuationToken;
|
|
52
|
+
if (!continuationToken) {
|
|
53
|
+
result = await this._listForResourceGroup(resourceGroupName, options);
|
|
54
|
+
let page = result.value || [];
|
|
55
|
+
continuationToken = result.nextLink;
|
|
56
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
57
|
+
yield page;
|
|
58
|
+
}
|
|
59
|
+
while (continuationToken) {
|
|
60
|
+
result = await this._listForResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
61
|
+
continuationToken = result.nextLink;
|
|
62
|
+
let page = result.value || [];
|
|
63
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
64
|
+
yield page;
|
|
65
|
+
}
|
|
67
66
|
}
|
|
68
|
-
listForResourceGroupPagingAll(resourceGroupName, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listForResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__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 tslib_1.__await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
67
|
+
async *listForResourceGroupPagingAll(resourceGroupName, options) {
|
|
68
|
+
for await (const page of this.listForResourceGroupPagingPage(resourceGroupName, options)) {
|
|
69
|
+
yield* page;
|
|
70
|
+
}
|
|
87
71
|
}
|
|
88
72
|
/**
|
|
89
73
|
* Gets all permissions the caller has for a resource.
|
|
@@ -104,52 +88,35 @@ class PermissionsImpl {
|
|
|
104
88
|
return this;
|
|
105
89
|
},
|
|
106
90
|
byPage: (settings) => {
|
|
107
|
-
if (settings
|
|
91
|
+
if (settings?.maxPageSize) {
|
|
108
92
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
109
93
|
}
|
|
110
94
|
return this.listForResourcePagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options, settings);
|
|
111
95
|
}
|
|
112
96
|
};
|
|
113
97
|
}
|
|
114
|
-
listForResourcePagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options, settings) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
});
|
|
98
|
+
async *listForResourcePagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options, settings) {
|
|
99
|
+
let result;
|
|
100
|
+
let continuationToken = settings?.continuationToken;
|
|
101
|
+
if (!continuationToken) {
|
|
102
|
+
result = await this._listForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options);
|
|
103
|
+
let page = result.value || [];
|
|
104
|
+
continuationToken = result.nextLink;
|
|
105
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
106
|
+
yield page;
|
|
107
|
+
}
|
|
108
|
+
while (continuationToken) {
|
|
109
|
+
result = await this._listForResourceNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, continuationToken, options);
|
|
110
|
+
continuationToken = result.nextLink;
|
|
111
|
+
let page = result.value || [];
|
|
112
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
113
|
+
yield page;
|
|
114
|
+
}
|
|
133
115
|
}
|
|
134
|
-
listForResourcePagingAll(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listForResourcePagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
139
|
-
_c = _f.value;
|
|
140
|
-
_d = false;
|
|
141
|
-
const page = _c;
|
|
142
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
146
|
-
finally {
|
|
147
|
-
try {
|
|
148
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
149
|
-
}
|
|
150
|
-
finally { if (e_2) throw e_2.error; }
|
|
151
|
-
}
|
|
152
|
-
});
|
|
116
|
+
async *listForResourcePagingAll(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options) {
|
|
117
|
+
for await (const page of this.listForResourcePagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options)) {
|
|
118
|
+
yield* page;
|
|
119
|
+
}
|
|
153
120
|
}
|
|
154
121
|
/**
|
|
155
122
|
* Gets all permissions the caller has for a resource group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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 { Permissions } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport {\n Permission,\n PermissionsListForResourceGroupNextOptionalParams,\n PermissionsListForResourceGroupOptionalParams,\n PermissionsListForResourceGroupResponse,\n PermissionsListForResourceNextOptionalParams,\n PermissionsListForResourceOptionalParams,\n PermissionsListForResourceResponse,\n PermissionsListForResourceGroupNextResponse,\n PermissionsListForResourceNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Permissions operations. */\nexport class PermissionsImpl implements Permissions {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class Permissions class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all permissions the caller has for a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listForResourceGroup(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): PagedAsyncIterableIterator<Permission> {\n const iter = this.listForResourceGroupPagingAll(resourceGroupName, 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.listForResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listForResourceGroupPagingPage(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Permission[]> {\n let result: PermissionsListForResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listForResourceGroup(resourceGroupName, 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._listForResourceGroupNext(\n resourceGroupName,\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 *listForResourceGroupPagingAll(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): AsyncIterableIterator<Permission> {\n for await (const page of this.listForResourceGroupPagingPage(\n resourceGroupName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all permissions the caller has for a resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param options The options parameters.\n */\n public listForResource(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): PagedAsyncIterableIterator<Permission> {\n const iter = this.listForResourcePagingAll(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\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.listForResourcePagingPage(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listForResourcePagingPage(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Permission[]> {\n let result: PermissionsListForResourceResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listForResource(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listForResourceNext(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\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 *listForResourcePagingAll(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): AsyncIterableIterator<Permission> {\n for await (const page of this.listForResourcePagingPage(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all permissions the caller has for a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listForResourceGroup(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): Promise<PermissionsListForResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listForResourceGroupOperationSpec\n );\n }\n\n /**\n * Gets all permissions the caller has for a resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param options The options parameters.\n */\n private _listForResource(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): Promise<PermissionsListForResourceResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options\n },\n listForResourceOperationSpec\n );\n }\n\n /**\n * ListForResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListForResourceGroup method.\n * @param options The options parameters.\n */\n private _listForResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: PermissionsListForResourceGroupNextOptionalParams\n ): Promise<PermissionsListForResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listForResourceGroupNextOperationSpec\n );\n }\n\n /**\n * ListForResourceNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param nextLink The nextLink from the previous successful call to the ListForResource method.\n * @param options The options parameters.\n */\n private _listForResourceNext(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n nextLink: string,\n options?: PermissionsListForResourceNextOptionalParams\n ): Promise<PermissionsListForResourceNextResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n nextLink,\n options\n },\n listForResourceNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listForResourceGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourcePath,\n Parameters.resourceType,\n Parameters.resourceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourcePath,\n Parameters.resourceType,\n Parameters.resourceName,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../../src/operations/permissions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,4C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C5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;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,yBAAyB;QACpC,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,YAAY;QACvB,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 { Permissions } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport {\n Permission,\n PermissionsListForResourceGroupNextOptionalParams,\n PermissionsListForResourceGroupOptionalParams,\n PermissionsListForResourceGroupResponse,\n PermissionsListForResourceNextOptionalParams,\n PermissionsListForResourceOptionalParams,\n PermissionsListForResourceResponse,\n PermissionsListForResourceGroupNextResponse,\n PermissionsListForResourceNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Permissions operations. */\nexport class PermissionsImpl implements Permissions {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class Permissions class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all permissions the caller has for a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listForResourceGroup(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): PagedAsyncIterableIterator<Permission> {\n const iter = this.listForResourceGroupPagingAll(resourceGroupName, 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.listForResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listForResourceGroupPagingPage(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Permission[]> {\n let result: PermissionsListForResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listForResourceGroup(resourceGroupName, 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._listForResourceGroupNext(\n resourceGroupName,\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 *listForResourceGroupPagingAll(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): AsyncIterableIterator<Permission> {\n for await (const page of this.listForResourceGroupPagingPage(\n resourceGroupName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all permissions the caller has for a resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param options The options parameters.\n */\n public listForResource(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): PagedAsyncIterableIterator<Permission> {\n const iter = this.listForResourcePagingAll(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\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.listForResourcePagingPage(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listForResourcePagingPage(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Permission[]> {\n let result: PermissionsListForResourceResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listForResource(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listForResourceNext(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\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 *listForResourcePagingAll(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): AsyncIterableIterator<Permission> {\n for await (const page of this.listForResourcePagingPage(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all permissions the caller has for a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listForResourceGroup(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): Promise<PermissionsListForResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listForResourceGroupOperationSpec\n );\n }\n\n /**\n * Gets all permissions the caller has for a resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param options The options parameters.\n */\n private _listForResource(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): Promise<PermissionsListForResourceResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options\n },\n listForResourceOperationSpec\n );\n }\n\n /**\n * ListForResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListForResourceGroup method.\n * @param options The options parameters.\n */\n private _listForResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: PermissionsListForResourceGroupNextOptionalParams\n ): Promise<PermissionsListForResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listForResourceGroupNextOperationSpec\n );\n }\n\n /**\n * ListForResourceNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param nextLink The nextLink from the previous successful call to the ListForResource method.\n * @param options The options parameters.\n */\n private _listForResourceNext(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n nextLink: string,\n options?: PermissionsListForResourceNextOptionalParams\n ): Promise<PermissionsListForResourceNextResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n nextLink,\n options\n },\n listForResourceNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listForResourceGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourcePath,\n Parameters.resourceType,\n Parameters.resourceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourcePath,\n Parameters.resourceType,\n Parameters.resourceName,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing ProviderOperationsMetadataOperations operations. */
|
|
18
18
|
class ProviderOperationsMetadataOperationsImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class ProviderOperationsMetadataOperations class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -37,52 +38,35 @@ class ProviderOperationsMetadataOperationsImpl {
|
|
|
37
38
|
return this;
|
|
38
39
|
},
|
|
39
40
|
byPage: (settings) => {
|
|
40
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
41
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
42
43
|
}
|
|
43
44
|
return this.listPagingPage(options, settings);
|
|
44
45
|
}
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
listPagingPage(options, settings) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
48
|
+
async *listPagingPage(options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._list(options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listNext(continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
66
65
|
}
|
|
67
|
-
listPagingAll(options) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
72
|
-
_c = _f.value;
|
|
73
|
-
_d = false;
|
|
74
|
-
const page = _c;
|
|
75
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__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 tslib_1.__await(_b.call(_e));
|
|
82
|
-
}
|
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
|
84
|
-
}
|
|
85
|
-
});
|
|
66
|
+
async *listPagingAll(options) {
|
|
67
|
+
for await (const page of this.listPagingPage(options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
86
70
|
}
|
|
87
71
|
/**
|
|
88
72
|
* Gets provider operations metadata for the specified resource provider.
|