diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 0a2b37686955..33520903cfd6 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2223,7 +2223,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/chai-as-promised/7.1.5: @@ -2245,7 +2245,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/cookie/0.4.1: @@ -2255,7 +2255,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/debug/4.1.7: @@ -2267,7 +2267,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/eslint/8.4.10: @@ -2288,7 +2288,7 @@ packages: /@types/express-serve-static-core/4.17.33: resolution: {integrity: sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2305,20 +2305,20 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/glob/8.0.1: resolution: {integrity: sha512-8bVUjXZvJacUFkJXHdyZ9iH1Eaj5V7I8c4NdH5sQJsdXkqT4CA5Dhb4yb4VE/3asyx4L9ayZr1NIhTsWHczmMw==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/inquirer/8.2.6: @@ -2331,7 +2331,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/json-schema/7.0.11: @@ -2345,13 +2345,13 @@ packages: /@types/jsonwebtoken/9.0.1: resolution: {integrity: sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/mdast/3.0.10: @@ -2387,7 +2387,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 form-data: 3.0.1 dev: false @@ -2434,7 +2434,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/semaphore/1.1.1: @@ -2449,7 +2449,7 @@ packages: resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/sinon/10.0.13: @@ -2471,13 +2471,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/tough-cookie/4.0.2: @@ -2491,13 +2491,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/underscore/1.11.4: @@ -2515,19 +2515,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false /@types/yargs-parser/21.0.0: @@ -2544,7 +2544,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.36 + '@types/node': 18.14.0 dev: false optional: true @@ -3662,7 +3662,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3918,7 +3918,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 4.8.4 + typescript: 4.9.5 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3969,7 +3969,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.36 + '@types/node': 18.14.0 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -5018,7 +5018,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -13952,15 +13952,15 @@ packages: dev: false file:projects/arm-redisenterprisecache.tgz: - resolution: {integrity: sha512-ZblOOs1n4xj3dEEohtMcg+2IcN79ZCBr9z/GkgEl821DN8gMvHKJFAZcVS4UkAJ5kDea/kCrejWuNeT/bjmu2w==, tarball: file:projects/arm-redisenterprisecache.tgz} + resolution: {integrity: sha512-EMoeWYQ+7y7eQ3N2VKnU2C1p6ejrqOG3tRHYGAlj4KwHY4ld884PyCsfldLg4sNu7D9raId/8PcrfWuPz6TkNw==, tarball: file:projects/arm-redisenterprisecache.tgz} name: '@rush-temp/arm-redisenterprisecache' version: 0.0.0 dependencies: '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.34.4_@types+node@14.18.36 - '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 - '@rollup/plugin-json': 6.0.0_rollup@2.79.1 - '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 + '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 + '@rollup/plugin-json': 4.1.0_rollup@2.79.1 + '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@types/chai': 4.3.4 '@types/node': 14.18.36 diff --git a/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md b/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md index f606c90dcf3e..57693dcc5694 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md @@ -1,15 +1,41 @@ # Release History + +## 2.3.0-beta.1 (2023-02-22) + +**Features** -## 2.2.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group Skus + - Added operation Databases.beginFlush + - Added operation Databases.beginFlushAndWait + - Added Interface Capability + - Added Interface ClusterPropertiesEncryption + - Added Interface ClusterPropertiesEncryptionCustomerManagedKeyEncryption + - Added Interface ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity + - Added Interface DatabasesFlushHeaders + - Added Interface DatabasesFlushOptionalParams + - Added Interface FlushParameters + - Added Interface LocationInfo + - Added Interface ManagedServiceIdentity + - Added Interface RegionSkuDetail + - Added Interface RegionSkuDetails + - Added Interface SkuDetail + - Added Interface SkusListOptionalParams + - Added Interface SystemData + - Added Interface UserAssignedIdentity + - Added Type Alias CreatedByType + - Added Type Alias ManagedServiceIdentityType + - Added Type Alias Name + - Added Type Alias SkusListResponse + - Interface Cluster has a new optional parameter encryption + - Interface Cluster has a new optional parameter identity + - Interface ClusterUpdate has a new optional parameter encryption + - Interface ClusterUpdate has a new optional parameter identity + - Interface Resource has a new optional parameter systemData + - Added Enum KnownCreatedByType + - Added Enum KnownManagedServiceIdentityType + - Added Enum KnownName + + ## 2.2.0 (2022-12-07) **Features** diff --git a/sdk/redisenterprise/arm-redisenterprisecache/LICENSE b/sdk/redisenterprise/arm-redisenterprisecache/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/LICENSE +++ b/sdk/redisenterprise/arm-redisenterprisecache/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/redisenterprise/arm-redisenterprisecache/README.md b/sdk/redisenterprise/arm-redisenterprisecache/README.md index 06757599b3f5..dafc2f91a1b8 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/README.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/README.md @@ -6,7 +6,7 @@ REST API for managing Redis Enterprise resources in Azure. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redisenterprise/arm-redisenterprisecache) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-redisenterprisecache) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-redisenterprisecache) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-redisenterprisecache?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/redisenterprise/arm-redisenterprisecache/_meta.json b/sdk/redisenterprise/arm-redisenterprisecache/_meta.json index c28c75b21dd3..5e99a22b3f16 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/_meta.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d2122bd6c18c0e76f33e522288567c51ddfbc205", + "commit": "6949b0babd3fd6979ee4c3b8fdd1208f25ab9894", "readme": "specification/redisenterprise/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\redisenterprise\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.4 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/redisenterprise/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.2", - "use": "@autorest/typescript@6.0.0-rc.4" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/redisenterprise/arm-redisenterprisecache/package.json b/sdk/redisenterprise/arm-redisenterprisecache/package.json index 65d0f73e7813..a0edf7d2e337 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/package.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for RedisEnterpriseManagementClient.", - "version": "2.2.1", + "version": "2.3.0-beta.1", "engines": { "node": ">=14.0.0" }, @@ -29,9 +29,9 @@ "types": "./types/arm-redisenterprisecache.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "@rollup/plugin-commonjs": "^24.0.0", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-multi-entry": "^6.0.0", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-multi-entry": "^4.1.0", "@rollup/plugin-node-resolve": "^13.1.3", "mkdirp": "^1.0.4", "rollup": "^2.66.1", @@ -110,13 +110,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-redisenterprisecache?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/redisenterprise/arm-redisenterprisecache/review/arm-redisenterprisecache.api.md b/sdk/redisenterprise/arm-redisenterprisecache/review/arm-redisenterprisecache.api.md index 925aa738ae93..1e59f1b16ca5 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/review/arm-redisenterprisecache.api.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/review/arm-redisenterprisecache.api.md @@ -25,9 +25,17 @@ export type ActionType = string; // @public export type AofFrequency = string; +// @public +export interface Capability { + name?: string; + value?: boolean; +} + // @public export interface Cluster extends TrackedResource { + encryption?: ClusterPropertiesEncryption; readonly hostName?: string; + identity?: ManagedServiceIdentity; minimumTlsVersion?: TlsVersion; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; @@ -46,9 +54,28 @@ export interface ClusterList { value?: Cluster[]; } +// @public +export interface ClusterPropertiesEncryption { + customerManagedKeyEncryption?: ClusterPropertiesEncryptionCustomerManagedKeyEncryption; +} + +// @public +export interface ClusterPropertiesEncryptionCustomerManagedKeyEncryption { + keyEncryptionKeyIdentity?: ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity; + keyEncryptionKeyUrl?: string; +} + +// @public +export interface ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity { + identityType?: ManagedServiceIdentityType; + userAssignedIdentityResourceId?: string; +} + // @public export interface ClusterUpdate { + encryption?: ClusterPropertiesEncryption; readonly hostName?: string; + identity?: ManagedServiceIdentity; minimumTlsVersion?: TlsVersion; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; @@ -60,6 +87,9 @@ export interface ClusterUpdate { }; } +// @public +export type CreatedByType = string; + // @public export interface Database extends ProxyResource { clientProtocol?: Protocol; @@ -93,6 +123,8 @@ export interface Databases { beginDeleteAndWait(resourceGroupName: string, clusterName: string, databaseName: string, options?: DatabasesDeleteOptionalParams): Promise; beginExport(resourceGroupName: string, clusterName: string, databaseName: string, parameters: ExportClusterParameters, options?: DatabasesExportOptionalParams): Promise, void>>; beginExportAndWait(resourceGroupName: string, clusterName: string, databaseName: string, parameters: ExportClusterParameters, options?: DatabasesExportOptionalParams): Promise; + beginFlush(resourceGroupName: string, clusterName: string, databaseName: string, parameters: FlushParameters, options?: DatabasesFlushOptionalParams): Promise, void>>; + beginFlushAndWait(resourceGroupName: string, clusterName: string, databaseName: string, parameters: FlushParameters, options?: DatabasesFlushOptionalParams): Promise; beginForceUnlink(resourceGroupName: string, clusterName: string, databaseName: string, parameters: ForceUnlinkParameters, options?: DatabasesForceUnlinkOptionalParams): Promise, void>>; beginForceUnlinkAndWait(resourceGroupName: string, clusterName: string, databaseName: string, parameters: ForceUnlinkParameters, options?: DatabasesForceUnlinkOptionalParams): Promise; beginImport(resourceGroupName: string, clusterName: string, databaseName: string, parameters: ImportClusterParameters, options?: DatabasesImportOptionalParams): Promise, void>>; @@ -127,6 +159,18 @@ export interface DatabasesExportOptionalParams extends coreClient.OperationOptio updateIntervalInMs?: number; } +// @public +export interface DatabasesFlushHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface DatabasesFlushOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface DatabasesForceUnlinkOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -226,6 +270,11 @@ export interface ExportClusterParameters { sasUri: string; } +// @public +export interface FlushParameters { + ids?: string[]; +} + // @public export interface ForceUnlinkParameters { ids: string[]; @@ -256,6 +305,14 @@ export enum KnownClusteringPolicy { OSSCluster = "OSSCluster" } +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + // @public export enum KnownEvictionPolicy { AllKeysLFU = "AllKeysLFU", @@ -277,6 +334,27 @@ export enum KnownLinkState { Unlinking = "Unlinking" } +// @public +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + SystemAssignedIdentity = "systemAssignedIdentity", + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", + UserAssigned = "UserAssigned", + UserAssignedIdentity = "userAssignedIdentity" +} + +// @public +export enum KnownName { + EnterpriseE10 = "Enterprise_E10", + EnterpriseE100 = "Enterprise_E100", + EnterpriseE20 = "Enterprise_E20", + EnterpriseE50 = "Enterprise_E50", + EnterpriseFlashF1500 = "EnterpriseFlash_F1500", + EnterpriseFlashF300 = "EnterpriseFlash_F300", + EnterpriseFlashF700 = "EnterpriseFlash_F700" +} + // @public export enum KnownOrigin { System = "system", @@ -365,6 +443,25 @@ export interface LinkedDatabase { // @public export type LinkState = string; +// @public +export interface LocationInfo { + capabilities?: Capability[]; + location?: string; +} + +// @public +export interface ManagedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity; + }; +} + +// @public +export type ManagedServiceIdentityType = string; + // @public export interface Module { args?: string; @@ -372,6 +469,9 @@ export interface Module { readonly version?: string; } +// @public +export type Name = string; + // @public export interface Operation { readonly actionType?: ActionType; @@ -633,6 +733,8 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { // (undocumented) redisEnterprise: RedisEnterprise; // (undocumented) + skus: Skus; + // (undocumented) subscriptionId: string; } @@ -657,10 +759,23 @@ export interface RegenerateKeyParameters { keyType: AccessKeyType; } +// @public +export interface RegionSkuDetail { + locationInfo?: LocationInfo; + resourceType?: string; + skuDetails?: SkuDetail; +} + +// @public +export interface RegionSkuDetails { + value?: RegionSkuDetail[]; +} + // @public export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -673,9 +788,36 @@ export interface Sku { name: SkuName; } +// @public +export interface SkuDetail { + name?: Name; +} + // @public export type SkuName = string; +// @public +export interface Skus { + list(location: string, options?: SkusListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SkusListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SkusListResponse = RegionSkuDetails; + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + // @public export type TlsVersion = string; @@ -687,6 +829,12 @@ export interface TrackedResource extends Resource { }; } +// @public +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts index 008564f03f2a..80c125638e51 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts @@ -145,6 +145,60 @@ export interface Sku { capacity?: number; } +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { + /** + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + type: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; +} + +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** + * The principal ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; +} + +/** Encryption-at-rest configuration for the cluster. */ +export interface ClusterPropertiesEncryption { + /** All Customer-managed key encryption properties for the resource. Set this to an empty object to use Microsoft-managed key encryption. */ + customerManagedKeyEncryption?: ClusterPropertiesEncryptionCustomerManagedKeyEncryption; +} + +/** All Customer-managed key encryption properties for the resource. Set this to an empty object to use Microsoft-managed key encryption. */ +export interface ClusterPropertiesEncryptionCustomerManagedKeyEncryption { + /** All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. */ + keyEncryptionKeyIdentity?: ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity; + /** Key encryption key Url, versioned or unversioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. */ + keyEncryptionKeyUrl?: string; +} + +/** All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. */ +export interface ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity { + /** User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. */ + userAssignedIdentityResourceId?: string; + /** Only userAssignedIdentity is supported in this API version; other types may be supported in the future */ + identityType?: ManagedServiceIdentityType; +} + /** The Private Endpoint resource. */ export interface PrivateEndpoint { /** @@ -181,16 +235,41 @@ export interface Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; } /** A partial update to the RedisEnterprise cluster */ export interface ClusterUpdate { /** The SKU to create, which affects price, performance, and features. */ sku?: Sku; + /** The identity of the resource. */ + identity?: ManagedServiceIdentity; /** Resource tags. */ tags?: { [propertyName: string]: string }; /** The minimum TLS version for the cluster to support, e.g. '1.2' */ minimumTlsVersion?: TlsVersion; + /** Encryption-at-rest configuration for the cluster. */ + encryption?: ClusterPropertiesEncryption; /** * DNS name of the cluster endpoint * NOTE: This property will not be serialized. It can only be populated by the server. @@ -362,6 +441,50 @@ export interface ForceUnlinkParameters { ids: string[]; } +/** Parameters for a Redis Enterprise active geo-replication flush operation. */ +export interface FlushParameters { + /** The resource identifiers of all the other database resources in the georeplication group to be flushed */ + ids?: string[]; +} + +/** List of details about all the available SKUs */ +export interface RegionSkuDetails { + /** List of Sku Detail */ + value?: RegionSkuDetail[]; +} + +/** Details about the location requested and the available skus in the location */ +export interface RegionSkuDetail { + /** Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise */ + resourceType?: string; + /** Details about location and its capabilities */ + locationInfo?: LocationInfo; + /** Details about available skus */ + skuDetails?: SkuDetail; +} + +/** Information about location (for example: features that it supports) */ +export interface LocationInfo { + /** Location name */ + location?: string; + /** List of capabilities */ + capabilities?: Capability[]; +} + +/** Information about the features the location supports */ +export interface Capability { + /** Feature name */ + name?: string; + /** Indicates whether feature is supported or not */ + value?: boolean; +} + +/** Information about Sku */ +export interface SkuDetail { + /** The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.) */ + name?: Name; +} + /** The Private Endpoint Connection resource. */ export interface PrivateEndpointConnection extends Resource { /** The resource of private end point. */ @@ -408,8 +531,12 @@ export interface Cluster extends TrackedResource { sku: Sku; /** The Availability Zones where this cluster will be deployed. */ zones?: string[]; + /** The identity of the resource. */ + identity?: ManagedServiceIdentity; /** The minimum TLS version for the cluster to support, e.g. '1.2' */ minimumTlsVersion?: TlsVersion; + /** Encryption-at-rest configuration for the cluster. */ + encryption?: ClusterPropertiesEncryption; /** * DNS name of the cluster endpoint * NOTE: This property will not be serialized. It can only be populated by the server. @@ -465,6 +592,14 @@ export interface Database extends ProxyResource { geoReplication?: DatabasePropertiesGeoReplication; } +/** Defines headers for Databases_flush operation. */ +export interface DatabasesFlushHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { /** User */ @@ -534,6 +669,36 @@ export enum KnownSkuName { */ export type SkuName = string; +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", + /** SystemAssignedIdentity */ + SystemAssignedIdentity = "systemAssignedIdentity", + /** UserAssignedIdentity */ + UserAssignedIdentity = "userAssignedIdentity" +} + +/** + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned, UserAssigned** \ + * **systemAssignedIdentity** \ + * **userAssignedIdentity** + */ +export type ManagedServiceIdentityType = string; + /** Known values of {@link TlsVersion} that the service accepts. */ export enum KnownTlsVersion { /** One0 */ @@ -678,6 +843,30 @@ export enum KnownPrivateEndpointConnectionProvisioningState { */ export type PrivateEndpointConnectionProvisioningState = string; +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + /** Known values of {@link Protocol} that the service accepts. */ export enum KnownProtocol { /** Encrypted */ @@ -815,6 +1004,39 @@ export enum KnownLinkState { * **UnlinkFailed** */ export type LinkState = string; + +/** Known values of {@link Name} that the service accepts. */ +export enum KnownName { + /** EnterpriseE10 */ + EnterpriseE10 = "Enterprise_E10", + /** EnterpriseE20 */ + EnterpriseE20 = "Enterprise_E20", + /** EnterpriseE50 */ + EnterpriseE50 = "Enterprise_E50", + /** EnterpriseE100 */ + EnterpriseE100 = "Enterprise_E100", + /** EnterpriseFlashF300 */ + EnterpriseFlashF300 = "EnterpriseFlash_F300", + /** EnterpriseFlashF700 */ + EnterpriseFlashF700 = "EnterpriseFlash_F700", + /** EnterpriseFlashF1500 */ + EnterpriseFlashF1500 = "EnterpriseFlash_F1500" +} + +/** + * Defines values for Name. \ + * {@link KnownName} can be used interchangeably with Name, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enterprise_E10** \ + * **Enterprise_E20** \ + * **Enterprise_E50** \ + * **Enterprise_E100** \ + * **EnterpriseFlash_F300** \ + * **EnterpriseFlash_F700** \ + * **EnterpriseFlash_F1500** + */ +export type Name = string; /** Defines values for AccessKeyType. */ export type AccessKeyType = "Primary" | "Secondary"; @@ -1000,6 +1222,15 @@ export interface DatabasesForceUnlinkOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface DatabasesFlushOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface DatabasesListByClusterNextOptionalParams extends coreClient.OperationOptions {} @@ -1044,6 +1275,12 @@ export interface PrivateLinkResourcesListByClusterOptionalParams /** Contains response data for the listByCluster operation. */ export type PrivateLinkResourcesListByClusterResponse = PrivateLinkResourceListResult; +/** Optional parameters. */ +export interface SkusListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SkusListResponse = RegionSkuDetails; + /** Optional parameters. */ export interface RedisEnterpriseManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts index 7e9608ab2454..dadd34de972f 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts @@ -282,6 +282,129 @@ export const Sku: coreClient.CompositeMapper = { } }; +export const ManagedServiceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedServiceIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } + } + } + } + } +}; + +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "Uuid" + } + } + } + } +}; + +export const ClusterPropertiesEncryption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPropertiesEncryption", + modelProperties: { + customerManagedKeyEncryption: { + serializedName: "customerManagedKeyEncryption", + type: { + name: "Composite", + className: "ClusterPropertiesEncryptionCustomerManagedKeyEncryption" + } + } + } + } +}; + +export const ClusterPropertiesEncryptionCustomerManagedKeyEncryption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPropertiesEncryptionCustomerManagedKeyEncryption", + modelProperties: { + keyEncryptionKeyIdentity: { + serializedName: "keyEncryptionKeyIdentity", + type: { + name: "Composite", + className: + "ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity" + } + }, + keyEncryptionKeyUrl: { + serializedName: "keyEncryptionKeyUrl", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity", + modelProperties: { + userAssignedIdentityResourceId: { + serializedName: "userAssignedIdentityResourceId", + type: { + name: "String" + } + }, + identityType: { + serializedName: "identityType", + type: { + name: "String" + } + } + } + } +}; + export const PrivateEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", @@ -350,6 +473,58 @@ export const Resource: coreClient.CompositeMapper = { type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } @@ -367,6 +542,13 @@ export const ClusterUpdate: coreClient.CompositeMapper = { className: "Sku" } }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, tags: { serializedName: "tags", type: { @@ -380,6 +562,13 @@ export const ClusterUpdate: coreClient.CompositeMapper = { name: "String" } }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "ClusterPropertiesEncryption" + } + }, hostName: { serializedName: "properties.hostName", readOnly: true, @@ -805,6 +994,139 @@ export const ForceUnlinkParameters: coreClient.CompositeMapper = { } }; +export const FlushParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlushParameters", + modelProperties: { + ids: { + serializedName: "ids", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RegionSkuDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegionSkuDetails", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegionSkuDetail" + } + } + } + } + } + } +}; + +export const RegionSkuDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegionSkuDetail", + modelProperties: { + resourceType: { + serializedName: "resourceType", + type: { + name: "String" + } + }, + locationInfo: { + serializedName: "locationInfo", + type: { + name: "Composite", + className: "LocationInfo" + } + }, + skuDetails: { + serializedName: "skuDetails", + type: { + name: "Composite", + className: "SkuDetail" + } + } + } + } +}; + +export const LocationInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LocationInfo", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + capabilities: { + serializedName: "capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Capability" + } + } + } + } + } + } +}; + +export const Capability: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Capability", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Boolean" + } + } + } + } +}; + +export const SkuDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuDetail", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", @@ -934,12 +1256,26 @@ export const Cluster: coreClient.CompositeMapper = { } } }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, minimumTlsVersion: { serializedName: "properties.minimumTlsVersion", type: { name: "String" } }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "ClusterPropertiesEncryption" + } + }, hostName: { serializedName: "properties.hostName", readOnly: true, @@ -1058,3 +1394,24 @@ export const Database: coreClient.CompositeMapper = { } } }; + +export const DatabasesFlushHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabasesFlushHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts index 578c2b61c331..62beffee0ad5 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts @@ -20,6 +20,7 @@ import { ImportClusterParameters as ImportClusterParametersMapper, ExportClusterParameters as ExportClusterParametersMapper, ForceUnlinkParameters as ForceUnlinkParametersMapper, + FlushParameters as FlushParametersMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper } from "../models/mappers"; @@ -50,7 +51,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-01-01", + defaultValue: "2023-03-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -202,6 +203,11 @@ export const parameters7: OperationParameter = { mapper: ForceUnlinkParametersMapper }; +export const parameters8: OperationParameter = { + parameterPath: "parameters", + mapper: FlushParametersMapper +}; + export const privateEndpointConnectionName: OperationURLParameter = { parameterPath: "privateEndpointConnectionName", mapper: { diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts index 25d62f51d443..5b5d164b73ef 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts @@ -39,6 +39,8 @@ import { DatabasesExportOptionalParams, ForceUnlinkParameters, DatabasesForceUnlinkOptionalParams, + FlushParameters, + DatabasesFlushOptionalParams, DatabasesListByClusterNextResponse } from "../models"; @@ -545,7 +547,7 @@ export class DatabasesImpl implements Databases { const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -855,6 +857,99 @@ export class DatabasesImpl implements Databases { return poller.pollUntilDone(); } + /** + * Flushes all the keys in this database and also from its linked databases. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the RedisEnterprise cluster. + * @param databaseName The name of the database. + * @param parameters Information identifying the databases to be flushed + * @param options The options parameters. + */ + async beginFlush( + resourceGroupName: string, + clusterName: string, + databaseName: string, + parameters: FlushParameters, + options?: DatabasesFlushOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, clusterName, databaseName, parameters, options }, + flushOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Flushes all the keys in this database and also from its linked databases. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the RedisEnterprise cluster. + * @param databaseName The name of the database. + * @param parameters Information identifying the databases to be flushed + * @param options The options parameters. + */ + async beginFlushAndWait( + resourceGroupName: string, + clusterName: string, + databaseName: string, + parameters: FlushParameters, + options?: DatabasesFlushOptionalParams + ): Promise { + const poller = await this.beginFlush( + resourceGroupName, + clusterName, + databaseName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** * ListByClusterNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1149,6 +1244,32 @@ const forceUnlinkOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const flushOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/flush", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters8, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.databaseName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listByClusterNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts index cb8946c7cbcc..408ae886b779 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts @@ -12,3 +12,4 @@ export * from "./redisEnterprise"; export * from "./databases"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; +export * from "./skus"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/skus.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/skus.ts new file mode 100644 index 000000000000..4319549326a6 --- /dev/null +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/skus.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { Skus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { RedisEnterpriseManagementClient } from "../redisEnterpriseManagementClient"; +import { + RegionSkuDetail, + SkusListOptionalParams, + SkusListResponse +} from "../models"; + +/// +/** Class containing Skus operations. */ +export class SkusImpl implements Skus { + private readonly client: RedisEnterpriseManagementClient; + + /** + * Initialize a new instance of the class Skus class. + * @param client Reference to the service client + */ + constructor(client: RedisEnterpriseManagementClient) { + this.client = client; + } + + /** + * Gets information about skus in specified location for the given subscription id + * @param location The name of Azure region. + * @param options The options parameters. + */ + public list( + location: string, + options?: SkusListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(location, options, settings); + } + }; + } + + private async *listPagingPage( + location: string, + options?: SkusListOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: SkusListResponse; + result = await this._list(location, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + options?: SkusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + + /** + * Gets information about skus in specified location for the given subscription id + * @param location The name of Azure region. + * @param options The options parameters. + */ + private _list( + location: string, + options?: SkusListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RegionSkuDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.location, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/databases.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/databases.ts index 714e0bdd497b..2c56a8466f8c 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/databases.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/databases.ts @@ -29,7 +29,9 @@ import { ExportClusterParameters, DatabasesExportOptionalParams, ForceUnlinkParameters, - DatabasesForceUnlinkOptionalParams + DatabasesForceUnlinkOptionalParams, + FlushParameters, + DatabasesFlushOptionalParams } from "../models"; /// @@ -293,4 +295,34 @@ export interface Databases { parameters: ForceUnlinkParameters, options?: DatabasesForceUnlinkOptionalParams ): Promise; + /** + * Flushes all the keys in this database and also from its linked databases. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the RedisEnterprise cluster. + * @param databaseName The name of the database. + * @param parameters Information identifying the databases to be flushed + * @param options The options parameters. + */ + beginFlush( + resourceGroupName: string, + clusterName: string, + databaseName: string, + parameters: FlushParameters, + options?: DatabasesFlushOptionalParams + ): Promise, void>>; + /** + * Flushes all the keys in this database and also from its linked databases. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the RedisEnterprise cluster. + * @param databaseName The name of the database. + * @param parameters Information identifying the databases to be flushed + * @param options The options parameters. + */ + beginFlushAndWait( + resourceGroupName: string, + clusterName: string, + databaseName: string, + parameters: FlushParameters, + options?: DatabasesFlushOptionalParams + ): Promise; } diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts index cb8946c7cbcc..408ae886b779 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts @@ -12,3 +12,4 @@ export * from "./redisEnterprise"; export * from "./databases"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; +export * from "./skus"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/skus.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/skus.ts new file mode 100644 index 000000000000..34c27cc834a1 --- /dev/null +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/skus.ts @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { RegionSkuDetail, SkusListOptionalParams } from "../models"; + +/// +/** Interface representing a Skus. */ +export interface Skus { + /** + * Gets information about skus in specified location for the given subscription id + * @param location The name of Azure region. + * @param options The options parameters. + */ + list( + location: string, + options?: SkusListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts index 0aacfd43df1a..11b76ba4c456 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts @@ -20,7 +20,8 @@ import { RedisEnterpriseImpl, DatabasesImpl, PrivateEndpointConnectionsImpl, - PrivateLinkResourcesImpl + PrivateLinkResourcesImpl, + SkusImpl } from "./operations"; import { Operations, @@ -28,7 +29,8 @@ import { RedisEnterprise, Databases, PrivateEndpointConnections, - PrivateLinkResources + PrivateLinkResources, + Skus } from "./operationsInterfaces"; import { RedisEnterpriseManagementClientOptionalParams } from "./models"; @@ -64,7 +66,7 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-redisenterprisecache/2.2.1`; + const packageDetails = `azsdk-js-arm-redisenterprisecache/2.3.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -117,13 +119,14 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-01-01"; + this.apiVersion = options.apiVersion || "2023-03-01-preview"; this.operations = new OperationsImpl(this); this.operationsStatus = new OperationsStatusImpl(this); this.redisEnterprise = new RedisEnterpriseImpl(this); this.databases = new DatabasesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); + this.skus = new SkusImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -161,4 +164,5 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { databases: Databases; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; + skus: Skus; } diff --git a/sdk/redisenterprise/arm-redisenterprisecache/tsconfig.json b/sdk/redisenterprise/arm-redisenterprisecache/tsconfig.json index b929ba4f3f0f..3e6ae96443f3 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/tsconfig.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-redisenterprisecache": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"