@azure/arm-rediscache 8.2.1-alpha.20250618.1 → 8.2.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/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +176 -80
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/accessPolicy.js +45 -52
- package/dist/browser/operations/accessPolicy.js.map +1 -1
- package/dist/browser/operations/accessPolicyAssignment.js +45 -52
- package/dist/browser/operations/accessPolicyAssignment.js.map +1 -1
- package/dist/browser/operations/asyncOperationStatus.js +1 -0
- package/dist/browser/operations/asyncOperationStatus.js.map +1 -1
- package/dist/browser/operations/firewallRules.js +23 -40
- package/dist/browser/operations/firewallRules.js.map +1 -1
- package/dist/browser/operations/linkedServer.js +45 -52
- package/dist/browser/operations/linkedServer.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/patchSchedules.js +23 -40
- package/dist/browser/operations/patchSchedules.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnections.js +21 -33
- package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/privateLinkResources.js +10 -27
- package/dist/browser/operations/privateLinkResources.js.map +1 -1
- package/dist/browser/operations/redis.js +136 -157
- package/dist/browser/operations/redis.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/browser/redisManagementClient.js +23 -5
- package/dist/browser/redisManagementClient.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 +176 -80
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/accessPolicy.js +45 -51
- package/dist/commonjs/operations/accessPolicy.js.map +1 -1
- package/dist/commonjs/operations/accessPolicyAssignment.js +45 -51
- package/dist/commonjs/operations/accessPolicyAssignment.js.map +1 -1
- package/dist/commonjs/operations/asyncOperationStatus.js +1 -0
- package/dist/commonjs/operations/asyncOperationStatus.js.map +1 -1
- package/dist/commonjs/operations/firewallRules.js +23 -39
- package/dist/commonjs/operations/firewallRules.js.map +1 -1
- package/dist/commonjs/operations/linkedServer.js +45 -51
- package/dist/commonjs/operations/linkedServer.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/patchSchedules.js +23 -39
- package/dist/commonjs/operations/patchSchedules.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js +21 -32
- package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/privateLinkResources.js +10 -26
- package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
- package/dist/commonjs/operations/redis.js +136 -156
- package/dist/commonjs/operations/redis.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/redisManagementClient.js +23 -5
- package/dist/commonjs/redisManagementClient.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +176 -80
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/accessPolicy.js +45 -52
- package/dist/esm/operations/accessPolicy.js.map +1 -1
- package/dist/esm/operations/accessPolicyAssignment.js +45 -52
- package/dist/esm/operations/accessPolicyAssignment.js.map +1 -1
- package/dist/esm/operations/asyncOperationStatus.js +1 -0
- package/dist/esm/operations/asyncOperationStatus.js.map +1 -1
- package/dist/esm/operations/firewallRules.js +23 -40
- package/dist/esm/operations/firewallRules.js.map +1 -1
- package/dist/esm/operations/linkedServer.js +45 -52
- package/dist/esm/operations/linkedServer.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/patchSchedules.js +23 -40
- package/dist/esm/operations/patchSchedules.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnections.js +21 -33
- package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/privateLinkResources.js +10 -27
- package/dist/esm/operations/privateLinkResources.js.map +1 -1
- package/dist/esm/operations/redis.js +136 -157
- package/dist/esm/operations/redis.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/esm/redisManagementClient.js +23 -5
- package/dist/esm/redisManagementClient.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 +176 -80
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/accessPolicy.js +45 -52
- package/dist/react-native/operations/accessPolicy.js.map +1 -1
- package/dist/react-native/operations/accessPolicyAssignment.js +45 -52
- package/dist/react-native/operations/accessPolicyAssignment.js.map +1 -1
- package/dist/react-native/operations/asyncOperationStatus.js +1 -0
- package/dist/react-native/operations/asyncOperationStatus.js.map +1 -1
- package/dist/react-native/operations/firewallRules.js +23 -40
- package/dist/react-native/operations/firewallRules.js.map +1 -1
- package/dist/react-native/operations/linkedServer.js +45 -52
- package/dist/react-native/operations/linkedServer.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/patchSchedules.js +23 -40
- package/dist/react-native/operations/patchSchedules.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js +21 -33
- package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/privateLinkResources.js +10 -27
- package/dist/react-native/operations/privateLinkResources.js.map +1 -1
- package/dist/react-native/operations/redis.js +136 -157
- package/dist/react-native/operations/redis.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/dist/react-native/redisManagementClient.js +23 -5
- package/dist/react-native/redisManagementClient.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-rediscache.api.md → arm-rediscache-node.api.md} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessPolicy.js","sourceRoot":"","sources":["../../../src/operations/accessPolicy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAc9C,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,OAAO,gBAAgB;IAG3B;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAyB,EACzB,SAAiB,EACjB,OAAwC;QAExC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QACvE,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC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gB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,+HAA+H;IACrI,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;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,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AccessPolicy } 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 { RedisManagementClient } from \"../redisManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n RedisCacheAccessPolicy,\n AccessPolicyListNextOptionalParams,\n AccessPolicyListOptionalParams,\n AccessPolicyListResponse,\n AccessPolicyCreateUpdateOptionalParams,\n AccessPolicyCreateUpdateResponse,\n AccessPolicyDeleteOptionalParams,\n AccessPolicyGetOptionalParams,\n AccessPolicyGetResponse,\n AccessPolicyListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AccessPolicy operations. */\nexport class AccessPolicyImpl implements AccessPolicy {\n private readonly client: RedisManagementClient;\n\n /**\n * Initialize a new instance of the class AccessPolicy class.\n * @param client Reference to the service client\n */\n constructor(client: RedisManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the list of access policies associated with this redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyListOptionalParams,\n ): PagedAsyncIterableIterator<RedisCacheAccessPolicy> {\n const iter = this.listPagingAll(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<RedisCacheAccessPolicy[]> {\n let result: AccessPolicyListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\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 resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyListOptionalParams,\n ): AsyncIterableIterator<RedisCacheAccessPolicy> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n cacheName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Adds an access policy to the redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyName The name of the access policy that is being added to the Redis cache.\n * @param parameters Parameters supplied to the Create Update Access Policy operation.\n * @param options The options parameters.\n */\n async beginCreateUpdate(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyName: string,\n parameters: RedisCacheAccessPolicy,\n options?: AccessPolicyCreateUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AccessPolicyCreateUpdateResponse>,\n AccessPolicyCreateUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AccessPolicyCreateUpdateResponse> => {\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: {\n resourceGroupName,\n cacheName,\n accessPolicyName,\n parameters,\n options,\n },\n spec: createUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n AccessPolicyCreateUpdateResponse,\n OperationState<AccessPolicyCreateUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Adds an access policy to the redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyName The name of the access policy that is being added to the Redis cache.\n * @param parameters Parameters supplied to the Create Update Access Policy operation.\n * @param options The options parameters.\n */\n async beginCreateUpdateAndWait(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyName: string,\n parameters: RedisCacheAccessPolicy,\n options?: AccessPolicyCreateUpdateOptionalParams,\n ): Promise<AccessPolicyCreateUpdateResponse> {\n const poller = await this.beginCreateUpdate(\n resourceGroupName,\n cacheName,\n accessPolicyName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes the access policy from a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyName The name of the access policy that is being added to the Redis cache.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyName: string,\n options?: AccessPolicyDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\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: { resourceGroupName, cacheName, accessPolicyName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the access policy from a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyName The name of the access policy that is being added to the Redis cache.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyName: string,\n options?: AccessPolicyDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n cacheName,\n accessPolicyName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets the detailed information about an access policy of a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyName The name of the access policy that is being added to the Redis cache.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyName: string,\n options?: AccessPolicyGetOptionalParams,\n ): Promise<AccessPolicyGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, accessPolicyName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Gets the list of access policies associated with this redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyListOptionalParams,\n ): Promise<AccessPolicyListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, options },\n listOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\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 resourceGroupName: string,\n cacheName: string,\n nextLink: string,\n options?: AccessPolicyListNextOptionalParams,\n ): Promise<AccessPolicyListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicies/{accessPolicyName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicy,\n },\n 201: {\n bodyMapper: Mappers.RedisCacheAccessPolicy,\n },\n 202: {\n bodyMapper: Mappers.RedisCacheAccessPolicy,\n },\n 204: {\n bodyMapper: Mappers.RedisCacheAccessPolicy,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters10,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicies/{accessPolicyName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicies/{accessPolicyName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicy,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicies\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicyList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\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.RedisCacheAccessPolicyList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"accessPolicy.js","sourceRoot":"","sources":["../../../src/operations/accessPolicy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAc9C,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,OAAO,gBAAgB;IACV,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAyB,EACzB,SAAiB,EACjB,OAAwC;QAExC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QACvE,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CACxB,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CA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QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AccessPolicy } 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 { RedisManagementClient } from \"../redisManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n RedisCacheAccessPolicy,\n AccessPolicyListNextOptionalParams,\n AccessPolicyListOptionalParams,\n AccessPolicyListResponse,\n AccessPolicyCreateUpdateOptionalParams,\n AccessPolicyCreateUpdateResponse,\n AccessPolicyDeleteOptionalParams,\n AccessPolicyGetOptionalParams,\n AccessPolicyGetResponse,\n AccessPolicyListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AccessPolicy operations. */\nexport class AccessPolicyImpl implements AccessPolicy {\n private readonly client: RedisManagementClient;\n\n /**\n * Initialize a new instance of the class AccessPolicy class.\n * @param client Reference to the service client\n */\n constructor(client: RedisManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the list of access policies associated with this redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyListOptionalParams,\n ): PagedAsyncIterableIterator<RedisCacheAccessPolicy> {\n const iter = this.listPagingAll(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<RedisCacheAccessPolicy[]> {\n let result: AccessPolicyListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\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 resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyListOptionalParams,\n ): AsyncIterableIterator<RedisCacheAccessPolicy> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n cacheName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Adds an access policy to the redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyName The name of the access policy that is being added to the Redis cache.\n * @param parameters Parameters supplied to the Create Update Access Policy operation.\n * @param options The options parameters.\n */\n async beginCreateUpdate(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyName: string,\n parameters: RedisCacheAccessPolicy,\n options?: AccessPolicyCreateUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AccessPolicyCreateUpdateResponse>,\n AccessPolicyCreateUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AccessPolicyCreateUpdateResponse> => {\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: {\n resourceGroupName,\n cacheName,\n accessPolicyName,\n parameters,\n options,\n },\n spec: createUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n AccessPolicyCreateUpdateResponse,\n OperationState<AccessPolicyCreateUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Adds an access policy to the redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyName The name of the access policy that is being added to the Redis cache.\n * @param parameters Parameters supplied to the Create Update Access Policy operation.\n * @param options The options parameters.\n */\n async beginCreateUpdateAndWait(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyName: string,\n parameters: RedisCacheAccessPolicy,\n options?: AccessPolicyCreateUpdateOptionalParams,\n ): Promise<AccessPolicyCreateUpdateResponse> {\n const poller = await this.beginCreateUpdate(\n resourceGroupName,\n cacheName,\n accessPolicyName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes the access policy from a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyName The name of the access policy that is being added to the Redis cache.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyName: string,\n options?: AccessPolicyDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\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: { resourceGroupName, cacheName, accessPolicyName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the access policy from a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyName The name of the access policy that is being added to the Redis cache.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyName: string,\n options?: AccessPolicyDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n cacheName,\n accessPolicyName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets the detailed information about an access policy of a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyName The name of the access policy that is being added to the Redis cache.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyName: string,\n options?: AccessPolicyGetOptionalParams,\n ): Promise<AccessPolicyGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, accessPolicyName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Gets the list of access policies associated with this redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyListOptionalParams,\n ): Promise<AccessPolicyListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, options },\n listOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\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 resourceGroupName: string,\n cacheName: string,\n nextLink: string,\n options?: AccessPolicyListNextOptionalParams,\n ): Promise<AccessPolicyListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicies/{accessPolicyName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicy,\n },\n 201: {\n bodyMapper: Mappers.RedisCacheAccessPolicy,\n },\n 202: {\n bodyMapper: Mappers.RedisCacheAccessPolicy,\n },\n 204: {\n bodyMapper: Mappers.RedisCacheAccessPolicy,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters10,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicies/{accessPolicyName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicies/{accessPolicyName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicy,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicies\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicyList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\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.RedisCacheAccessPolicyList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing AccessPolicyAssignment operations. */
|
|
17
16
|
export class AccessPolicyAssignmentImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class AccessPolicyAssignment class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -38,52 +38,35 @@ export class AccessPolicyAssignmentImpl {
|
|
|
38
38
|
return this;
|
|
39
39
|
},
|
|
40
40
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
42
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
43
|
}
|
|
44
44
|
return this.listPagingPage(resourceGroupName, cacheName, options, settings);
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
listPagingPage(resourceGroupName, cacheName, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
48
|
+
async *listPagingPage(resourceGroupName, cacheName, options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._list(resourceGroupName, cacheName, options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
setContinuationToken(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listNext(resourceGroupName, cacheName, continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
setContinuationToken(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
67
65
|
}
|
|
68
|
-
listPagingAll(resourceGroupName, cacheName, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceGroupName, cacheName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
66
|
+
async *listPagingAll(resourceGroupName, cacheName, options) {
|
|
67
|
+
for await (const page of this.listPagingPage(resourceGroupName, cacheName, options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
87
70
|
}
|
|
88
71
|
/**
|
|
89
72
|
* Adds the access policy assignment to the specified users
|
|
@@ -98,14 +81,19 @@ export class AccessPolicyAssignmentImpl {
|
|
|
98
81
|
return this.client.sendOperationRequest(args, spec);
|
|
99
82
|
};
|
|
100
83
|
const sendOperationFn = async (args, spec) => {
|
|
101
|
-
var _a;
|
|
102
84
|
let currentRawResponse = undefined;
|
|
103
|
-
const providedCallback =
|
|
85
|
+
const providedCallback = args.options?.onResponse;
|
|
104
86
|
const callback = (rawResponse, flatResponse) => {
|
|
105
87
|
currentRawResponse = rawResponse;
|
|
106
|
-
providedCallback
|
|
88
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
89
|
+
};
|
|
90
|
+
const updatedArgs = {
|
|
91
|
+
...args,
|
|
92
|
+
options: {
|
|
93
|
+
...args.options,
|
|
94
|
+
onResponse: callback,
|
|
95
|
+
},
|
|
107
96
|
};
|
|
108
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
109
97
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
110
98
|
return {
|
|
111
99
|
flatResponse,
|
|
@@ -128,8 +116,8 @@ export class AccessPolicyAssignmentImpl {
|
|
|
128
116
|
spec: createUpdateOperationSpec,
|
|
129
117
|
});
|
|
130
118
|
const poller = await createHttpPoller(lro, {
|
|
131
|
-
restoreFrom: options
|
|
132
|
-
intervalInMs: options
|
|
119
|
+
restoreFrom: options?.resumeFrom,
|
|
120
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
133
121
|
});
|
|
134
122
|
await poller.poll();
|
|
135
123
|
return poller;
|
|
@@ -158,14 +146,19 @@ export class AccessPolicyAssignmentImpl {
|
|
|
158
146
|
return this.client.sendOperationRequest(args, spec);
|
|
159
147
|
};
|
|
160
148
|
const sendOperationFn = async (args, spec) => {
|
|
161
|
-
var _a;
|
|
162
149
|
let currentRawResponse = undefined;
|
|
163
|
-
const providedCallback =
|
|
150
|
+
const providedCallback = args.options?.onResponse;
|
|
164
151
|
const callback = (rawResponse, flatResponse) => {
|
|
165
152
|
currentRawResponse = rawResponse;
|
|
166
|
-
providedCallback
|
|
153
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
154
|
+
};
|
|
155
|
+
const updatedArgs = {
|
|
156
|
+
...args,
|
|
157
|
+
options: {
|
|
158
|
+
...args.options,
|
|
159
|
+
onResponse: callback,
|
|
160
|
+
},
|
|
167
161
|
};
|
|
168
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
169
162
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
170
163
|
return {
|
|
171
164
|
flatResponse,
|
|
@@ -187,8 +180,8 @@ export class AccessPolicyAssignmentImpl {
|
|
|
187
180
|
spec: deleteOperationSpec,
|
|
188
181
|
});
|
|
189
182
|
const poller = await createHttpPoller(lro, {
|
|
190
|
-
restoreFrom: options
|
|
191
|
-
intervalInMs: options
|
|
183
|
+
restoreFrom: options?.resumeFrom,
|
|
184
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
192
185
|
resourceLocationConfig: "location",
|
|
193
186
|
});
|
|
194
187
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessPolicyAssignment.js","sourceRoot":"","sources":["../../../src/operations/accessPolicyAssignment.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAc9C,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAM,OAAO,0BAA0B;IAGrC;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAyB,EACzB,SAAiB,EACjB,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QACvE,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,W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AK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,0BAA0B;KACtC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,wIAAwI;IAC9I,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;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,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AccessPolicyAssignment } 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 { RedisManagementClient } from \"../redisManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n RedisCacheAccessPolicyAssignment,\n AccessPolicyAssignmentListNextOptionalParams,\n AccessPolicyAssignmentListOptionalParams,\n AccessPolicyAssignmentListResponse,\n AccessPolicyAssignmentCreateUpdateOptionalParams,\n AccessPolicyAssignmentCreateUpdateResponse,\n AccessPolicyAssignmentDeleteOptionalParams,\n AccessPolicyAssignmentGetOptionalParams,\n AccessPolicyAssignmentGetResponse,\n AccessPolicyAssignmentListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AccessPolicyAssignment operations. */\nexport class AccessPolicyAssignmentImpl implements AccessPolicyAssignment {\n private readonly client: RedisManagementClient;\n\n /**\n * Initialize a new instance of the class AccessPolicyAssignment class.\n * @param client Reference to the service client\n */\n constructor(client: RedisManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the list of access policy assignments associated with this redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyAssignmentListOptionalParams,\n ): PagedAsyncIterableIterator<RedisCacheAccessPolicyAssignment> {\n const iter = this.listPagingAll(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyAssignmentListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<RedisCacheAccessPolicyAssignment[]> {\n let result: AccessPolicyAssignmentListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\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 resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyAssignmentListOptionalParams,\n ): AsyncIterableIterator<RedisCacheAccessPolicyAssignment> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n cacheName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Adds the access policy assignment to the specified users\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyAssignmentName The name of the access policy assignment.\n * @param parameters Parameters supplied to the Create Update Access Policy Assignment operation.\n * @param options The options parameters.\n */\n async beginCreateUpdate(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyAssignmentName: string,\n parameters: RedisCacheAccessPolicyAssignment,\n options?: AccessPolicyAssignmentCreateUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AccessPolicyAssignmentCreateUpdateResponse>,\n AccessPolicyAssignmentCreateUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AccessPolicyAssignmentCreateUpdateResponse> => {\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: {\n resourceGroupName,\n cacheName,\n accessPolicyAssignmentName,\n parameters,\n options,\n },\n spec: createUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n AccessPolicyAssignmentCreateUpdateResponse,\n OperationState<AccessPolicyAssignmentCreateUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Adds the access policy assignment to the specified users\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyAssignmentName The name of the access policy assignment.\n * @param parameters Parameters supplied to the Create Update Access Policy Assignment operation.\n * @param options The options parameters.\n */\n async beginCreateUpdateAndWait(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyAssignmentName: string,\n parameters: RedisCacheAccessPolicyAssignment,\n options?: AccessPolicyAssignmentCreateUpdateOptionalParams,\n ): Promise<AccessPolicyAssignmentCreateUpdateResponse> {\n const poller = await this.beginCreateUpdate(\n resourceGroupName,\n cacheName,\n accessPolicyAssignmentName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes the access policy assignment from a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyAssignmentName The name of the access policy assignment.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyAssignmentName: string,\n options?: AccessPolicyAssignmentDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\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: {\n resourceGroupName,\n cacheName,\n accessPolicyAssignmentName,\n options,\n },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the access policy assignment from a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyAssignmentName The name of the access policy assignment.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyAssignmentName: string,\n options?: AccessPolicyAssignmentDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n cacheName,\n accessPolicyAssignmentName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets the list of assignments for an access policy of a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyAssignmentName The name of the access policy assignment.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyAssignmentName: string,\n options?: AccessPolicyAssignmentGetOptionalParams,\n ): Promise<AccessPolicyAssignmentGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, accessPolicyAssignmentName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Gets the list of access policy assignments associated with this redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyAssignmentListOptionalParams,\n ): Promise<AccessPolicyAssignmentListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, options },\n listOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\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 resourceGroupName: string,\n cacheName: string,\n nextLink: string,\n options?: AccessPolicyAssignmentListNextOptionalParams,\n ): Promise<AccessPolicyAssignmentListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicyAssignments/{accessPolicyAssignmentName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignment,\n },\n 201: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignment,\n },\n 202: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignment,\n },\n 204: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignment,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters11,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyAssignmentName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicyAssignments/{accessPolicyAssignmentName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyAssignmentName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicyAssignments/{accessPolicyAssignmentName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignment,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyAssignmentName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicyAssignments\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignmentList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\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.RedisCacheAccessPolicyAssignmentList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"accessPolicyAssignment.js","sourceRoot":"","sources":["../../../src/operations/accessPolicyAssignment.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAc9C,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAM,OAAO,0BAA0B;IACpB,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAyB,EACzB,SAAiB,EACjB,OAAkD;QAElD,MAAM,IAA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E;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,0BAA0B;KACtC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,wIAAwI;IAC9I,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;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,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AccessPolicyAssignment } 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 { RedisManagementClient } from \"../redisManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n RedisCacheAccessPolicyAssignment,\n AccessPolicyAssignmentListNextOptionalParams,\n AccessPolicyAssignmentListOptionalParams,\n AccessPolicyAssignmentListResponse,\n AccessPolicyAssignmentCreateUpdateOptionalParams,\n AccessPolicyAssignmentCreateUpdateResponse,\n AccessPolicyAssignmentDeleteOptionalParams,\n AccessPolicyAssignmentGetOptionalParams,\n AccessPolicyAssignmentGetResponse,\n AccessPolicyAssignmentListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AccessPolicyAssignment operations. */\nexport class AccessPolicyAssignmentImpl implements AccessPolicyAssignment {\n private readonly client: RedisManagementClient;\n\n /**\n * Initialize a new instance of the class AccessPolicyAssignment class.\n * @param client Reference to the service client\n */\n constructor(client: RedisManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the list of access policy assignments associated with this redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyAssignmentListOptionalParams,\n ): PagedAsyncIterableIterator<RedisCacheAccessPolicyAssignment> {\n const iter = this.listPagingAll(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyAssignmentListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<RedisCacheAccessPolicyAssignment[]> {\n let result: AccessPolicyAssignmentListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\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 resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyAssignmentListOptionalParams,\n ): AsyncIterableIterator<RedisCacheAccessPolicyAssignment> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n cacheName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Adds the access policy assignment to the specified users\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyAssignmentName The name of the access policy assignment.\n * @param parameters Parameters supplied to the Create Update Access Policy Assignment operation.\n * @param options The options parameters.\n */\n async beginCreateUpdate(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyAssignmentName: string,\n parameters: RedisCacheAccessPolicyAssignment,\n options?: AccessPolicyAssignmentCreateUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AccessPolicyAssignmentCreateUpdateResponse>,\n AccessPolicyAssignmentCreateUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AccessPolicyAssignmentCreateUpdateResponse> => {\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: {\n resourceGroupName,\n cacheName,\n accessPolicyAssignmentName,\n parameters,\n options,\n },\n spec: createUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n AccessPolicyAssignmentCreateUpdateResponse,\n OperationState<AccessPolicyAssignmentCreateUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Adds the access policy assignment to the specified users\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyAssignmentName The name of the access policy assignment.\n * @param parameters Parameters supplied to the Create Update Access Policy Assignment operation.\n * @param options The options parameters.\n */\n async beginCreateUpdateAndWait(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyAssignmentName: string,\n parameters: RedisCacheAccessPolicyAssignment,\n options?: AccessPolicyAssignmentCreateUpdateOptionalParams,\n ): Promise<AccessPolicyAssignmentCreateUpdateResponse> {\n const poller = await this.beginCreateUpdate(\n resourceGroupName,\n cacheName,\n accessPolicyAssignmentName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes the access policy assignment from a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyAssignmentName The name of the access policy assignment.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyAssignmentName: string,\n options?: AccessPolicyAssignmentDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\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: {\n resourceGroupName,\n cacheName,\n accessPolicyAssignmentName,\n options,\n },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the access policy assignment from a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyAssignmentName The name of the access policy assignment.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyAssignmentName: string,\n options?: AccessPolicyAssignmentDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n cacheName,\n accessPolicyAssignmentName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets the list of assignments for an access policy of a redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param accessPolicyAssignmentName The name of the access policy assignment.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n cacheName: string,\n accessPolicyAssignmentName: string,\n options?: AccessPolicyAssignmentGetOptionalParams,\n ): Promise<AccessPolicyAssignmentGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, accessPolicyAssignmentName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Gets the list of access policy assignments associated with this redis cache\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n cacheName: string,\n options?: AccessPolicyAssignmentListOptionalParams,\n ): Promise<AccessPolicyAssignmentListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, options },\n listOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\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 resourceGroupName: string,\n cacheName: string,\n nextLink: string,\n options?: AccessPolicyAssignmentListNextOptionalParams,\n ): Promise<AccessPolicyAssignmentListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicyAssignments/{accessPolicyAssignmentName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignment,\n },\n 201: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignment,\n },\n 202: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignment,\n },\n 204: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignment,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters11,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyAssignmentName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicyAssignments/{accessPolicyAssignmentName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyAssignmentName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicyAssignments/{accessPolicyAssignmentName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignment,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.accessPolicyAssignmentName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicyAssignments\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisCacheAccessPolicyAssignmentList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\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.RedisCacheAccessPolicyAssignmentList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing AsyncOperationStatus operations. */
|
|
12
12
|
export class AsyncOperationStatusImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class AsyncOperationStatus class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncOperationStatus.js","sourceRoot":"","sources":["../../../src/operations/asyncOperationStatus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,wDAAwD;AACxD,MAAM,OAAO,wBAAwB;
|
|
1
|
+
{"version":3,"file":"asyncOperationStatus.js","sourceRoot":"","sources":["../../../src/operations/asyncOperationStatus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,wDAAwD;AACxD,MAAM,OAAO,wBAAwB;IAClB,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,GAAG,CACD,QAAgB,EAChB,WAAmB,EACnB,OAA+C;QAE/C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,EAClC,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,8GAA8G;IACpH,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;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,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,WAAW;KACvB;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 { AsyncOperationStatus } 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 { RedisManagementClient } from \"../redisManagementClient.js\";\nimport {\n AsyncOperationStatusGetOptionalParams,\n AsyncOperationStatusGetResponse,\n} from \"../models/index.js\";\n\n/** Class containing AsyncOperationStatus operations. */\nexport class AsyncOperationStatusImpl implements AsyncOperationStatus {\n private readonly client: RedisManagementClient;\n\n /**\n * Initialize a new instance of the class AsyncOperationStatus class.\n * @param client Reference to the service client\n */\n constructor(client: RedisManagementClient) {\n this.client = client;\n }\n\n /**\n * For checking the ongoing status of an operation\n * @param location The location at which operation was triggered\n * @param operationId The ID of asynchronous operation\n * @param options The options parameters.\n */\n get(\n location: string,\n operationId: string,\n options?: AsyncOperationStatusGetOptionalParams,\n ): Promise<AsyncOperationStatusGetResponse> {\n return this.client.sendOperationRequest(\n { location, operationId, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/asyncOperations/{operationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationStatus,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n Parameters.operationId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing FirewallRules operations. */
|
|
15
14
|
export class FirewallRulesImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class FirewallRules class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -36,52 +36,35 @@ export class FirewallRulesImpl {
|
|
|
36
36
|
return this;
|
|
37
37
|
},
|
|
38
38
|
byPage: (settings) => {
|
|
39
|
-
if (settings
|
|
39
|
+
if (settings?.maxPageSize) {
|
|
40
40
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
41
41
|
}
|
|
42
42
|
return this.listPagingPage(resourceGroupName, cacheName, options, settings);
|
|
43
43
|
},
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
listPagingPage(resourceGroupName, cacheName, options, settings) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
});
|
|
46
|
+
async *listPagingPage(resourceGroupName, cacheName, options, settings) {
|
|
47
|
+
let result;
|
|
48
|
+
let continuationToken = settings?.continuationToken;
|
|
49
|
+
if (!continuationToken) {
|
|
50
|
+
result = await this._list(resourceGroupName, cacheName, options);
|
|
51
|
+
let page = result.value || [];
|
|
52
|
+
continuationToken = result.nextLink;
|
|
53
|
+
setContinuationToken(page, continuationToken);
|
|
54
|
+
yield page;
|
|
55
|
+
}
|
|
56
|
+
while (continuationToken) {
|
|
57
|
+
result = await this._listNext(resourceGroupName, cacheName, continuationToken, options);
|
|
58
|
+
continuationToken = result.nextLink;
|
|
59
|
+
let page = result.value || [];
|
|
60
|
+
setContinuationToken(page, continuationToken);
|
|
61
|
+
yield page;
|
|
62
|
+
}
|
|
65
63
|
}
|
|
66
|
-
listPagingAll(resourceGroupName, cacheName, options) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceGroupName, cacheName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
71
|
-
_c = _f.value;
|
|
72
|
-
_d = false;
|
|
73
|
-
const page = _c;
|
|
74
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
78
|
-
finally {
|
|
79
|
-
try {
|
|
80
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
81
|
-
}
|
|
82
|
-
finally { if (e_1) throw e_1.error; }
|
|
83
|
-
}
|
|
84
|
-
});
|
|
64
|
+
async *listPagingAll(resourceGroupName, cacheName, options) {
|
|
65
|
+
for await (const page of this.listPagingPage(resourceGroupName, cacheName, options)) {
|
|
66
|
+
yield* page;
|
|
67
|
+
}
|
|
85
68
|
}
|
|
86
69
|
/**
|
|
87
70
|
* Gets all firewall rules in the specified redis cache.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firewallRules.js","sourceRoot":"","sources":["../../../src/operations/firewallRules.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,4CAA4C;AAC5C,iDAAiD;AACjD,MAAM,OAAO,iBAAiB;IAG5B;;;O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O,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,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,QAAQ;KACpB;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,2BAA2B;SAChD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { FirewallRules } 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 { RedisManagementClient } from \"../redisManagementClient.js\";\nimport {\n RedisFirewallRule,\n FirewallRulesListNextOptionalParams,\n FirewallRulesListOptionalParams,\n FirewallRulesListResponse,\n FirewallRulesCreateOrUpdateOptionalParams,\n FirewallRulesCreateOrUpdateResponse,\n FirewallRulesGetOptionalParams,\n FirewallRulesGetResponse,\n FirewallRulesDeleteOptionalParams,\n FirewallRulesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing FirewallRules operations. */\nexport class FirewallRulesImpl implements FirewallRules {\n private readonly client: RedisManagementClient;\n\n /**\n * Initialize a new instance of the class FirewallRules class.\n * @param client Reference to the service client\n */\n constructor(client: RedisManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all firewall rules in the specified redis cache.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n cacheName: string,\n options?: FirewallRulesListOptionalParams,\n ): PagedAsyncIterableIterator<RedisFirewallRule> {\n const iter = this.listPagingAll(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n cacheName: string,\n options?: FirewallRulesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<RedisFirewallRule[]> {\n let result: FirewallRulesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\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 resourceGroupName: string,\n cacheName: string,\n options?: FirewallRulesListOptionalParams,\n ): AsyncIterableIterator<RedisFirewallRule> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n cacheName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all firewall rules in the specified redis cache.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n cacheName: string,\n options?: FirewallRulesListOptionalParams,\n ): Promise<FirewallRulesListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Create or update a redis cache firewall rule\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param ruleName The name of the firewall rule.\n * @param parameters Parameters supplied to the create or update redis firewall rule operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n cacheName: string,\n ruleName: string,\n parameters: RedisFirewallRule,\n options?: FirewallRulesCreateOrUpdateOptionalParams,\n ): Promise<FirewallRulesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, ruleName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Gets a single firewall rule in a specified redis cache.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param ruleName The name of the firewall rule.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n cacheName: string,\n ruleName: string,\n options?: FirewallRulesGetOptionalParams,\n ): Promise<FirewallRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, ruleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Deletes a single firewall rule in a specified redis cache.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param ruleName The name of the firewall rule.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n cacheName: string,\n ruleName: string,\n options?: FirewallRulesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, ruleName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\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 resourceGroupName: string,\n cacheName: string,\n nextLink: string,\n options?: FirewallRulesListNextOptionalParams,\n ): Promise<FirewallRulesListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisFirewallRuleListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisFirewallRule,\n },\n 201: {\n bodyMapper: Mappers.RedisFirewallRule,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters7,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisFirewallRule,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.ruleName,\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.RedisFirewallRuleListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"firewallRules.js","sourceRoot":"","sources":["../../../src/operations/firewallRules.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,CA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eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,QAAQ;KACpB;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,2BAA2B;SAChD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { FirewallRules } 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 { RedisManagementClient } from \"../redisManagementClient.js\";\nimport {\n RedisFirewallRule,\n FirewallRulesListNextOptionalParams,\n FirewallRulesListOptionalParams,\n FirewallRulesListResponse,\n FirewallRulesCreateOrUpdateOptionalParams,\n FirewallRulesCreateOrUpdateResponse,\n FirewallRulesGetOptionalParams,\n FirewallRulesGetResponse,\n FirewallRulesDeleteOptionalParams,\n FirewallRulesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing FirewallRules operations. */\nexport class FirewallRulesImpl implements FirewallRules {\n private readonly client: RedisManagementClient;\n\n /**\n * Initialize a new instance of the class FirewallRules class.\n * @param client Reference to the service client\n */\n constructor(client: RedisManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all firewall rules in the specified redis cache.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n cacheName: string,\n options?: FirewallRulesListOptionalParams,\n ): PagedAsyncIterableIterator<RedisFirewallRule> {\n const iter = this.listPagingAll(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n cacheName: string,\n options?: FirewallRulesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<RedisFirewallRule[]> {\n let result: FirewallRulesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, cacheName, 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 resourceGroupName,\n cacheName,\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 resourceGroupName: string,\n cacheName: string,\n options?: FirewallRulesListOptionalParams,\n ): AsyncIterableIterator<RedisFirewallRule> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n cacheName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all firewall rules in the specified redis cache.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n cacheName: string,\n options?: FirewallRulesListOptionalParams,\n ): Promise<FirewallRulesListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Create or update a redis cache firewall rule\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param ruleName The name of the firewall rule.\n * @param parameters Parameters supplied to the create or update redis firewall rule operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n cacheName: string,\n ruleName: string,\n parameters: RedisFirewallRule,\n options?: FirewallRulesCreateOrUpdateOptionalParams,\n ): Promise<FirewallRulesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, ruleName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Gets a single firewall rule in a specified redis cache.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param ruleName The name of the firewall rule.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n cacheName: string,\n ruleName: string,\n options?: FirewallRulesGetOptionalParams,\n ): Promise<FirewallRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, ruleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Deletes a single firewall rule in a specified redis cache.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\n * @param ruleName The name of the firewall rule.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n cacheName: string,\n ruleName: string,\n options?: FirewallRulesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, ruleName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName The name of the Redis cache.\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 resourceGroupName: string,\n cacheName: string,\n nextLink: string,\n options?: FirewallRulesListNextOptionalParams,\n ): Promise<FirewallRulesListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, cacheName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisFirewallRuleListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisFirewallRule,\n },\n 201: {\n bodyMapper: Mappers.RedisFirewallRule,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters7,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RedisFirewallRule,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.ruleName,\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.RedisFirewallRuleListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|