diff --git a/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md b/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md index 5a88650e74fa..59a640e504c7 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md @@ -1,15 +1,117 @@ # Release History - -## 3.1.0-beta.2 (Unreleased) - + +## 3.1.0-beta.2 (2024-10-16) +Compared with version 3.0.0 + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group AccessPolicyAssignmentOperations + - Added operation Databases.beginForceLinkToReplicationGroup + - Added operation Databases.beginForceLinkToReplicationGroupAndWait + - Added operation Databases.beginUpgradeDBRedisVersion + - Added operation Databases.beginUpgradeDBRedisVersionAndWait + - Added Interface AccessPolicyAssignment + - Added Interface AccessPolicyAssignmentCreateUpdateOptionalParams + - Added Interface AccessPolicyAssignmentDeleteHeaders + - Added Interface AccessPolicyAssignmentDeleteOptionalParams + - Added Interface AccessPolicyAssignmentGetOptionalParams + - Added Interface AccessPolicyAssignmentList + - Added Interface AccessPolicyAssignmentListNextOptionalParams + - Added Interface AccessPolicyAssignmentListOptionalParams + - Added Interface AccessPolicyAssignmentPropertiesUser + - Added Interface DatabasesDeleteHeaders + - Added Interface DatabasesExportHeaders + - Added Interface DatabasesForceLinkToReplicationGroupHeaders + - Added Interface DatabasesForceLinkToReplicationGroupOptionalParams + - Added Interface DatabasesForceUnlinkHeaders + - Added Interface DatabasesImportHeaders + - Added Interface DatabasesRegenerateKeyHeaders + - Added Interface DatabasesUpdateHeaders + - Added Interface DatabasesUpgradeDBRedisVersionHeaders + - Added Interface DatabasesUpgradeDBRedisVersionOptionalParams + - Added Interface ForceLinkParameters + - Added Interface ProxyResourceAutoGenerated + - Added Interface RedisEnterpriseDeleteHeaders + - Added Interface RedisEnterpriseUpdateHeaders + - Added Interface ResourceAutoGenerated + - Added Interface SystemData + - Added Type Alias AccessKeysAuthentication + - Added Type Alias AccessPolicyAssignmentCreateUpdateResponse + - Added Type Alias AccessPolicyAssignmentDeleteResponse + - Added Type Alias AccessPolicyAssignmentGetResponse + - Added Type Alias AccessPolicyAssignmentListNextResponse + - Added Type Alias AccessPolicyAssignmentListResponse + - Added Type Alias CreatedByType + - Added Type Alias DatabasesForceLinkToReplicationGroupResponse + - Added Type Alias DatabasesUpgradeDBRedisVersionResponse + - Added Type Alias DeferUpgradeSetting + - Added Type Alias HighAvailability + - Added Type Alias RedundancyMode + - Interface Cluster has a new optional parameter highAvailability + - Interface Cluster has a new optional parameter redundancyMode + - Interface ClusterUpdate has a new optional parameter highAvailability + - Interface ClusterUpdate has a new optional parameter redundancyMode + - Interface Database has a new optional parameter accessKeysAuthentication + - Interface Database has a new optional parameter deferUpgrade + - Interface Database has a new optional parameter redisVersion + - Interface DatabaseUpdate has a new optional parameter accessKeysAuthentication + - Interface DatabaseUpdate has a new optional parameter deferUpgrade + - Interface DatabaseUpdate has a new optional parameter redisVersion + - Added Enum KnownAccessKeysAuthentication + - Added Enum KnownCreatedByType + - Added Enum KnownDeferUpgradeSetting + - Added Enum KnownHighAvailability + - Added Enum KnownRedundancyMode + - Enum KnownSkuName has a new value BalancedB0 + - Enum KnownSkuName has a new value BalancedB1 + - Enum KnownSkuName has a new value BalancedB10 + - Enum KnownSkuName has a new value BalancedB100 + - Enum KnownSkuName has a new value BalancedB1000 + - Enum KnownSkuName has a new value BalancedB150 + - Enum KnownSkuName has a new value BalancedB20 + - Enum KnownSkuName has a new value BalancedB250 + - Enum KnownSkuName has a new value BalancedB3 + - Enum KnownSkuName has a new value BalancedB350 + - Enum KnownSkuName has a new value BalancedB5 + - Enum KnownSkuName has a new value BalancedB50 + - Enum KnownSkuName has a new value BalancedB500 + - Enum KnownSkuName has a new value BalancedB700 + - Enum KnownSkuName has a new value ComputeOptimizedX10 + - Enum KnownSkuName has a new value ComputeOptimizedX100 + - Enum KnownSkuName has a new value ComputeOptimizedX150 + - Enum KnownSkuName has a new value ComputeOptimizedX20 + - Enum KnownSkuName has a new value ComputeOptimizedX250 + - Enum KnownSkuName has a new value ComputeOptimizedX3 + - Enum KnownSkuName has a new value ComputeOptimizedX350 + - Enum KnownSkuName has a new value ComputeOptimizedX5 + - Enum KnownSkuName has a new value ComputeOptimizedX50 + - Enum KnownSkuName has a new value ComputeOptimizedX500 + - Enum KnownSkuName has a new value ComputeOptimizedX700 + - Enum KnownSkuName has a new value EnterpriseE1 + - Enum KnownSkuName has a new value EnterpriseE200 + - Enum KnownSkuName has a new value EnterpriseE400 + - Enum KnownSkuName has a new value EnterpriseE5 + - Enum KnownSkuName has a new value FlashOptimizedA1000 + - Enum KnownSkuName has a new value FlashOptimizedA1500 + - Enum KnownSkuName has a new value FlashOptimizedA2000 + - Enum KnownSkuName has a new value FlashOptimizedA250 + - Enum KnownSkuName has a new value FlashOptimizedA4500 + - Enum KnownSkuName has a new value FlashOptimizedA500 + - Enum KnownSkuName has a new value FlashOptimizedA700 + - Enum KnownSkuName has a new value MemoryOptimizedM10 + - Enum KnownSkuName has a new value MemoryOptimizedM100 + - Enum KnownSkuName has a new value MemoryOptimizedM1000 + - Enum KnownSkuName has a new value MemoryOptimizedM150 + - Enum KnownSkuName has a new value MemoryOptimizedM1500 + - Enum KnownSkuName has a new value MemoryOptimizedM20 + - Enum KnownSkuName has a new value MemoryOptimizedM2000 + - Enum KnownSkuName has a new value MemoryOptimizedM250 + - Enum KnownSkuName has a new value MemoryOptimizedM350 + - Enum KnownSkuName has a new value MemoryOptimizedM50 + - Enum KnownSkuName has a new value MemoryOptimizedM500 + - Enum KnownSkuName has a new value MemoryOptimizedM700 + + ## 3.1.0-beta.1 (2024-05-13) Compared with version 3.0.0 diff --git a/sdk/redisenterprise/arm-redisenterprisecache/_meta.json b/sdk/redisenterprise/arm-redisenterprisecache/_meta.json index 00cee8db114e..7299561eef8a 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/_meta.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/_meta.json @@ -1,8 +1,8 @@ { - "commit": "969c68562c5c4850257c9242a7a64b73c15f110d", + "commit": "04c0350ee69b9d7a788af5774c5418afab64a7b1", "readme": "specification/redisenterprise/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --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.21 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --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.27 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.9", - "use": "@autorest/typescript@6.0.21" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.13", + "use": "@autorest/typescript@6.0.27" } \ No newline at end of file diff --git a/sdk/redisenterprise/arm-redisenterprisecache/assets.json b/sdk/redisenterprise/arm-redisenterprisecache/assets.json index 4304c9fb7ed7..df8212f535fd 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/assets.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/redisenterprise/arm-redisenterprisecache", - "Tag": "js/redisenterprise/arm-redisenterprisecache_554ebc6ba6" + "Tag": "js/redisenterprise/arm-redisenterprisecache_2834fb3b19" } diff --git a/sdk/redisenterprise/arm-redisenterprisecache/package.json b/sdk/redisenterprise/arm-redisenterprisecache/package.json index c89a8fd3dcc9..8680b1a87bfd 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/package.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/package.json @@ -116,4 +116,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-redisenterprisecache?view=azure-node-preview" } -} \ 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 b432a525b7c2..86d828a10e74 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/review/arm-redisenterprisecache.api.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/review/arm-redisenterprisecache.api.md @@ -16,9 +16,85 @@ export interface AccessKeys { readonly secondaryKey?: string; } +// @public +export type AccessKeysAuthentication = string; + // @public export type AccessKeyType = "Primary" | "Secondary"; +// @public +export interface AccessPolicyAssignment extends ProxyResourceAutoGenerated { + accessPolicyName?: string; + readonly provisioningState?: ProvisioningState; + user?: AccessPolicyAssignmentPropertiesUser; +} + +// @public +export interface AccessPolicyAssignmentCreateUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AccessPolicyAssignmentCreateUpdateResponse = AccessPolicyAssignment; + +// @public +export interface AccessPolicyAssignmentDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface AccessPolicyAssignmentDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AccessPolicyAssignmentDeleteResponse = AccessPolicyAssignmentDeleteHeaders; + +// @public +export interface AccessPolicyAssignmentGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessPolicyAssignmentGetResponse = AccessPolicyAssignment; + +// @public +export interface AccessPolicyAssignmentList { + readonly nextLink?: string; + value?: AccessPolicyAssignment[]; +} + +// @public +export interface AccessPolicyAssignmentListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessPolicyAssignmentListNextResponse = AccessPolicyAssignmentList; + +// @public +export interface AccessPolicyAssignmentListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessPolicyAssignmentListResponse = AccessPolicyAssignmentList; + +// @public +export interface AccessPolicyAssignmentOperations { + beginCreateUpdate(resourceGroupName: string, clusterName: string, databaseName: string, accessPolicyAssignmentName: string, parameters: AccessPolicyAssignment, options?: AccessPolicyAssignmentCreateUpdateOptionalParams): Promise, AccessPolicyAssignmentCreateUpdateResponse>>; + beginCreateUpdateAndWait(resourceGroupName: string, clusterName: string, databaseName: string, accessPolicyAssignmentName: string, parameters: AccessPolicyAssignment, options?: AccessPolicyAssignmentCreateUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, clusterName: string, databaseName: string, accessPolicyAssignmentName: string, options?: AccessPolicyAssignmentDeleteOptionalParams): Promise, AccessPolicyAssignmentDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, clusterName: string, databaseName: string, accessPolicyAssignmentName: string, options?: AccessPolicyAssignmentDeleteOptionalParams): Promise; + get(resourceGroupName: string, clusterName: string, databaseName: string, accessPolicyAssignmentName: string, options?: AccessPolicyAssignmentGetOptionalParams): Promise; + list(resourceGroupName: string, clusterName: string, databaseName: string, options?: AccessPolicyAssignmentListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AccessPolicyAssignmentPropertiesUser { + objectId?: string; +} + // @public export type ActionType = string; @@ -28,12 +104,14 @@ export type AofFrequency = string; // @public export interface Cluster extends TrackedResource { encryption?: ClusterPropertiesEncryption; + highAvailability?: HighAvailability; readonly hostName?: string; identity?: ManagedServiceIdentity; minimumTlsVersion?: TlsVersion; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; readonly redisVersion?: string; + readonly redundancyMode?: RedundancyMode; readonly resourceState?: ResourceState; sku: Sku; zones?: string[]; @@ -68,12 +146,14 @@ export interface ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdent // @public export interface ClusterUpdate { encryption?: ClusterPropertiesEncryption; + highAvailability?: HighAvailability; readonly hostName?: string; identity?: ManagedServiceIdentity; minimumTlsVersion?: TlsVersion; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; readonly redisVersion?: string; + readonly redundancyMode?: RedundancyMode; readonly resourceState?: ResourceState; sku?: Sku; tags?: { @@ -84,8 +164,12 @@ export interface ClusterUpdate { // @public export type CmkIdentityType = string; +// @public +export type CreatedByType = string; + // @public export interface Database extends ProxyResource { + accessKeysAuthentication?: AccessKeysAuthentication; clientProtocol?: Protocol; clusteringPolicy?: ClusteringPolicy; deferUpgrade?: DeferUpgradeSetting; @@ -147,12 +231,24 @@ export interface DatabasesCreateOptionalParams extends coreClient.OperationOptio // @public export type DatabasesCreateResponse = Database; +// @public +export interface DatabasesDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface DatabasesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface DatabasesExportHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface DatabasesExportOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -186,6 +282,12 @@ export interface DatabasesForceLinkToReplicationGroupOptionalParams extends core // @public export type DatabasesForceLinkToReplicationGroupResponse = DatabasesForceLinkToReplicationGroupHeaders; +// @public +export interface DatabasesForceUnlinkHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface DatabasesForceUnlinkOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -199,6 +301,12 @@ export interface DatabasesGetOptionalParams extends coreClient.OperationOptions // @public export type DatabasesGetResponse = Database; +// @public +export interface DatabasesImportHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface DatabasesImportOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -226,6 +334,12 @@ export interface DatabasesListKeysOptionalParams extends coreClient.OperationOpt // @public export type DatabasesListKeysResponse = AccessKeys; +// @public +export interface DatabasesRegenerateKeyHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface DatabasesRegenerateKeyOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -235,6 +349,12 @@ export interface DatabasesRegenerateKeyOptionalParams extends coreClient.Operati // @public export type DatabasesRegenerateKeyResponse = AccessKeys; +// @public +export interface DatabasesUpdateHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface DatabasesUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -261,6 +381,7 @@ export type DatabasesUpgradeDBRedisVersionResponse = DatabasesUpgradeDBRedisVers // @public export interface DatabaseUpdate { + accessKeysAuthentication?: AccessKeysAuthentication; clientProtocol?: Protocol; clusteringPolicy?: ClusteringPolicy; deferUpgrade?: DeferUpgradeSetting; @@ -324,11 +445,20 @@ export interface ForceUnlinkParameters { // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export type HighAvailability = string; + // @public export interface ImportClusterParameters { sasUris: string[]; } +// @public +export enum KnownAccessKeysAuthentication { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownActionType { Internal = "Internal" @@ -352,6 +482,14 @@ export enum KnownCmkIdentityType { UserAssignedIdentity = "userAssignedIdentity" } +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + // @public export enum KnownDeferUpgradeSetting { Deferred = "Deferred", @@ -370,6 +508,12 @@ export enum KnownEvictionPolicy { VolatileTTL = "VolatileTTL" } +// @public +export enum KnownHighAvailability { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownLinkState { Linked = "Linked", @@ -432,6 +576,13 @@ export enum KnownRdbFrequency { TwelveH = "12h" } +// @public +export enum KnownRedundancyMode { + LR = "LR", + None = "None", + ZR = "ZR" +} + // @public export enum KnownResourceState { CreateFailed = "CreateFailed", @@ -452,14 +603,61 @@ export enum KnownResourceState { // @public export enum KnownSkuName { + BalancedB0 = "Balanced_B0", + BalancedB1 = "Balanced_B1", + BalancedB10 = "Balanced_B10", + BalancedB100 = "Balanced_B100", + BalancedB1000 = "Balanced_B1000", + BalancedB150 = "Balanced_B150", + BalancedB20 = "Balanced_B20", + BalancedB250 = "Balanced_B250", + BalancedB3 = "Balanced_B3", + BalancedB350 = "Balanced_B350", + BalancedB5 = "Balanced_B5", + BalancedB50 = "Balanced_B50", + BalancedB500 = "Balanced_B500", + BalancedB700 = "Balanced_B700", + ComputeOptimizedX10 = "ComputeOptimized_X10", + ComputeOptimizedX100 = "ComputeOptimized_X100", + ComputeOptimizedX150 = "ComputeOptimized_X150", + ComputeOptimizedX20 = "ComputeOptimized_X20", + ComputeOptimizedX250 = "ComputeOptimized_X250", + ComputeOptimizedX3 = "ComputeOptimized_X3", + ComputeOptimizedX350 = "ComputeOptimized_X350", + ComputeOptimizedX5 = "ComputeOptimized_X5", + ComputeOptimizedX50 = "ComputeOptimized_X50", + ComputeOptimizedX500 = "ComputeOptimized_X500", + ComputeOptimizedX700 = "ComputeOptimized_X700", + EnterpriseE1 = "Enterprise_E1", EnterpriseE10 = "Enterprise_E10", EnterpriseE100 = "Enterprise_E100", EnterpriseE20 = "Enterprise_E20", + EnterpriseE200 = "Enterprise_E200", + EnterpriseE400 = "Enterprise_E400", EnterpriseE5 = "Enterprise_E5", EnterpriseE50 = "Enterprise_E50", EnterpriseFlashF1500 = "EnterpriseFlash_F1500", EnterpriseFlashF300 = "EnterpriseFlash_F300", - EnterpriseFlashF700 = "EnterpriseFlash_F700" + EnterpriseFlashF700 = "EnterpriseFlash_F700", + FlashOptimizedA1000 = "FlashOptimized_A1000", + FlashOptimizedA1500 = "FlashOptimized_A1500", + FlashOptimizedA2000 = "FlashOptimized_A2000", + FlashOptimizedA250 = "FlashOptimized_A250", + FlashOptimizedA4500 = "FlashOptimized_A4500", + FlashOptimizedA500 = "FlashOptimized_A500", + FlashOptimizedA700 = "FlashOptimized_A700", + MemoryOptimizedM10 = "MemoryOptimized_M10", + MemoryOptimizedM100 = "MemoryOptimized_M100", + MemoryOptimizedM1000 = "MemoryOptimized_M1000", + MemoryOptimizedM150 = "MemoryOptimized_M150", + MemoryOptimizedM1500 = "MemoryOptimized_M1500", + MemoryOptimizedM20 = "MemoryOptimized_M20", + MemoryOptimizedM2000 = "MemoryOptimized_M2000", + MemoryOptimizedM250 = "MemoryOptimized_M250", + MemoryOptimizedM350 = "MemoryOptimized_M350", + MemoryOptimizedM50 = "MemoryOptimized_M50", + MemoryOptimizedM500 = "MemoryOptimized_M500", + MemoryOptimizedM700 = "MemoryOptimized_M700" } // @public @@ -679,7 +877,11 @@ export type Protocol = string; export type ProvisioningState = string; // @public -export interface ProxyResource extends Resource { +export interface ProxyResource extends ResourceAutoGenerated { +} + +// @public +export interface ProxyResourceAutoGenerated extends Resource { } // @public @@ -707,6 +909,12 @@ export interface RedisEnterpriseCreateOptionalParams extends coreClient.Operatio // @public export type RedisEnterpriseCreateResponse = Cluster; +// @public +export interface RedisEnterpriseDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface RedisEnterpriseDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -754,6 +962,8 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: RedisEnterpriseManagementClientOptionalParams); // (undocumented) + accessPolicyAssignmentOperations: AccessPolicyAssignmentOperations; + // (undocumented) apiVersion: string; // (undocumented) databases: Databases; @@ -778,6 +988,12 @@ export interface RedisEnterpriseManagementClientOptionalParams extends coreClien endpoint?: string; } +// @public +export interface RedisEnterpriseUpdateHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface RedisEnterpriseUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -787,6 +1003,9 @@ export interface RedisEnterpriseUpdateOptionalParams extends coreClient.Operatio // @public export type RedisEnterpriseUpdateResponse = Cluster; +// @public +export type RedundancyMode = string; + // @public export interface RegenerateKeyParameters { keyType: AccessKeyType; @@ -799,6 +1018,14 @@ export interface Resource { readonly type?: string; } +// @public +export interface ResourceAutoGenerated { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + // @public export type ResourceState = string; @@ -811,6 +1038,16 @@ export interface Sku { // @public export type SkuName = string; +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + // @public export type TlsVersion = string; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentCreateUpdateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentCreateUpdateSample.ts new file mode 100644 index 000000000000..1ab80da2101f --- /dev/null +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentCreateUpdateSample.ts @@ -0,0 +1,59 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + AccessPolicyAssignment, + RedisEnterpriseManagementClient, +} from "@azure/arm-redisenterprisecache"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates/Updates a particular access policy assignment for a database + * + * @summary Creates/Updates a particular access policy assignment for a database + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentCreateUpdate.json + */ +async function redisEnterpriseAccessPolicyAssignmentCreateUpdate() { + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; + const resourceGroupName = + process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; + const clusterName = "cache1"; + const databaseName = "default"; + const accessPolicyAssignmentName = "defaultTestEntraApp1"; + const parameters: AccessPolicyAssignment = { + accessPolicyName: "default", + user: { objectId: "6497c918-11ad-41e7-1b0f-7c518a87d0b0" }, + }; + const credential = new DefaultAzureCredential(); + const client = new RedisEnterpriseManagementClient( + credential, + subscriptionId, + ); + const result = + await client.accessPolicyAssignmentOperations.beginCreateUpdateAndWait( + resourceGroupName, + clusterName, + databaseName, + accessPolicyAssignmentName, + parameters, + ); + console.log(result); +} + +async function main() { + redisEnterpriseAccessPolicyAssignmentCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesDeleteSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentDeleteSample.ts similarity index 55% rename from sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesDeleteSample.ts rename to sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentDeleteSample.ts index 20138d453c61..39efb55e6a26 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesDeleteSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentDeleteSample.ts @@ -15,33 +15,37 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Deletes a single database + * This sample demonstrates how to Deletes a single access policy assignment. * - * @summary Deletes a single database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesDelete.json + * @summary Deletes a single access policy assignment. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentDelete.json */ -async function redisEnterpriseDatabasesDelete() { +async function redisEnterpriseAccessPolicyAssignmentDelete() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; - const databaseName = "db1"; + const databaseName = "default"; + const accessPolicyAssignmentName = "defaultTestEntraApp1"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient( credential, - subscriptionId - ); - const result = await client.databases.beginDeleteAndWait( - resourceGroupName, - clusterName, - databaseName + subscriptionId, ); + const result = + await client.accessPolicyAssignmentOperations.beginDeleteAndWait( + resourceGroupName, + clusterName, + databaseName, + accessPolicyAssignmentName, + ); console.log(result); } async function main() { - redisEnterpriseDatabasesDelete(); + redisEnterpriseAccessPolicyAssignmentDelete(); } main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentGetSample.ts similarity index 59% rename from sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesGetSample.ts rename to sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentGetSample.ts index 0f6dbb268d37..4dcd701805f8 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesGetSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentGetSample.ts @@ -15,33 +15,36 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets information about a database in a RedisEnterprise cluster. + * This sample demonstrates how to Gets information about access policy assignment for database. * - * @summary Gets information about a database in a RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesGet.json + * @summary Gets information about access policy assignment for database. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentGet.json */ -async function redisEnterpriseDatabasesGet() { +async function redisEnterpriseAccessPolicyAssignmentGet() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; + const accessPolicyAssignmentName = "accessPolicyAssignmentName1"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient( credential, - subscriptionId + subscriptionId, ); - const result = await client.databases.get( + const result = await client.accessPolicyAssignmentOperations.get( resourceGroupName, clusterName, - databaseName + databaseName, + accessPolicyAssignmentName, ); console.log(result); } async function main() { - redisEnterpriseDatabasesGet(); + redisEnterpriseAccessPolicyAssignmentGet(); } main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateLinkResourcesListByClusterSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentListSample.ts similarity index 63% rename from sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateLinkResourcesListByClusterSample.ts rename to sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentListSample.ts index 4e1bc307f7d1..7af6b8458c1e 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateLinkResourcesListByClusterSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/accessPolicyAssignmentListSample.ts @@ -15,26 +15,29 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets the private link resources that need to be created for a RedisEnterprise cluster. + * This sample demonstrates how to Gets all access policy assignments.. * - * @summary Gets the private link resources that need to be created for a RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListPrivateLinkResources.json + * @summary Gets all access policy assignments.. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentsList.json */ -async function redisEnterpriseListPrivateLinkResources() { +async function redisEnterpriseAccessPolicyAssignmentList() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; + const databaseName = "default"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); - for await (let item of client.privateLinkResources.listByCluster( + for await (let item of client.accessPolicyAssignmentOperations.list( resourceGroupName, - clusterName + clusterName, + databaseName, )) { resArray.push(item); } @@ -42,7 +45,7 @@ async function redisEnterpriseListPrivateLinkResources() { } async function main() { - redisEnterpriseListPrivateLinkResources(); + redisEnterpriseAccessPolicyAssignmentList(); } main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesCreateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesCreateSample.ts index 2aa1d85a5d82..442698cb28dc 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesCreateSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesCreateSample.ts @@ -21,16 +21,18 @@ dotenv.config(); * This sample demonstrates how to Creates a database * * @summary Creates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesCreate.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesCreate.json */ async function redisEnterpriseDatabasesCreate() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters: Database = { + accessKeysAuthentication: "Enabled", clientProtocol: "Encrypted", clusteringPolicy: "EnterpriseCluster", deferUpgrade: "NotDeferred", @@ -61,16 +63,18 @@ async function redisEnterpriseDatabasesCreate() { * This sample demonstrates how to Creates a database * * @summary Creates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json */ async function redisEnterpriseDatabasesCreateWithActiveGeoReplication() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid1"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters: Database = { + accessKeysAuthentication: "Enabled", clientProtocol: "Encrypted", clusteringPolicy: "EnterpriseCluster", evictionPolicy: "NoEviction", @@ -78,10 +82,10 @@ async function redisEnterpriseDatabasesCreateWithActiveGeoReplication() { groupNickname: "groupName", linkedDatabases: [ { - id: "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default", + id: "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default", }, { - id: "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", + id: "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", }, ], }, diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesDeleteSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesDeleteSample.ts index bc04a98ff586..f744de83aaf7 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesDeleteSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesDeleteSample.ts @@ -18,11 +18,12 @@ dotenv.config(); * This sample demonstrates how to Deletes a single database * * @summary Deletes a single database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesDelete.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesDelete.json */ async function redisEnterpriseDatabasesDelete() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesExportSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesExportSample.ts index f10e34a414bf..d9b1e7beea8b 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesExportSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesExportSample.ts @@ -21,11 +21,12 @@ dotenv.config(); * This sample demonstrates how to Exports a database file from target database. * * @summary Exports a database file from target database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesExport.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesExport.json */ async function redisEnterpriseDatabasesExport() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesFlushSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesFlushSample.ts index 1044b7d0d03b..cc1837fe6f58 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesFlushSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesFlushSample.ts @@ -21,18 +21,19 @@ dotenv.config(); * This sample demonstrates how to Flushes all the keys in this database and also from its linked databases. * * @summary Flushes all the keys in this database and also from its linked databases. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesFlush.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesFlush.json */ async function howToFlushAllTheKeysInTheDatabase() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters: FlushParameters = { ids: [ - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", + "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", ], }; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesForceLinkToReplicationGroupSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesForceLinkToReplicationGroupSample.ts index a45f2a9cc13a..5d2f71dddcce 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesForceLinkToReplicationGroupSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesForceLinkToReplicationGroupSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. * * @summary Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesForceLink.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesForceLink.json */ async function howToRelinkADatabaseAfterARegionalOutage() { const subscriptionId = diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesForceUnlinkSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesForceUnlinkSample.ts index cb4f0efb1127..166ac399ce1b 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesForceUnlinkSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesForceUnlinkSample.ts @@ -21,18 +21,19 @@ dotenv.config(); * This sample demonstrates how to Forcibly removes the link to the specified database resource. * * @summary Forcibly removes the link to the specified database resource. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json */ async function howToUnlinkADatabaseDuringARegionalOutage() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters: ForceUnlinkParameters = { ids: [ - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", + "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", ], }; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesGetSample.ts index f7a254b3442e..c50a77ed769b 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesGetSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesGetSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets information about a database in a RedisEnterprise cluster. + * This sample demonstrates how to Gets information about a database in a Redis Enterprise cluster. * - * @summary Gets information about a database in a RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesGet.json + * @summary Gets information about a database in a Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesGet.json */ async function redisEnterpriseDatabasesGet() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesImportSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesImportSample.ts index fc735526f68c..7dc75a8c93c9 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesImportSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesImportSample.ts @@ -21,11 +21,12 @@ dotenv.config(); * This sample demonstrates how to Imports database files to target database. * * @summary Imports database files to target database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesImport.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesImport.json */ async function redisEnterpriseDatabasesImport() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesListByClusterSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesListByClusterSample.ts index 29e1c8623369..6b037c645fb0 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesListByClusterSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesListByClusterSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets all databases in the specified RedisEnterprise cluster. + * This sample demonstrates how to Gets all databases in the specified Redis Enterprise cluster. * - * @summary Gets all databases in the specified RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json + * @summary Gets all databases in the specified Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json */ async function redisEnterpriseDatabasesListByCluster() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesListKeysSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesListKeysSample.ts index 27e11aae68f5..be155ab25b77 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesListKeysSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesListKeysSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Retrieves the access keys for the RedisEnterprise database. + * This sample demonstrates how to Retrieves the access keys for the Redis Enterprise database. * - * @summary Retrieves the access keys for the RedisEnterprise database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesListKeys.json + * @summary Retrieves the access keys for the Redis Enterprise database. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesListKeys.json */ async function redisEnterpriseDatabasesListKeys() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesRegenerateKeySample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesRegenerateKeySample.ts index 634b4e801674..7a0818205e80 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesRegenerateKeySample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesRegenerateKeySample.ts @@ -18,14 +18,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Regenerates the RedisEnterprise database's access keys. + * This sample demonstrates how to Regenerates the Redis Enterprise database's access keys. * - * @summary Regenerates the RedisEnterprise database's access keys. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json + * @summary Regenerates the Redis Enterprise database's access keys. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json */ async function redisEnterpriseDatabasesRegenerateKey() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesUpdateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesUpdateSample.ts index 46a4b7863054..0201de74e9d6 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesUpdateSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesUpdateSample.ts @@ -21,16 +21,18 @@ dotenv.config(); * This sample demonstrates how to Updates a database * * @summary Updates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesUpdate.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesUpdate.json */ async function redisEnterpriseDatabasesUpdate() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters: DatabaseUpdate = { + accessKeysAuthentication: "Enabled", clientProtocol: "Encrypted", evictionPolicy: "AllKeysLRU", persistence: { rdbEnabled: true, rdbFrequency: "12h" }, diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesUpgradeDbRedisVersionSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesUpgradeDbRedisVersionSample.ts index 2c866f4c1cfe..d350a70a834d 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesUpgradeDbRedisVersionSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/databasesUpgradeDbRedisVersionSample.ts @@ -18,11 +18,12 @@ dotenv.config(); * This sample demonstrates how to Upgrades the database Redis version to the latest available. * * @summary Upgrades the database Redis version to the latest available. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json */ async function howToUpgradeYourDatabaseRedisVersion() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/operationsListSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/operationsListSample.ts index e446950ba861..d128ae942dfb 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/operationsListSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.Cache provider. * * @summary Lists all of the available REST API operations of the Microsoft.Cache provider. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/OperationsList.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/OperationsList.json */ async function operationsList() { const subscriptionId = diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/operationsStatusGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/operationsStatusGetSample.ts index 35fc2b60689e..4de6fe485738 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/operationsStatusGetSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/operationsStatusGetSample.ts @@ -18,11 +18,12 @@ dotenv.config(); * This sample demonstrates how to Gets the status of operation. * * @summary Gets the status of operation. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/OperationsStatusGet.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/OperationsStatusGet.json */ async function operationsStatusGet() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const location = "West US"; const operationId = "testoperationid"; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsDeleteSample.ts index 983da09c1055..32ac0a146951 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. + * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. * - * @summary Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json + * @summary Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json */ async function redisEnterpriseDeletePrivateEndpointConnection() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsGetSample.ts index 7072c865209b..855ca9f94a12 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsGetSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets the specified private endpoint connection associated with the RedisEnterprise cluster. + * This sample demonstrates how to Gets the specified private endpoint connection associated with the Redis Enterprise cluster. * - * @summary Gets the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json + * @summary Gets the specified private endpoint connection associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json */ async function redisEnterpriseGetPrivateEndpointConnection() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsListSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsListSample.ts index 384fc76d795c..a86504a67078 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsListSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsListSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Lists all the private endpoint connections associated with the RedisEnterprise cluster. + * This sample demonstrates how to Lists all the private endpoint connections associated with the Redis Enterprise cluster. * - * @summary Lists all the private endpoint connections associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json + * @summary Lists all the private endpoint connections associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json */ async function redisEnterpriseListPrivateEndpointConnections() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsPutSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsPutSample.ts index a936f422ec4f..0397101552b7 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsPutSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateEndpointConnectionsPutSample.ts @@ -18,14 +18,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. + * This sample demonstrates how to Updates the state of the specified private endpoint connection associated with the Redis Enterprise cluster. * - * @summary Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json + * @summary Updates the state of the specified private endpoint connection associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json */ async function redisEnterprisePutPrivateEndpointConnection() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateLinkResourcesListByClusterSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateLinkResourcesListByClusterSample.ts index bd084a9c30f7..0e9981956e72 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateLinkResourcesListByClusterSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/privateLinkResourcesListByClusterSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets the private link resources that need to be created for a RedisEnterprise cluster. + * This sample demonstrates how to Gets the private link resources that need to be created for a Redis Enterprise cluster. * - * @summary Gets the private link resources that need to be created for a RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json + * @summary Gets the private link resources that need to be created for a Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json */ async function redisEnterpriseListPrivateLinkResources() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseCreateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseCreateSample.ts index 8430f214a1b7..f8328a850795 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseCreateSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseCreateSample.ts @@ -21,11 +21,12 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster * * @summary Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseCreate.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseCreate.json */ async function redisEnterpriseCreate() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseDeleteSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseDeleteSample.ts index bbcb720a9622..dd7e1ba7b845 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseDeleteSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseDeleteSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Deletes a RedisEnterprise cache cluster. + * This sample demonstrates how to Deletes a Redis Enterprise cache cluster. * - * @summary Deletes a RedisEnterprise cache cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDelete.json + * @summary Deletes a Redis Enterprise cache cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDelete.json */ async function redisEnterpriseDelete() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseGetSample.ts index 4d9e77150dad..ef821bf9b74d 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseGetSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseGetSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets information about a RedisEnterprise cluster + * This sample demonstrates how to Gets information about a Redis Enterprise cluster * - * @summary Gets information about a RedisEnterprise cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseGet.json + * @summary Gets information about a Redis Enterprise cluster + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseGet.json */ async function redisEnterpriseGet() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseListByResourceGroupSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseListByResourceGroupSample.ts index 9b05aba9df7e..c1cd8d881faf 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseListByResourceGroupSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseListByResourceGroupSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Lists all RedisEnterprise clusters in a resource group. + * This sample demonstrates how to Lists all Redis Enterprise clusters in a resource group. * - * @summary Lists all RedisEnterprise clusters in a resource group. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListByResourceGroup.json + * @summary Lists all Redis Enterprise clusters in a resource group. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListByResourceGroup.json */ async function redisEnterpriseListByResourceGroup() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseListSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseListSample.ts index 121fab4d5c9b..37714435e066 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseListSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseListSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets all RedisEnterprise clusters in the specified subscription. + * This sample demonstrates how to Lists all Redis Enterprise clusters in the specified subscription. * - * @summary Gets all RedisEnterprise clusters in the specified subscription. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseList.json + * @summary Lists all Redis Enterprise clusters in the specified subscription. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseList.json */ async function redisEnterpriseList() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient( credential, diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseUpdateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseUpdateSample.ts index 055f7d1caa1f..fd4c3c3e9ceb 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseUpdateSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples-dev/redisEnterpriseUpdateSample.ts @@ -18,14 +18,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Updates an existing RedisEnterprise cluster + * This sample demonstrates how to Updates an existing Redis Enterprise cluster * - * @summary Updates an existing RedisEnterprise cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseUpdate.json + * @summary Updates an existing Redis Enterprise cluster + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseUpdate.json */ async function redisEnterpriseUpdate() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/README.md b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/README.md index 5f4e928e1e7d..e21d9274c255 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/README.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/README.md @@ -4,32 +4,36 @@ These sample programs show how to use the JavaScript client libraries for in som | **File Name** | **Description** | | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [databasesCreateSample.js][databasescreatesample] | Creates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesCreate.json | -| [databasesDeleteSample.js][databasesdeletesample] | Deletes a single database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesDelete.json | -| [databasesExportSample.js][databasesexportsample] | Exports a database file from target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesExport.json | -| [databasesFlushSample.js][databasesflushsample] | Flushes all the keys in this database and also from its linked databases. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesFlush.json | -| [databasesForceLinkToReplicationGroupSample.js][databasesforcelinktoreplicationgroupsample] | Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesForceLink.json | -| [databasesForceUnlinkSample.js][databasesforceunlinksample] | Forcibly removes the link to the specified database resource. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json | -| [databasesGetSample.js][databasesgetsample] | Gets information about a database in a RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesGet.json | -| [databasesImportSample.js][databasesimportsample] | Imports database files to target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesImport.json | -| [databasesListByClusterSample.js][databaseslistbyclustersample] | Gets all databases in the specified RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json | -| [databasesListKeysSample.js][databaseslistkeyssample] | Retrieves the access keys for the RedisEnterprise database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesListKeys.json | -| [databasesRegenerateKeySample.js][databasesregeneratekeysample] | Regenerates the RedisEnterprise database's access keys. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json | -| [databasesUpdateSample.js][databasesupdatesample] | Updates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesUpdate.json | -| [databasesUpgradeDbRedisVersionSample.js][databasesupgradedbredisversionsample] | Upgrades the database Redis version to the latest available. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available REST API operations of the Microsoft.Cache provider. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/OperationsList.json | -| [operationsStatusGetSample.js][operationsstatusgetsample] | Gets the status of operation. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/OperationsStatusGet.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json | -| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | Lists all the private endpoint connections associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json | -| [privateEndpointConnectionsPutSample.js][privateendpointconnectionsputsample] | Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json | -| [privateLinkResourcesListByClusterSample.js][privatelinkresourceslistbyclustersample] | Gets the private link resources that need to be created for a RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json | -| [redisEnterpriseCreateSample.js][redisenterprisecreatesample] | Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseCreate.json | -| [redisEnterpriseDeleteSample.js][redisenterprisedeletesample] | Deletes a RedisEnterprise cache cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDelete.json | -| [redisEnterpriseGetSample.js][redisenterprisegetsample] | Gets information about a RedisEnterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseGet.json | -| [redisEnterpriseListByResourceGroupSample.js][redisenterpriselistbyresourcegroupsample] | Lists all RedisEnterprise clusters in a resource group. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListByResourceGroup.json | -| [redisEnterpriseListSample.js][redisenterpriselistsample] | Gets all RedisEnterprise clusters in the specified subscription. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseList.json | -| [redisEnterpriseUpdateSample.js][redisenterpriseupdatesample] | Updates an existing RedisEnterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseUpdate.json | +| [accessPolicyAssignmentCreateUpdateSample.js][accesspolicyassignmentcreateupdatesample] | Creates/Updates a particular access policy assignment for a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentCreateUpdate.json | +| [accessPolicyAssignmentDeleteSample.js][accesspolicyassignmentdeletesample] | Deletes a single access policy assignment. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentDelete.json | +| [accessPolicyAssignmentGetSample.js][accesspolicyassignmentgetsample] | Gets information about access policy assignment for database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentGet.json | +| [accessPolicyAssignmentListSample.js][accesspolicyassignmentlistsample] | Gets all access policy assignments.. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentsList.json | +| [databasesCreateSample.js][databasescreatesample] | Creates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesCreate.json | +| [databasesDeleteSample.js][databasesdeletesample] | Deletes a single database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesDelete.json | +| [databasesExportSample.js][databasesexportsample] | Exports a database file from target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesExport.json | +| [databasesFlushSample.js][databasesflushsample] | Flushes all the keys in this database and also from its linked databases. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesFlush.json | +| [databasesForceLinkToReplicationGroupSample.js][databasesforcelinktoreplicationgroupsample] | Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesForceLink.json | +| [databasesForceUnlinkSample.js][databasesforceunlinksample] | Forcibly removes the link to the specified database resource. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json | +| [databasesGetSample.js][databasesgetsample] | Gets information about a database in a Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesGet.json | +| [databasesImportSample.js][databasesimportsample] | Imports database files to target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesImport.json | +| [databasesListByClusterSample.js][databaseslistbyclustersample] | Gets all databases in the specified Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json | +| [databasesListKeysSample.js][databaseslistkeyssample] | Retrieves the access keys for the Redis Enterprise database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesListKeys.json | +| [databasesRegenerateKeySample.js][databasesregeneratekeysample] | Regenerates the Redis Enterprise database's access keys. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json | +| [databasesUpdateSample.js][databasesupdatesample] | Updates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesUpdate.json | +| [databasesUpgradeDbRedisVersionSample.js][databasesupgradedbredisversionsample] | Upgrades the database Redis version to the latest available. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json | +| [operationsListSample.js][operationslistsample] | Lists all of the available REST API operations of the Microsoft.Cache provider. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/OperationsList.json | +| [operationsStatusGetSample.js][operationsstatusgetsample] | Gets the status of operation. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/OperationsStatusGet.json | +| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json | +| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json | +| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | Lists all the private endpoint connections associated with the Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json | +| [privateEndpointConnectionsPutSample.js][privateendpointconnectionsputsample] | Updates the state of the specified private endpoint connection associated with the Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json | +| [privateLinkResourcesListByClusterSample.js][privatelinkresourceslistbyclustersample] | Gets the private link resources that need to be created for a Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json | +| [redisEnterpriseCreateSample.js][redisenterprisecreatesample] | Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseCreate.json | +| [redisEnterpriseDeleteSample.js][redisenterprisedeletesample] | Deletes a Redis Enterprise cache cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDelete.json | +| [redisEnterpriseGetSample.js][redisenterprisegetsample] | Gets information about a Redis Enterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseGet.json | +| [redisEnterpriseListByResourceGroupSample.js][redisenterpriselistbyresourcegroupsample] | Lists all Redis Enterprise clusters in a resource group. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListByResourceGroup.json | +| [redisEnterpriseListSample.js][redisenterpriselistsample] | Lists all Redis Enterprise clusters in the specified subscription. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseList.json | +| [redisEnterpriseUpdateSample.js][redisenterpriseupdatesample] | Updates an existing Redis Enterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseUpdate.json | ## Prerequisites @@ -56,19 +60,23 @@ npm install 3. Run whichever samples you like (note that some samples may require additional setup, see the table above): ```bash -node databasesCreateSample.js +node accessPolicyAssignmentCreateUpdateSample.js ``` Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -npx cross-env REDISENTERPRISE_SUBSCRIPTION_ID="" REDISENTERPRISE_RESOURCE_GROUP="" node databasesCreateSample.js +npx cross-env REDISENTERPRISE_SUBSCRIPTION_ID="" REDISENTERPRISE_RESOURCE_GROUP="" node accessPolicyAssignmentCreateUpdateSample.js ``` ## Next Steps Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. +[accesspolicyassignmentcreateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentCreateUpdateSample.js +[accesspolicyassignmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentDeleteSample.js +[accesspolicyassignmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentGetSample.js +[accesspolicyassignmentlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentListSample.js [databasescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesCreateSample.js [databasesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesDeleteSample.js [databasesexportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesExportSample.js diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesFlushSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentCreateUpdateSample.js similarity index 55% rename from sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesFlushSample.js rename to sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentCreateUpdateSample.js index 0d75c8222a8f..811bd0eb8dd1 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesFlushSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentCreateUpdateSample.js @@ -13,34 +13,36 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Flushes all the keys in this database and also from its linked databases. + * This sample demonstrates how to Creates/Updates a particular access policy assignment for a database * - * @summary Flushes all the keys in this database and also from its linked databases. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesFlush.json + * @summary Creates/Updates a particular access policy assignment for a database + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentCreateUpdate.json */ -async function howToFlushAllTheKeysInTheDatabase() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; +async function redisEnterpriseAccessPolicyAssignmentCreateUpdate() { + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; + const accessPolicyAssignmentName = "defaultTestEntraApp1"; const parameters = { - ids: [ - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", - ], + accessPolicyName: "default", + user: { objectId: "6497c918-11ad-41e7-1b0f-7c518a87d0b0" }, }; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.beginFlushAndWait( + const result = await client.accessPolicyAssignmentOperations.beginCreateUpdateAndWait( resourceGroupName, clusterName, databaseName, + accessPolicyAssignmentName, parameters, ); console.log(result); } async function main() { - howToFlushAllTheKeysInTheDatabase(); + redisEnterpriseAccessPolicyAssignmentCreateUpdate(); } main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesUpdateSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentDeleteSample.js similarity index 60% rename from sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesUpdateSample.js rename to sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentDeleteSample.js index 846c8b9710d6..762cae54e243 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesUpdateSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentDeleteSample.js @@ -13,34 +13,31 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Updates a database + * This sample demonstrates how to Deletes a single access policy assignment. * - * @summary Updates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesUpdate.json + * @summary Deletes a single access policy assignment. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentDelete.json */ -async function redisEnterpriseDatabasesUpdate() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; +async function redisEnterpriseAccessPolicyAssignmentDelete() { + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; - const parameters = { - clientProtocol: "Encrypted", - evictionPolicy: "AllKeysLRU", - persistence: { rdbEnabled: true, rdbFrequency: "12h" }, - }; + const accessPolicyAssignmentName = "defaultTestEntraApp1"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.beginUpdateAndWait( + const result = await client.accessPolicyAssignmentOperations.beginDeleteAndWait( resourceGroupName, clusterName, databaseName, - parameters, + accessPolicyAssignmentName, ); console.log(result); } async function main() { - redisEnterpriseDatabasesUpdate(); + redisEnterpriseAccessPolicyAssignmentDelete(); } main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesRegenerateKeySample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentGetSample.js similarity index 59% rename from sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesRegenerateKeySample.js rename to sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentGetSample.js index 159cec317f3c..d5dadf9f4388 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesRegenerateKeySample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentGetSample.js @@ -13,30 +13,31 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Regenerates the RedisEnterprise database's access keys. + * This sample demonstrates how to Gets information about access policy assignment for database. * - * @summary Regenerates the RedisEnterprise database's access keys. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesRegenerateKey.json + * @summary Gets information about access policy assignment for database. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentGet.json */ -async function redisEnterpriseDatabasesRegenerateKey() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; +async function redisEnterpriseAccessPolicyAssignmentGet() { + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; - const parameters = { keyType: "Primary" }; + const accessPolicyAssignmentName = "accessPolicyAssignmentName1"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.beginRegenerateKeyAndWait( + const result = await client.accessPolicyAssignmentOperations.get( resourceGroupName, clusterName, databaseName, - parameters, + accessPolicyAssignmentName, ); console.log(result); } async function main() { - redisEnterpriseDatabasesRegenerateKey(); + redisEnterpriseAccessPolicyAssignmentGet(); } main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateLinkResourcesListByClusterSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentListSample.js similarity index 63% rename from sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateLinkResourcesListByClusterSample.js rename to sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentListSample.js index 6d9d9db91258..5e237ce4df53 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateLinkResourcesListByClusterSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/accessPolicyAssignmentListSample.js @@ -13,21 +13,24 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Gets the private link resources that need to be created for a RedisEnterprise cluster. + * This sample demonstrates how to Gets all access policy assignments.. * - * @summary Gets the private link resources that need to be created for a RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListPrivateLinkResources.json + * @summary Gets all access policy assignments.. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentsList.json */ -async function redisEnterpriseListPrivateLinkResources() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; +async function redisEnterpriseAccessPolicyAssignmentList() { + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; + const databaseName = "default"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.privateLinkResources.listByCluster( + for await (let item of client.accessPolicyAssignmentOperations.list( resourceGroupName, clusterName, + databaseName, )) { resArray.push(item); } @@ -35,7 +38,7 @@ async function redisEnterpriseListPrivateLinkResources() { } async function main() { - redisEnterpriseListPrivateLinkResources(); + redisEnterpriseAccessPolicyAssignmentList(); } main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesCreateSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesCreateSample.js index 192ff259f7d4..ab9faac13e9b 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesCreateSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesCreateSample.js @@ -16,14 +16,16 @@ require("dotenv").config(); * This sample demonstrates how to Creates a database * * @summary Creates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesCreate.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesCreate.json */ async function redisEnterpriseDatabasesCreate() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters = { + accessKeysAuthentication: "Enabled", clientProtocol: "Encrypted", clusteringPolicy: "EnterpriseCluster", deferUpgrade: "NotDeferred", @@ -51,14 +53,16 @@ async function redisEnterpriseDatabasesCreate() { * This sample demonstrates how to Creates a database * * @summary Creates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json */ async function redisEnterpriseDatabasesCreateWithActiveGeoReplication() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid1"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters = { + accessKeysAuthentication: "Enabled", clientProtocol: "Encrypted", clusteringPolicy: "EnterpriseCluster", evictionPolicy: "NoEviction", @@ -66,10 +70,10 @@ async function redisEnterpriseDatabasesCreateWithActiveGeoReplication() { groupNickname: "groupName", linkedDatabases: [ { - id: "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default", + id: "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default", }, { - id: "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", + id: "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", }, ], }, diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesDeleteSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesDeleteSample.js index 850269609f41..1fdb5ba9a562 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesDeleteSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesDeleteSample.js @@ -16,10 +16,11 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a single database * * @summary Deletes a single database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesDelete.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesDelete.json */ async function redisEnterpriseDatabasesDelete() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "db1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesExportSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesExportSample.js index dae1bd105931..e78f8ad22f18 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesExportSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesExportSample.js @@ -16,10 +16,11 @@ require("dotenv").config(); * This sample demonstrates how to Exports a database file from target database. * * @summary Exports a database file from target database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesExport.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesExport.json */ async function redisEnterpriseDatabasesExport() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesFlushSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesFlushSample.js index 794114065838..e0c3414a7317 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesFlushSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesFlushSample.js @@ -16,16 +16,17 @@ require("dotenv").config(); * This sample demonstrates how to Flushes all the keys in this database and also from its linked databases. * * @summary Flushes all the keys in this database and also from its linked databases. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesFlush.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesFlush.json */ async function howToFlushAllTheKeysInTheDatabase() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters = { ids: [ - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", + "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", ], }; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesForceLinkToReplicationGroupSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesForceLinkToReplicationGroupSample.js index a313574c421b..b56e6f1ea7f5 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesForceLinkToReplicationGroupSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesForceLinkToReplicationGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. * * @summary Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesForceLink.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesForceLink.json */ async function howToRelinkADatabaseAfterARegionalOutage() { const subscriptionId = diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesForceUnlinkSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesForceUnlinkSample.js index 7d6029b243f5..ec02ea04ac3c 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesForceUnlinkSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesForceUnlinkSample.js @@ -16,16 +16,17 @@ require("dotenv").config(); * This sample demonstrates how to Forcibly removes the link to the specified database resource. * * @summary Forcibly removes the link to the specified database resource. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json */ async function howToUnlinkADatabaseDuringARegionalOutage() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters = { ids: [ - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", + "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", ], }; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesGetSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesGetSample.js index 6be4e9e01547..e75c5131d084 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesGetSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesGetSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Gets information about a database in a RedisEnterprise cluster. + * This sample demonstrates how to Gets information about a database in a Redis Enterprise cluster. * - * @summary Gets information about a database in a RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesGet.json + * @summary Gets information about a database in a Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesGet.json */ async function redisEnterpriseDatabasesGet() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesImportSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesImportSample.js index 37d62b27d277..f6919e4f0293 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesImportSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesImportSample.js @@ -16,10 +16,11 @@ require("dotenv").config(); * This sample demonstrates how to Imports database files to target database. * * @summary Imports database files to target database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesImport.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesImport.json */ async function redisEnterpriseDatabasesImport() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesListByClusterSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesListByClusterSample.js index d7fb286cc2c0..11ad9656462d 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesListByClusterSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesListByClusterSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Gets all databases in the specified RedisEnterprise cluster. + * This sample demonstrates how to Gets all databases in the specified Redis Enterprise cluster. * - * @summary Gets all databases in the specified RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json + * @summary Gets all databases in the specified Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json */ async function redisEnterpriseDatabasesListByCluster() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesListKeysSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesListKeysSample.js index 6226f6e32e97..fdaef55ce931 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesListKeysSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesListKeysSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Retrieves the access keys for the RedisEnterprise database. + * This sample demonstrates how to Retrieves the access keys for the Redis Enterprise database. * - * @summary Retrieves the access keys for the RedisEnterprise database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesListKeys.json + * @summary Retrieves the access keys for the Redis Enterprise database. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesListKeys.json */ async function redisEnterpriseDatabasesListKeys() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesRegenerateKeySample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesRegenerateKeySample.js index 7ccca036cf47..be0f2d8f4b6a 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesRegenerateKeySample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesRegenerateKeySample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Regenerates the RedisEnterprise database's access keys. + * This sample demonstrates how to Regenerates the Redis Enterprise database's access keys. * - * @summary Regenerates the RedisEnterprise database's access keys. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json + * @summary Regenerates the Redis Enterprise database's access keys. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json */ async function redisEnterpriseDatabasesRegenerateKey() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesUpdateSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesUpdateSample.js index 3e37e0422d1d..c6fa6dd930c3 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesUpdateSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesUpdateSample.js @@ -16,14 +16,16 @@ require("dotenv").config(); * This sample demonstrates how to Updates a database * * @summary Updates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesUpdate.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesUpdate.json */ async function redisEnterpriseDatabasesUpdate() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters = { + accessKeysAuthentication: "Enabled", clientProtocol: "Encrypted", evictionPolicy: "AllKeysLRU", persistence: { rdbEnabled: true, rdbFrequency: "12h" }, diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesUpgradeDbRedisVersionSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesUpgradeDbRedisVersionSample.js index 68419a01e67c..bfbd75a5ebe7 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesUpgradeDbRedisVersionSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/databasesUpgradeDbRedisVersionSample.js @@ -16,10 +16,11 @@ require("dotenv").config(); * This sample demonstrates how to Upgrades the database Redis version to the latest available. * * @summary Upgrades the database Redis version to the latest available. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json */ async function howToUpgradeYourDatabaseRedisVersion() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/operationsListSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/operationsListSample.js index 030a8584ee99..44f07e024f4f 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/operationsListSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/operationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.Cache provider. * * @summary Lists all of the available REST API operations of the Microsoft.Cache provider. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/OperationsList.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/OperationsList.json */ async function operationsList() { const subscriptionId = diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/operationsStatusGetSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/operationsStatusGetSample.js index c7a94bb63205..8bd25bbfacdb 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/operationsStatusGetSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/operationsStatusGetSample.js @@ -16,10 +16,11 @@ require("dotenv").config(); * This sample demonstrates how to Gets the status of operation. * * @summary Gets the status of operation. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/OperationsStatusGet.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/OperationsStatusGet.json */ async function operationsStatusGet() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const location = "West US"; const operationId = "testoperationid"; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/package.json b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/package.json index 196598937e4f..fb5d0918498a 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/package.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/package.json @@ -27,6 +27,6 @@ "dependencies": { "@azure/arm-redisenterprisecache": "next", "dotenv": "latest", - "@azure/identity": "^4.0.1" + "@azure/identity": "^4.2.1" } } diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsDeleteSample.js index 6b55c6726676..d29afba855df 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsDeleteSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsDeleteSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. + * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. * - * @summary Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json + * @summary Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json */ async function redisEnterpriseDeletePrivateEndpointConnection() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const privateEndpointConnectionName = "pectest01"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsGetSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsGetSample.js index 0c968f829234..2a976a33e045 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsGetSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsGetSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Gets the specified private endpoint connection associated with the RedisEnterprise cluster. + * This sample demonstrates how to Gets the specified private endpoint connection associated with the Redis Enterprise cluster. * - * @summary Gets the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json + * @summary Gets the specified private endpoint connection associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json */ async function redisEnterpriseGetPrivateEndpointConnection() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const privateEndpointConnectionName = "pectest01"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsListSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsListSample.js index 4b71cf43f4d3..3e586df857d9 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsListSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsListSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Lists all the private endpoint connections associated with the RedisEnterprise cluster. + * This sample demonstrates how to Lists all the private endpoint connections associated with the Redis Enterprise cluster. * - * @summary Lists all the private endpoint connections associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json + * @summary Lists all the private endpoint connections associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json */ async function redisEnterpriseListPrivateEndpointConnections() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsPutSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsPutSample.js index 2cb5d920f2c5..d51d4c984ddb 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsPutSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateEndpointConnectionsPutSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. + * This sample demonstrates how to Updates the state of the specified private endpoint connection associated with the Redis Enterprise cluster. * - * @summary Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json + * @summary Updates the state of the specified private endpoint connection associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json */ async function redisEnterprisePutPrivateEndpointConnection() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const privateEndpointConnectionName = "pectest01"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateLinkResourcesListByClusterSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateLinkResourcesListByClusterSample.js index db8d4d1813b0..d6a8e003123e 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateLinkResourcesListByClusterSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/privateLinkResourcesListByClusterSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Gets the private link resources that need to be created for a RedisEnterprise cluster. + * This sample demonstrates how to Gets the private link resources that need to be created for a Redis Enterprise cluster. * - * @summary Gets the private link resources that need to be created for a RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json + * @summary Gets the private link resources that need to be created for a Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json */ async function redisEnterpriseListPrivateLinkResources() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseCreateSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseCreateSample.js index 579cdd4b9ce4..06709d1a683f 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseCreateSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseCreateSample.js @@ -16,10 +16,11 @@ require("dotenv").config(); * This sample demonstrates how to Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster * * @summary Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseCreate.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseCreate.json */ async function redisEnterpriseCreate() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const parameters = { diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseDeleteSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseDeleteSample.js index 2eb9cd2a1de5..42c21164b32d 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseDeleteSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseDeleteSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Deletes a RedisEnterprise cache cluster. + * This sample demonstrates how to Deletes a Redis Enterprise cache cluster. * - * @summary Deletes a RedisEnterprise cache cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDelete.json + * @summary Deletes a Redis Enterprise cache cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDelete.json */ async function redisEnterpriseDelete() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseGetSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseGetSample.js index 7da8c8e17eee..937d31b8c3e8 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseGetSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseGetSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Gets information about a RedisEnterprise cluster + * This sample demonstrates how to Gets information about a Redis Enterprise cluster * - * @summary Gets information about a RedisEnterprise cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseGet.json + * @summary Gets information about a Redis Enterprise cluster + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseGet.json */ async function redisEnterpriseGet() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseListByResourceGroupSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseListByResourceGroupSample.js index 27b2277fe349..7d218b724197 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseListByResourceGroupSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseListByResourceGroupSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Lists all RedisEnterprise clusters in a resource group. + * This sample demonstrates how to Lists all Redis Enterprise clusters in a resource group. * - * @summary Lists all RedisEnterprise clusters in a resource group. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListByResourceGroup.json + * @summary Lists all Redis Enterprise clusters in a resource group. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListByResourceGroup.json */ async function redisEnterpriseListByResourceGroup() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient(credential, subscriptionId); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseListSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseListSample.js index 90d8630e42e7..472b40a08866 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseListSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseListSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Gets all RedisEnterprise clusters in the specified subscription. + * This sample demonstrates how to Lists all Redis Enterprise clusters in the specified subscription. * - * @summary Gets all RedisEnterprise clusters in the specified subscription. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseList.json + * @summary Lists all Redis Enterprise clusters in the specified subscription. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseList.json */ async function redisEnterpriseList() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseUpdateSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseUpdateSample.js index 2947def43963..662b0476f688 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseUpdateSample.js +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/javascript/redisEnterpriseUpdateSample.js @@ -13,13 +13,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Updates an existing RedisEnterprise cluster + * This sample demonstrates how to Updates an existing Redis Enterprise cluster * - * @summary Updates an existing RedisEnterprise cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseUpdate.json + * @summary Updates an existing Redis Enterprise cluster + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseUpdate.json */ async function redisEnterpriseUpdate() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const parameters = { diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/README.md b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/README.md index 9af18d057248..b496fd0dbca5 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/README.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/README.md @@ -4,32 +4,36 @@ These sample programs show how to use the TypeScript client libraries for in som | **File Name** | **Description** | | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [databasesCreateSample.ts][databasescreatesample] | Creates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesCreate.json | -| [databasesDeleteSample.ts][databasesdeletesample] | Deletes a single database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesDelete.json | -| [databasesExportSample.ts][databasesexportsample] | Exports a database file from target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesExport.json | -| [databasesFlushSample.ts][databasesflushsample] | Flushes all the keys in this database and also from its linked databases. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesFlush.json | -| [databasesForceLinkToReplicationGroupSample.ts][databasesforcelinktoreplicationgroupsample] | Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesForceLink.json | -| [databasesForceUnlinkSample.ts][databasesforceunlinksample] | Forcibly removes the link to the specified database resource. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json | -| [databasesGetSample.ts][databasesgetsample] | Gets information about a database in a RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesGet.json | -| [databasesImportSample.ts][databasesimportsample] | Imports database files to target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesImport.json | -| [databasesListByClusterSample.ts][databaseslistbyclustersample] | Gets all databases in the specified RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json | -| [databasesListKeysSample.ts][databaseslistkeyssample] | Retrieves the access keys for the RedisEnterprise database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesListKeys.json | -| [databasesRegenerateKeySample.ts][databasesregeneratekeysample] | Regenerates the RedisEnterprise database's access keys. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json | -| [databasesUpdateSample.ts][databasesupdatesample] | Updates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesUpdate.json | -| [databasesUpgradeDbRedisVersionSample.ts][databasesupgradedbredisversionsample] | Upgrades the database Redis version to the latest available. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available REST API operations of the Microsoft.Cache provider. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/OperationsList.json | -| [operationsStatusGetSample.ts][operationsstatusgetsample] | Gets the status of operation. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/OperationsStatusGet.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json | -| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | Lists all the private endpoint connections associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json | -| [privateEndpointConnectionsPutSample.ts][privateendpointconnectionsputsample] | Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json | -| [privateLinkResourcesListByClusterSample.ts][privatelinkresourceslistbyclustersample] | Gets the private link resources that need to be created for a RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json | -| [redisEnterpriseCreateSample.ts][redisenterprisecreatesample] | Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseCreate.json | -| [redisEnterpriseDeleteSample.ts][redisenterprisedeletesample] | Deletes a RedisEnterprise cache cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDelete.json | -| [redisEnterpriseGetSample.ts][redisenterprisegetsample] | Gets information about a RedisEnterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseGet.json | -| [redisEnterpriseListByResourceGroupSample.ts][redisenterpriselistbyresourcegroupsample] | Lists all RedisEnterprise clusters in a resource group. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListByResourceGroup.json | -| [redisEnterpriseListSample.ts][redisenterpriselistsample] | Gets all RedisEnterprise clusters in the specified subscription. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseList.json | -| [redisEnterpriseUpdateSample.ts][redisenterpriseupdatesample] | Updates an existing RedisEnterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseUpdate.json | +| [accessPolicyAssignmentCreateUpdateSample.ts][accesspolicyassignmentcreateupdatesample] | Creates/Updates a particular access policy assignment for a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentCreateUpdate.json | +| [accessPolicyAssignmentDeleteSample.ts][accesspolicyassignmentdeletesample] | Deletes a single access policy assignment. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentDelete.json | +| [accessPolicyAssignmentGetSample.ts][accesspolicyassignmentgetsample] | Gets information about access policy assignment for database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentGet.json | +| [accessPolicyAssignmentListSample.ts][accesspolicyassignmentlistsample] | Gets all access policy assignments.. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentsList.json | +| [databasesCreateSample.ts][databasescreatesample] | Creates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesCreate.json | +| [databasesDeleteSample.ts][databasesdeletesample] | Deletes a single database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesDelete.json | +| [databasesExportSample.ts][databasesexportsample] | Exports a database file from target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesExport.json | +| [databasesFlushSample.ts][databasesflushsample] | Flushes all the keys in this database and also from its linked databases. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesFlush.json | +| [databasesForceLinkToReplicationGroupSample.ts][databasesforcelinktoreplicationgroupsample] | Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesForceLink.json | +| [databasesForceUnlinkSample.ts][databasesforceunlinksample] | Forcibly removes the link to the specified database resource. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json | +| [databasesGetSample.ts][databasesgetsample] | Gets information about a database in a Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesGet.json | +| [databasesImportSample.ts][databasesimportsample] | Imports database files to target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesImport.json | +| [databasesListByClusterSample.ts][databaseslistbyclustersample] | Gets all databases in the specified Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json | +| [databasesListKeysSample.ts][databaseslistkeyssample] | Retrieves the access keys for the Redis Enterprise database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesListKeys.json | +| [databasesRegenerateKeySample.ts][databasesregeneratekeysample] | Regenerates the Redis Enterprise database's access keys. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json | +| [databasesUpdateSample.ts][databasesupdatesample] | Updates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesUpdate.json | +| [databasesUpgradeDbRedisVersionSample.ts][databasesupgradedbredisversionsample] | Upgrades the database Redis version to the latest available. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json | +| [operationsListSample.ts][operationslistsample] | Lists all of the available REST API operations of the Microsoft.Cache provider. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/OperationsList.json | +| [operationsStatusGetSample.ts][operationsstatusgetsample] | Gets the status of operation. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/OperationsStatusGet.json | +| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json | +| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json | +| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | Lists all the private endpoint connections associated with the Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json | +| [privateEndpointConnectionsPutSample.ts][privateendpointconnectionsputsample] | Updates the state of the specified private endpoint connection associated with the Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json | +| [privateLinkResourcesListByClusterSample.ts][privatelinkresourceslistbyclustersample] | Gets the private link resources that need to be created for a Redis Enterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json | +| [redisEnterpriseCreateSample.ts][redisenterprisecreatesample] | Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseCreate.json | +| [redisEnterpriseDeleteSample.ts][redisenterprisedeletesample] | Deletes a Redis Enterprise cache cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDelete.json | +| [redisEnterpriseGetSample.ts][redisenterprisegetsample] | Gets information about a Redis Enterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseGet.json | +| [redisEnterpriseListByResourceGroupSample.ts][redisenterpriselistbyresourcegroupsample] | Lists all Redis Enterprise clusters in a resource group. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListByResourceGroup.json | +| [redisEnterpriseListSample.ts][redisenterpriselistsample] | Lists all Redis Enterprise clusters in the specified subscription. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseList.json | +| [redisEnterpriseUpdateSample.ts][redisenterpriseupdatesample] | Updates an existing Redis Enterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseUpdate.json | ## Prerequisites @@ -68,19 +72,23 @@ npm run build 4. Run whichever samples you like (note that some samples may require additional setup, see the table above): ```bash -node dist/databasesCreateSample.js +node dist/accessPolicyAssignmentCreateUpdateSample.js ``` Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -npx cross-env REDISENTERPRISE_SUBSCRIPTION_ID="" REDISENTERPRISE_RESOURCE_GROUP="" node dist/databasesCreateSample.js +npx cross-env REDISENTERPRISE_SUBSCRIPTION_ID="" REDISENTERPRISE_RESOURCE_GROUP="" node dist/accessPolicyAssignmentCreateUpdateSample.js ``` ## Next Steps Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. +[accesspolicyassignmentcreateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentCreateUpdateSample.ts +[accesspolicyassignmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentDeleteSample.ts +[accesspolicyassignmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentGetSample.ts +[accesspolicyassignmentlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentListSample.ts [databasescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesCreateSample.ts [databasesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesDeleteSample.ts [databasesexportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesExportSample.ts diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/package.json b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/package.json index 56d3e6d3af45..6c7cfafa5c87 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/package.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/package.json @@ -31,7 +31,7 @@ "dependencies": { "@azure/arm-redisenterprisecache": "next", "dotenv": "latest", - "@azure/identity": "^4.0.1" + "@azure/identity": "^4.2.1" }, "devDependencies": { "@types/node": "^18.0.0", diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentCreateUpdateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentCreateUpdateSample.ts new file mode 100644 index 000000000000..1ab80da2101f --- /dev/null +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentCreateUpdateSample.ts @@ -0,0 +1,59 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + AccessPolicyAssignment, + RedisEnterpriseManagementClient, +} from "@azure/arm-redisenterprisecache"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates/Updates a particular access policy assignment for a database + * + * @summary Creates/Updates a particular access policy assignment for a database + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentCreateUpdate.json + */ +async function redisEnterpriseAccessPolicyAssignmentCreateUpdate() { + const subscriptionId = + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; + const resourceGroupName = + process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; + const clusterName = "cache1"; + const databaseName = "default"; + const accessPolicyAssignmentName = "defaultTestEntraApp1"; + const parameters: AccessPolicyAssignment = { + accessPolicyName: "default", + user: { objectId: "6497c918-11ad-41e7-1b0f-7c518a87d0b0" }, + }; + const credential = new DefaultAzureCredential(); + const client = new RedisEnterpriseManagementClient( + credential, + subscriptionId, + ); + const result = + await client.accessPolicyAssignmentOperations.beginCreateUpdateAndWait( + resourceGroupName, + clusterName, + databaseName, + accessPolicyAssignmentName, + parameters, + ); + console.log(result); +} + +async function main() { + redisEnterpriseAccessPolicyAssignmentCreateUpdate(); +} + +main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentDeleteSample.ts similarity index 55% rename from sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsDeleteSample.ts rename to sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentDeleteSample.ts index 1fa1e35457ed..39efb55e6a26 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentDeleteSample.ts @@ -15,33 +15,37 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. + * This sample demonstrates how to Deletes a single access policy assignment. * - * @summary Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDeletePrivateEndpointConnection.json + * @summary Deletes a single access policy assignment. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentDelete.json */ -async function redisEnterpriseDeletePrivateEndpointConnection() { +async function redisEnterpriseAccessPolicyAssignmentDelete() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; - const privateEndpointConnectionName = "pectest01"; + const databaseName = "default"; + const accessPolicyAssignmentName = "defaultTestEntraApp1"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient( credential, - subscriptionId - ); - const result = await client.privateEndpointConnections.beginDeleteAndWait( - resourceGroupName, - clusterName, - privateEndpointConnectionName + subscriptionId, ); + const result = + await client.accessPolicyAssignmentOperations.beginDeleteAndWait( + resourceGroupName, + clusterName, + databaseName, + accessPolicyAssignmentName, + ); console.log(result); } async function main() { - redisEnterpriseDeletePrivateEndpointConnection(); + redisEnterpriseAccessPolicyAssignmentDelete(); } main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesListKeysSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentGetSample.ts similarity index 59% rename from sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesListKeysSample.ts rename to sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentGetSample.ts index 0a29f284b45f..4dcd701805f8 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesListKeysSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentGetSample.ts @@ -15,33 +15,36 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Retrieves the access keys for the RedisEnterprise database. + * This sample demonstrates how to Gets information about access policy assignment for database. * - * @summary Retrieves the access keys for the RedisEnterprise database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesListKeys.json + * @summary Gets information about access policy assignment for database. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentGet.json */ -async function redisEnterpriseDatabasesListKeys() { +async function redisEnterpriseAccessPolicyAssignmentGet() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; + const accessPolicyAssignmentName = "accessPolicyAssignmentName1"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient( credential, - subscriptionId + subscriptionId, ); - const result = await client.databases.listKeys( + const result = await client.accessPolicyAssignmentOperations.get( resourceGroupName, clusterName, - databaseName + databaseName, + accessPolicyAssignmentName, ); console.log(result); } async function main() { - redisEnterpriseDatabasesListKeys(); + redisEnterpriseAccessPolicyAssignmentGet(); } main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesListByClusterSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentListSample.ts similarity index 63% rename from sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesListByClusterSample.ts rename to sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentListSample.ts index 2c5a7c54661b..7af6b8458c1e 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesListByClusterSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/accessPolicyAssignmentListSample.ts @@ -15,26 +15,29 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets all databases in the specified RedisEnterprise cluster. + * This sample demonstrates how to Gets all access policy assignments.. * - * @summary Gets all databases in the specified RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesListByCluster.json + * @summary Gets all access policy assignments.. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseAccessPolicyAssignmentsList.json */ -async function redisEnterpriseDatabasesListByCluster() { +async function redisEnterpriseAccessPolicyAssignmentList() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; + const databaseName = "default"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); - for await (let item of client.databases.listByCluster( + for await (let item of client.accessPolicyAssignmentOperations.list( resourceGroupName, - clusterName + clusterName, + databaseName, )) { resArray.push(item); } @@ -42,7 +45,7 @@ async function redisEnterpriseDatabasesListByCluster() { } async function main() { - redisEnterpriseDatabasesListByCluster(); + redisEnterpriseAccessPolicyAssignmentList(); } main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesCreateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesCreateSample.ts index 2aa1d85a5d82..442698cb28dc 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesCreateSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesCreateSample.ts @@ -21,16 +21,18 @@ dotenv.config(); * This sample demonstrates how to Creates a database * * @summary Creates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesCreate.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesCreate.json */ async function redisEnterpriseDatabasesCreate() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters: Database = { + accessKeysAuthentication: "Enabled", clientProtocol: "Encrypted", clusteringPolicy: "EnterpriseCluster", deferUpgrade: "NotDeferred", @@ -61,16 +63,18 @@ async function redisEnterpriseDatabasesCreate() { * This sample demonstrates how to Creates a database * * @summary Creates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json */ async function redisEnterpriseDatabasesCreateWithActiveGeoReplication() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid1"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters: Database = { + accessKeysAuthentication: "Enabled", clientProtocol: "Encrypted", clusteringPolicy: "EnterpriseCluster", evictionPolicy: "NoEviction", @@ -78,10 +82,10 @@ async function redisEnterpriseDatabasesCreateWithActiveGeoReplication() { groupNickname: "groupName", linkedDatabases: [ { - id: "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default", + id: "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default", }, { - id: "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", + id: "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", }, ], }, diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesDeleteSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesDeleteSample.ts index bc04a98ff586..f744de83aaf7 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesDeleteSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesDeleteSample.ts @@ -18,11 +18,12 @@ dotenv.config(); * This sample demonstrates how to Deletes a single database * * @summary Deletes a single database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesDelete.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesDelete.json */ async function redisEnterpriseDatabasesDelete() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesExportSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesExportSample.ts index f10e34a414bf..d9b1e7beea8b 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesExportSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesExportSample.ts @@ -21,11 +21,12 @@ dotenv.config(); * This sample demonstrates how to Exports a database file from target database. * * @summary Exports a database file from target database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesExport.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesExport.json */ async function redisEnterpriseDatabasesExport() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesFlushSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesFlushSample.ts index 1044b7d0d03b..cc1837fe6f58 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesFlushSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesFlushSample.ts @@ -21,18 +21,19 @@ dotenv.config(); * This sample demonstrates how to Flushes all the keys in this database and also from its linked databases. * * @summary Flushes all the keys in this database and also from its linked databases. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesFlush.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesFlush.json */ async function howToFlushAllTheKeysInTheDatabase() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters: FlushParameters = { ids: [ - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", + "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", ], }; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesForceLinkToReplicationGroupSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesForceLinkToReplicationGroupSample.ts index a45f2a9cc13a..5d2f71dddcce 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesForceLinkToReplicationGroupSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesForceLinkToReplicationGroupSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. * * @summary Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesForceLink.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesForceLink.json */ async function howToRelinkADatabaseAfterARegionalOutage() { const subscriptionId = diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesForceUnlinkSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesForceUnlinkSample.ts index cb4f0efb1127..166ac399ce1b 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesForceUnlinkSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesForceUnlinkSample.ts @@ -21,18 +21,19 @@ dotenv.config(); * This sample demonstrates how to Forcibly removes the link to the specified database resource. * * @summary Forcibly removes the link to the specified database resource. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json */ async function howToUnlinkADatabaseDuringARegionalOutage() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters: ForceUnlinkParameters = { ids: [ - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", + "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", ], }; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesGetSample.ts index f7a254b3442e..c50a77ed769b 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesGetSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesGetSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets information about a database in a RedisEnterprise cluster. + * This sample demonstrates how to Gets information about a database in a Redis Enterprise cluster. * - * @summary Gets information about a database in a RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesGet.json + * @summary Gets information about a database in a Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesGet.json */ async function redisEnterpriseDatabasesGet() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesImportSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesImportSample.ts index fc735526f68c..7dc75a8c93c9 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesImportSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesImportSample.ts @@ -21,11 +21,12 @@ dotenv.config(); * This sample demonstrates how to Imports database files to target database. * * @summary Imports database files to target database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesImport.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesImport.json */ async function redisEnterpriseDatabasesImport() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesListByClusterSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesListByClusterSample.ts index 29e1c8623369..6b037c645fb0 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesListByClusterSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesListByClusterSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets all databases in the specified RedisEnterprise cluster. + * This sample demonstrates how to Gets all databases in the specified Redis Enterprise cluster. * - * @summary Gets all databases in the specified RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json + * @summary Gets all databases in the specified Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json */ async function redisEnterpriseDatabasesListByCluster() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesListKeysSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesListKeysSample.ts index 27e11aae68f5..be155ab25b77 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesListKeysSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesListKeysSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Retrieves the access keys for the RedisEnterprise database. + * This sample demonstrates how to Retrieves the access keys for the Redis Enterprise database. * - * @summary Retrieves the access keys for the RedisEnterprise database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesListKeys.json + * @summary Retrieves the access keys for the Redis Enterprise database. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesListKeys.json */ async function redisEnterpriseDatabasesListKeys() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesRegenerateKeySample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesRegenerateKeySample.ts index 634b4e801674..7a0818205e80 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesRegenerateKeySample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesRegenerateKeySample.ts @@ -18,14 +18,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Regenerates the RedisEnterprise database's access keys. + * This sample demonstrates how to Regenerates the Redis Enterprise database's access keys. * - * @summary Regenerates the RedisEnterprise database's access keys. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json + * @summary Regenerates the Redis Enterprise database's access keys. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json */ async function redisEnterpriseDatabasesRegenerateKey() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesUpdateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesUpdateSample.ts index 46a4b7863054..0201de74e9d6 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesUpdateSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesUpdateSample.ts @@ -21,16 +21,18 @@ dotenv.config(); * This sample demonstrates how to Updates a database * * @summary Updates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesUpdate.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesUpdate.json */ async function redisEnterpriseDatabasesUpdate() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; const databaseName = "default"; const parameters: DatabaseUpdate = { + accessKeysAuthentication: "Enabled", clientProtocol: "Encrypted", evictionPolicy: "AllKeysLRU", persistence: { rdbEnabled: true, rdbFrequency: "12h" }, diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesUpgradeDbRedisVersionSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesUpgradeDbRedisVersionSample.ts index 2c866f4c1cfe..d350a70a834d 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesUpgradeDbRedisVersionSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/databasesUpgradeDbRedisVersionSample.ts @@ -18,11 +18,12 @@ dotenv.config(); * This sample demonstrates how to Upgrades the database Redis version to the latest available. * * @summary Upgrades the database Redis version to the latest available. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json */ async function howToUpgradeYourDatabaseRedisVersion() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/operationsListSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/operationsListSample.ts index e446950ba861..d128ae942dfb 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/operationsListSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.Cache provider. * * @summary Lists all of the available REST API operations of the Microsoft.Cache provider. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/OperationsList.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/OperationsList.json */ async function operationsList() { const subscriptionId = diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/operationsStatusGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/operationsStatusGetSample.ts index 35fc2b60689e..4de6fe485738 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/operationsStatusGetSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/operationsStatusGetSample.ts @@ -18,11 +18,12 @@ dotenv.config(); * This sample demonstrates how to Gets the status of operation. * * @summary Gets the status of operation. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/OperationsStatusGet.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/OperationsStatusGet.json */ async function operationsStatusGet() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const location = "West US"; const operationId = "testoperationid"; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts index 983da09c1055..32ac0a146951 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. + * This sample demonstrates how to Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. * - * @summary Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json + * @summary Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json */ async function redisEnterpriseDeletePrivateEndpointConnection() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsGetSample.ts index 7072c865209b..855ca9f94a12 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsGetSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets the specified private endpoint connection associated with the RedisEnterprise cluster. + * This sample demonstrates how to Gets the specified private endpoint connection associated with the Redis Enterprise cluster. * - * @summary Gets the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json + * @summary Gets the specified private endpoint connection associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json */ async function redisEnterpriseGetPrivateEndpointConnection() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsListSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsListSample.ts index 384fc76d795c..a86504a67078 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsListSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsListSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Lists all the private endpoint connections associated with the RedisEnterprise cluster. + * This sample demonstrates how to Lists all the private endpoint connections associated with the Redis Enterprise cluster. * - * @summary Lists all the private endpoint connections associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json + * @summary Lists all the private endpoint connections associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json */ async function redisEnterpriseListPrivateEndpointConnections() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsPutSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsPutSample.ts index a936f422ec4f..0397101552b7 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsPutSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateEndpointConnectionsPutSample.ts @@ -18,14 +18,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. + * This sample demonstrates how to Updates the state of the specified private endpoint connection associated with the Redis Enterprise cluster. * - * @summary Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json + * @summary Updates the state of the specified private endpoint connection associated with the Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json */ async function redisEnterprisePutPrivateEndpointConnection() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateLinkResourcesListByClusterSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateLinkResourcesListByClusterSample.ts index bd084a9c30f7..0e9981956e72 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateLinkResourcesListByClusterSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/privateLinkResourcesListByClusterSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets the private link resources that need to be created for a RedisEnterprise cluster. + * This sample demonstrates how to Gets the private link resources that need to be created for a Redis Enterprise cluster. * - * @summary Gets the private link resources that need to be created for a RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json + * @summary Gets the private link resources that need to be created for a Redis Enterprise cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json */ async function redisEnterpriseListPrivateLinkResources() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseCreateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseCreateSample.ts index 8430f214a1b7..f8328a850795 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseCreateSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseCreateSample.ts @@ -21,11 +21,12 @@ dotenv.config(); * This sample demonstrates how to Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster * * @summary Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseCreate.json + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseCreate.json */ async function redisEnterpriseCreate() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseDeleteSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseDeleteSample.ts index bbcb720a9622..dd7e1ba7b845 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseDeleteSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseDeleteSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Deletes a RedisEnterprise cache cluster. + * This sample demonstrates how to Deletes a Redis Enterprise cache cluster. * - * @summary Deletes a RedisEnterprise cache cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseDelete.json + * @summary Deletes a Redis Enterprise cache cluster. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseDelete.json */ async function redisEnterpriseDelete() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseGetSample.ts index 4d9e77150dad..ef821bf9b74d 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseGetSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseGetSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets information about a RedisEnterprise cluster + * This sample demonstrates how to Gets information about a Redis Enterprise cluster * - * @summary Gets information about a RedisEnterprise cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseGet.json + * @summary Gets information about a Redis Enterprise cluster + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseGet.json */ async function redisEnterpriseGet() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseListByResourceGroupSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseListByResourceGroupSample.ts index 9b05aba9df7e..c1cd8d881faf 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseListByResourceGroupSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseListByResourceGroupSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Lists all RedisEnterprise clusters in a resource group. + * This sample demonstrates how to Lists all Redis Enterprise clusters in a resource group. * - * @summary Lists all RedisEnterprise clusters in a resource group. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseListByResourceGroup.json + * @summary Lists all Redis Enterprise clusters in a resource group. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseListByResourceGroup.json */ async function redisEnterpriseListByResourceGroup() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseListSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseListSample.ts index 121fab4d5c9b..37714435e066 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseListSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseListSample.ts @@ -15,14 +15,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets all RedisEnterprise clusters in the specified subscription. + * This sample demonstrates how to Lists all Redis Enterprise clusters in the specified subscription. * - * @summary Gets all RedisEnterprise clusters in the specified subscription. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseList.json + * @summary Lists all Redis Enterprise clusters in the specified subscription. + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseList.json */ async function redisEnterpriseList() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const credential = new DefaultAzureCredential(); const client = new RedisEnterpriseManagementClient( credential, diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseUpdateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseUpdateSample.ts index 055f7d1caa1f..fd4c3c3e9ceb 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseUpdateSample.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3-beta/typescript/src/redisEnterpriseUpdateSample.ts @@ -18,14 +18,15 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Updates an existing RedisEnterprise cluster + * This sample demonstrates how to Updates an existing Redis Enterprise cluster * - * @summary Updates an existing RedisEnterprise cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-03-01-preview/examples/RedisEnterpriseUpdate.json + * @summary Updates an existing Redis Enterprise cluster + * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/examples/RedisEnterpriseUpdate.json */ async function redisEnterpriseUpdate() { const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; + process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || + "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; const clusterName = "cache1"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/README.md b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/README.md deleted file mode 100644 index 47e3c1879651..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [databasesCreateSample.js][databasescreatesample] | Creates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesCreate.json | -| [databasesDeleteSample.js][databasesdeletesample] | Deletes a single database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesDelete.json | -| [databasesExportSample.js][databasesexportsample] | Exports a database file from target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesExport.json | -| [databasesFlushSample.js][databasesflushsample] | Flushes all the keys in this database and also from its linked databases. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesFlush.json | -| [databasesForceUnlinkSample.js][databasesforceunlinksample] | Forcibly removes the link to the specified database resource. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesForceUnlink.json | -| [databasesGetSample.js][databasesgetsample] | Gets information about a database in a RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesGet.json | -| [databasesImportSample.js][databasesimportsample] | Imports database files to target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesImport.json | -| [databasesListByClusterSample.js][databaseslistbyclustersample] | Gets all databases in the specified RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesListByCluster.json | -| [databasesListKeysSample.js][databaseslistkeyssample] | Retrieves the access keys for the RedisEnterprise database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesListKeys.json | -| [databasesRegenerateKeySample.js][databasesregeneratekeysample] | Regenerates the RedisEnterprise database's access keys. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesRegenerateKey.json | -| [databasesUpdateSample.js][databasesupdatesample] | Updates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesUpdate.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available REST API operations of the Microsoft.Cache provider. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/OperationsList.json | -| [operationsStatusGetSample.js][operationsstatusgetsample] | Gets the status of operation. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/OperationsStatusGet.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDeletePrivateEndpointConnection.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json | -| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | Lists all the private endpoint connections associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListPrivateEndpointConnections.json | -| [privateEndpointConnectionsPutSample.js][privateendpointconnectionsputsample] | Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterprisePutPrivateEndpointConnection.json | -| [privateLinkResourcesListByClusterSample.js][privatelinkresourceslistbyclustersample] | Gets the private link resources that need to be created for a RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListPrivateLinkResources.json | -| [redisEnterpriseCreateSample.js][redisenterprisecreatesample] | Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseCreate.json | -| [redisEnterpriseDeleteSample.js][redisenterprisedeletesample] | Deletes a RedisEnterprise cache cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDelete.json | -| [redisEnterpriseGetSample.js][redisenterprisegetsample] | Gets information about a RedisEnterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseGet.json | -| [redisEnterpriseListByResourceGroupSample.js][redisenterpriselistbyresourcegroupsample] | Lists all RedisEnterprise clusters in a resource group. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListByResourceGroup.json | -| [redisEnterpriseListSample.js][redisenterpriselistsample] | Gets all RedisEnterprise clusters in the specified subscription. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseList.json | -| [redisEnterpriseUpdateSample.js][redisenterpriseupdatesample] | Updates an existing RedisEnterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseUpdate.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node databasesCreateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env REDISENTERPRISE_SUBSCRIPTION_ID="" REDISENTERPRISE_RESOURCE_GROUP="" node databasesCreateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[databasescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesCreateSample.js -[databasesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesDeleteSample.js -[databasesexportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesExportSample.js -[databasesflushsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesFlushSample.js -[databasesforceunlinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesForceUnlinkSample.js -[databasesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesGetSample.js -[databasesimportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesImportSample.js -[databaseslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesListByClusterSample.js -[databaseslistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesListKeysSample.js -[databasesregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesRegenerateKeySample.js -[databasesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesUpdateSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/operationsListSample.js -[operationsstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/operationsStatusGetSample.js -[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsDeleteSample.js -[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsGetSample.js -[privateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsListSample.js -[privateendpointconnectionsputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsPutSample.js -[privatelinkresourceslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateLinkResourcesListByClusterSample.js -[redisenterprisecreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseCreateSample.js -[redisenterprisedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseDeleteSample.js -[redisenterprisegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseGetSample.js -[redisenterpriselistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseListByResourceGroupSample.js -[redisenterpriselistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseListSample.js -[redisenterpriseupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseUpdateSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-redisenterprisecache?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redisenterprise/arm-redisenterprisecache/README.md diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesCreateSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesCreateSample.js deleted file mode 100644 index 768e592d426f..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesCreateSample.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates a database - * - * @summary Creates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesCreate.json - */ -async function redisEnterpriseDatabasesCreate() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters = { - clientProtocol: "Encrypted", - clusteringPolicy: "EnterpriseCluster", - evictionPolicy: "AllKeysLRU", - modules: [ - { name: "RedisBloom", args: "ERROR_RATE 0.00 INITIAL_SIZE 400" }, - { name: "RedisTimeSeries", args: "RETENTION_POLICY 20" }, - { name: "RediSearch" }, - ], - persistence: { aofEnabled: true, aofFrequency: "1s" }, - port: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.beginCreateAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a database - * - * @summary Creates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json - */ -async function redisEnterpriseDatabasesCreateWithActiveGeoReplication() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters = { - clientProtocol: "Encrypted", - clusteringPolicy: "EnterpriseCluster", - evictionPolicy: "NoEviction", - geoReplication: { - groupNickname: "groupName", - linkedDatabases: [ - { - id: "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default", - }, - { - id: "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", - }, - ], - }, - port: 10000, - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.beginCreateAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters, - ); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesCreate(); - redisEnterpriseDatabasesCreateWithActiveGeoReplication(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesDeleteSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesDeleteSample.js deleted file mode 100644 index 027647f8bab6..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a single database - * - * @summary Deletes a single database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesDelete.json - */ -async function redisEnterpriseDatabasesDelete() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "db1"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.beginDeleteAndWait( - resourceGroupName, - clusterName, - databaseName, - ); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesDelete(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesExportSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesExportSample.js deleted file mode 100644 index 2a57991f7553..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesExportSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Exports a database file from target database. - * - * @summary Exports a database file from target database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesExport.json - */ -async function redisEnterpriseDatabasesExport() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters = { - sasUri: "https://contosostorage.blob.core.window.net/urlToBlobContainer?sasKeyParameters", - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.beginExportAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters, - ); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesExport(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesForceUnlinkSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesForceUnlinkSample.js deleted file mode 100644 index 5c95addd9925..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesForceUnlinkSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Forcibly removes the link to the specified database resource. - * - * @summary Forcibly removes the link to the specified database resource. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesForceUnlink.json - */ -async function howToUnlinkADatabaseDuringARegionalOutage() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters = { - ids: [ - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.beginForceUnlinkAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters, - ); - console.log(result); -} - -async function main() { - howToUnlinkADatabaseDuringARegionalOutage(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesGetSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesGetSample.js deleted file mode 100644 index d2072fb6661d..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about a database in a RedisEnterprise cluster. - * - * @summary Gets information about a database in a RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesGet.json - */ -async function redisEnterpriseDatabasesGet() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.get(resourceGroupName, clusterName, databaseName); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesGet(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesImportSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesImportSample.js deleted file mode 100644 index cd0ec4433431..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesImportSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Imports database files to target database. - * - * @summary Imports database files to target database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesImport.json - */ -async function redisEnterpriseDatabasesImport() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters = { - sasUris: [ - "https://contosostorage.blob.core.window.net/urltoBlobFile1?sasKeyParameters", - "https://contosostorage.blob.core.window.net/urltoBlobFile2?sasKeyParameters", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.beginImportAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters, - ); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesImport(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesListByClusterSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesListByClusterSample.js deleted file mode 100644 index ccf9b631c846..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesListByClusterSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all databases in the specified RedisEnterprise cluster. - * - * @summary Gets all databases in the specified RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesListByCluster.json - */ -async function redisEnterpriseDatabasesListByCluster() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.databases.listByCluster(resourceGroupName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - redisEnterpriseDatabasesListByCluster(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesListKeysSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesListKeysSample.js deleted file mode 100644 index 5e6bc43287df..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/databasesListKeysSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieves the access keys for the RedisEnterprise database. - * - * @summary Retrieves the access keys for the RedisEnterprise database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesListKeys.json - */ -async function redisEnterpriseDatabasesListKeys() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.databases.listKeys(resourceGroupName, clusterName, databaseName); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesListKeys(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/operationsListSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/operationsListSample.js deleted file mode 100644 index 70cb87e1d085..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @summary Lists all of the available REST API operations of the Microsoft.Cache provider. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/OperationsList.json - */ -async function operationsList() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/operationsStatusGetSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/operationsStatusGetSample.js deleted file mode 100644 index 51bccc07af5a..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/operationsStatusGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the status of operation. - * - * @summary Gets the status of operation. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/OperationsStatusGet.json - */ -async function operationsStatusGet() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const location = "West US"; - const operationId = "testoperationid"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.operationsStatus.get(location, operationId); - console.log(result); -} - -async function main() { - operationsStatusGet(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/package.json b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/package.json deleted file mode 100644 index 374791e146ce..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-redisenterprisecache-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/redisenterprise/arm-redisenterprisecache" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redisenterprise/arm-redisenterprisecache", - "dependencies": { - "@azure/arm-redisenterprisecache": "latest", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - } -} diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsDeleteSample.js deleted file mode 100644 index 2591f844efb2..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. - * - * @summary Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDeletePrivateEndpointConnection.json - */ -async function redisEnterpriseDeletePrivateEndpointConnection() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const privateEndpointConnectionName = "pectest01"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.beginDeleteAndWait( - resourceGroupName, - clusterName, - privateEndpointConnectionName, - ); - console.log(result); -} - -async function main() { - redisEnterpriseDeletePrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsGetSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsGetSample.js deleted file mode 100644 index 42c98f30729b..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsGetSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the specified private endpoint connection associated with the RedisEnterprise cluster. - * - * @summary Gets the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json - */ -async function redisEnterpriseGetPrivateEndpointConnection() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const privateEndpointConnectionName = "pectest01"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.get( - resourceGroupName, - clusterName, - privateEndpointConnectionName, - ); - console.log(result); -} - -async function main() { - redisEnterpriseGetPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsListSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsListSample.js deleted file mode 100644 index 253ed05e38d8..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsListSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the private endpoint connections associated with the RedisEnterprise cluster. - * - * @summary Lists all the private endpoint connections associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListPrivateEndpointConnections.json - */ -async function redisEnterpriseListPrivateEndpointConnections() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateEndpointConnections.list(resourceGroupName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - redisEnterpriseListPrivateEndpointConnections(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsPutSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsPutSample.js deleted file mode 100644 index e02dd7f2138a..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/privateEndpointConnectionsPutSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. - * - * @summary Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterprisePutPrivateEndpointConnection.json - */ -async function redisEnterprisePutPrivateEndpointConnection() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const privateEndpointConnectionName = "pectest01"; - const properties = { - privateLinkServiceConnectionState: { - description: "Auto-Approved", - status: "Approved", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.beginPutAndWait( - resourceGroupName, - clusterName, - privateEndpointConnectionName, - properties, - ); - console.log(result); -} - -async function main() { - redisEnterprisePutPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseCreateSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseCreateSample.js deleted file mode 100644 index 826a84379be5..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseCreateSample.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster - * - * @summary Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseCreate.json - */ -async function redisEnterpriseCreate() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const parameters = { - encryption: { - customerManagedKeyEncryption: { - keyEncryptionKeyIdentity: { - identityType: "userAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/your-subscription/resourceGroups/your-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/your-identity", - }, - keyEncryptionKeyUrl: "https://your-kv.vault.azure.net/keys/your-key/your-key-version", - }, - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/yourSubscription/resourceGroups/yourRg/providers/MicrosoftManagedIdentity/userAssignedIdentities/yourIdentity": - {}, - }, - }, - location: "West US", - minimumTlsVersion: "1.2", - sku: { name: "EnterpriseFlash_F300", capacity: 3 }, - tags: { tag1: "value1" }, - zones: ["1", "2", "3"], - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.redisEnterprise.beginCreateAndWait( - resourceGroupName, - clusterName, - parameters, - ); - console.log(result); -} - -async function main() { - redisEnterpriseCreate(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseDeleteSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseDeleteSample.js deleted file mode 100644 index 01d1a09f63ce..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a RedisEnterprise cache cluster. - * - * @summary Deletes a RedisEnterprise cache cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDelete.json - */ -async function redisEnterpriseDelete() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.redisEnterprise.beginDeleteAndWait(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - redisEnterpriseDelete(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseGetSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseGetSample.js deleted file mode 100644 index b46dd087763e..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about a RedisEnterprise cluster - * - * @summary Gets information about a RedisEnterprise cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseGet.json - */ -async function redisEnterpriseGet() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.redisEnterprise.get(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - redisEnterpriseGet(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseListByResourceGroupSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseListByResourceGroupSample.js deleted file mode 100644 index c96a3d562b4f..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseListByResourceGroupSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all RedisEnterprise clusters in a resource group. - * - * @summary Lists all RedisEnterprise clusters in a resource group. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListByResourceGroup.json - */ -async function redisEnterpriseListByResourceGroup() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.redisEnterprise.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - redisEnterpriseListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseListSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseListSample.js deleted file mode 100644 index 885c38219f07..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all RedisEnterprise clusters in the specified subscription. - * - * @summary Gets all RedisEnterprise clusters in the specified subscription. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseList.json - */ -async function redisEnterpriseList() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.redisEnterprise.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - redisEnterpriseList(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseUpdateSample.js b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseUpdateSample.js deleted file mode 100644 index 547649528cee..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/redisEnterpriseUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates an existing RedisEnterprise cluster - * - * @summary Updates an existing RedisEnterprise cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseUpdate.json - */ -async function redisEnterpriseUpdate() { - const subscriptionId = process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const parameters = { - minimumTlsVersion: "1.2", - sku: { name: "EnterpriseFlash_F300", capacity: 9 }, - tags: { tag1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient(credential, subscriptionId); - const result = await client.redisEnterprise.beginUpdateAndWait( - resourceGroupName, - clusterName, - parameters, - ); - console.log(result); -} - -async function main() { - redisEnterpriseUpdate(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/sample.env b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/README.md b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/README.md deleted file mode 100644 index d20ede65aa23..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [databasesCreateSample.ts][databasescreatesample] | Creates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesCreate.json | -| [databasesDeleteSample.ts][databasesdeletesample] | Deletes a single database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesDelete.json | -| [databasesExportSample.ts][databasesexportsample] | Exports a database file from target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesExport.json | -| [databasesFlushSample.ts][databasesflushsample] | Flushes all the keys in this database and also from its linked databases. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesFlush.json | -| [databasesForceUnlinkSample.ts][databasesforceunlinksample] | Forcibly removes the link to the specified database resource. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesForceUnlink.json | -| [databasesGetSample.ts][databasesgetsample] | Gets information about a database in a RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesGet.json | -| [databasesImportSample.ts][databasesimportsample] | Imports database files to target database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesImport.json | -| [databasesListByClusterSample.ts][databaseslistbyclustersample] | Gets all databases in the specified RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesListByCluster.json | -| [databasesListKeysSample.ts][databaseslistkeyssample] | Retrieves the access keys for the RedisEnterprise database. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesListKeys.json | -| [databasesRegenerateKeySample.ts][databasesregeneratekeysample] | Regenerates the RedisEnterprise database's access keys. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesRegenerateKey.json | -| [databasesUpdateSample.ts][databasesupdatesample] | Updates a database x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesUpdate.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available REST API operations of the Microsoft.Cache provider. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/OperationsList.json | -| [operationsStatusGetSample.ts][operationsstatusgetsample] | Gets the status of operation. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/OperationsStatusGet.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDeletePrivateEndpointConnection.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json | -| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | Lists all the private endpoint connections associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListPrivateEndpointConnections.json | -| [privateEndpointConnectionsPutSample.ts][privateendpointconnectionsputsample] | Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterprisePutPrivateEndpointConnection.json | -| [privateLinkResourcesListByClusterSample.ts][privatelinkresourceslistbyclustersample] | Gets the private link resources that need to be created for a RedisEnterprise cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListPrivateLinkResources.json | -| [redisEnterpriseCreateSample.ts][redisenterprisecreatesample] | Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseCreate.json | -| [redisEnterpriseDeleteSample.ts][redisenterprisedeletesample] | Deletes a RedisEnterprise cache cluster. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDelete.json | -| [redisEnterpriseGetSample.ts][redisenterprisegetsample] | Gets information about a RedisEnterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseGet.json | -| [redisEnterpriseListByResourceGroupSample.ts][redisenterpriselistbyresourcegroupsample] | Lists all RedisEnterprise clusters in a resource group. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListByResourceGroup.json | -| [redisEnterpriseListSample.ts][redisenterpriselistsample] | Gets all RedisEnterprise clusters in the specified subscription. x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseList.json | -| [redisEnterpriseUpdateSample.ts][redisenterpriseupdatesample] | Updates an existing RedisEnterprise cluster x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseUpdate.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/databasesCreateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env REDISENTERPRISE_SUBSCRIPTION_ID="" REDISENTERPRISE_RESOURCE_GROUP="" node dist/databasesCreateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[databasescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesCreateSample.ts -[databasesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesDeleteSample.ts -[databasesexportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesExportSample.ts -[databasesflushsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesFlushSample.ts -[databasesforceunlinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesForceUnlinkSample.ts -[databasesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesGetSample.ts -[databasesimportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesImportSample.ts -[databaseslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesListByClusterSample.ts -[databaseslistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesListKeysSample.ts -[databasesregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesRegenerateKeySample.ts -[databasesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesUpdateSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/operationsListSample.ts -[operationsstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/operationsStatusGetSample.ts -[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsDeleteSample.ts -[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsGetSample.ts -[privateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsListSample.ts -[privateendpointconnectionsputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsPutSample.ts -[privatelinkresourceslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateLinkResourcesListByClusterSample.ts -[redisenterprisecreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseCreateSample.ts -[redisenterprisedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseDeleteSample.ts -[redisenterprisegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseGetSample.ts -[redisenterpriselistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseListByResourceGroupSample.ts -[redisenterpriselistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseListSample.ts -[redisenterpriseupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseUpdateSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-redisenterprisecache?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redisenterprise/arm-redisenterprisecache/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/package.json b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/package.json deleted file mode 100644 index e9e0f06b45f8..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-redisenterprisecache-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/redisenterprise/arm-redisenterprisecache" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redisenterprise/arm-redisenterprisecache", - "dependencies": { - "@azure/arm-redisenterprisecache": "latest", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.6.2", - "rimraf": "latest" - } -} diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/sample.env b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesCreateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesCreateSample.ts deleted file mode 100644 index 87d19daca363..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesCreateSample.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Database, - RedisEnterpriseManagementClient -} from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates a database - * - * @summary Creates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesCreate.json - */ -async function redisEnterpriseDatabasesCreate() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters: Database = { - clientProtocol: "Encrypted", - clusteringPolicy: "EnterpriseCluster", - evictionPolicy: "AllKeysLRU", - modules: [ - { name: "RedisBloom", args: "ERROR_RATE 0.00 INITIAL_SIZE 400" }, - { name: "RedisTimeSeries", args: "RETENTION_POLICY 20" }, - { name: "RediSearch" } - ], - persistence: { aofEnabled: true, aofFrequency: "1s" }, - port: 10000 - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.databases.beginCreateAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a database - * - * @summary Creates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json - */ -async function redisEnterpriseDatabasesCreateWithActiveGeoReplication() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid1"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters: Database = { - clientProtocol: "Encrypted", - clusteringPolicy: "EnterpriseCluster", - evictionPolicy: "NoEviction", - geoReplication: { - groupNickname: "groupName", - linkedDatabases: [ - { - id: - "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default" - }, - { - id: - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default" - } - ] - }, - port: 10000 - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.databases.beginCreateAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters - ); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesCreate(); - redisEnterpriseDatabasesCreateWithActiveGeoReplication(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesExportSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesExportSample.ts deleted file mode 100644 index df2a2bb5e0fc..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesExportSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ExportClusterParameters, - RedisEnterpriseManagementClient -} from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Exports a database file from target database. - * - * @summary Exports a database file from target database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesExport.json - */ -async function redisEnterpriseDatabasesExport() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters: ExportClusterParameters = { - sasUri: - "https://contosostorage.blob.core.window.net/urlToBlobContainer?sasKeyParameters" - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.databases.beginExportAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters - ); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesExport(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesFlushSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesFlushSample.ts deleted file mode 100644 index cc5b98edd10c..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesFlushSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - FlushParameters, - RedisEnterpriseManagementClient -} from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Flushes all the keys in this database and also from its linked databases. - * - * @summary Flushes all the keys in this database and also from its linked databases. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesFlush.json - */ -async function howToFlushAllTheKeysInTheDatabase() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters: FlushParameters = { - ids: [ - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default" - ] - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.databases.beginFlushAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters - ); - console.log(result); -} - -async function main() { - howToFlushAllTheKeysInTheDatabase(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesForceUnlinkSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesForceUnlinkSample.ts deleted file mode 100644 index a0dffbaaf911..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesForceUnlinkSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ForceUnlinkParameters, - RedisEnterpriseManagementClient -} from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Forcibly removes the link to the specified database resource. - * - * @summary Forcibly removes the link to the specified database resource. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesForceUnlink.json - */ -async function howToUnlinkADatabaseDuringARegionalOutage() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters: ForceUnlinkParameters = { - ids: [ - "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default" - ] - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.databases.beginForceUnlinkAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters - ); - console.log(result); -} - -async function main() { - howToUnlinkADatabaseDuringARegionalOutage(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesImportSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesImportSample.ts deleted file mode 100644 index 991ee4038bfe..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesImportSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ImportClusterParameters, - RedisEnterpriseManagementClient -} from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Imports database files to target database. - * - * @summary Imports database files to target database. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesImport.json - */ -async function redisEnterpriseDatabasesImport() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters: ImportClusterParameters = { - sasUris: [ - "https://contosostorage.blob.core.window.net/urltoBlobFile1?sasKeyParameters", - "https://contosostorage.blob.core.window.net/urltoBlobFile2?sasKeyParameters" - ] - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.databases.beginImportAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters - ); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesImport(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesRegenerateKeySample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesRegenerateKeySample.ts deleted file mode 100644 index 75ad54cc7aa6..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesRegenerateKeySample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - RegenerateKeyParameters, - RedisEnterpriseManagementClient -} from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Regenerates the RedisEnterprise database's access keys. - * - * @summary Regenerates the RedisEnterprise database's access keys. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesRegenerateKey.json - */ -async function redisEnterpriseDatabasesRegenerateKey() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters: RegenerateKeyParameters = { keyType: "Primary" }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.databases.beginRegenerateKeyAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters - ); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesUpdateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesUpdateSample.ts deleted file mode 100644 index b178b3a13069..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/databasesUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DatabaseUpdate, - RedisEnterpriseManagementClient -} from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates a database - * - * @summary Updates a database - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDatabasesUpdate.json - */ -async function redisEnterpriseDatabasesUpdate() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const databaseName = "default"; - const parameters: DatabaseUpdate = { - clientProtocol: "Encrypted", - evictionPolicy: "AllKeysLRU", - persistence: { rdbEnabled: true, rdbFrequency: "12h" } - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.databases.beginUpdateAndWait( - resourceGroupName, - clusterName, - databaseName, - parameters - ); - console.log(result); -} - -async function main() { - redisEnterpriseDatabasesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/operationsListSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/operationsListSample.ts deleted file mode 100644 index 722e9abc87ed..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { RedisEnterpriseManagementClient } from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @summary Lists all of the available REST API operations of the Microsoft.Cache provider. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/OperationsList.json - */ -async function operationsList() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/operationsStatusGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/operationsStatusGetSample.ts deleted file mode 100644 index 6bd0b921f25c..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/operationsStatusGetSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { RedisEnterpriseManagementClient } from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the status of operation. - * - * @summary Gets the status of operation. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/OperationsStatusGet.json - */ -async function operationsStatusGet() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const location = "West US"; - const operationId = "testoperationid"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.operationsStatus.get(location, operationId); - console.log(result); -} - -async function main() { - operationsStatusGet(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsGetSample.ts deleted file mode 100644 index 38510e387381..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { RedisEnterpriseManagementClient } from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the specified private endpoint connection associated with the RedisEnterprise cluster. - * - * @summary Gets the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json - */ -async function redisEnterpriseGetPrivateEndpointConnection() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const privateEndpointConnectionName = "pectest01"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.privateEndpointConnections.get( - resourceGroupName, - clusterName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main() { - redisEnterpriseGetPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsListSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsListSample.ts deleted file mode 100644 index 3f93e8202dd3..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsListSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { RedisEnterpriseManagementClient } from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the private endpoint connections associated with the RedisEnterprise cluster. - * - * @summary Lists all the private endpoint connections associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListPrivateEndpointConnections.json - */ -async function redisEnterpriseListPrivateEndpointConnections() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.privateEndpointConnections.list( - resourceGroupName, - clusterName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - redisEnterpriseListPrivateEndpointConnections(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsPutSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsPutSample.ts deleted file mode 100644 index 1c863f71a3c5..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/privateEndpointConnectionsPutSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PrivateEndpointConnection, - RedisEnterpriseManagementClient -} from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. - * - * @summary Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterprisePutPrivateEndpointConnection.json - */ -async function redisEnterprisePutPrivateEndpointConnection() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const privateEndpointConnectionName = "pectest01"; - const properties: PrivateEndpointConnection = { - privateLinkServiceConnectionState: { - description: "Auto-Approved", - status: "Approved" - } - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.privateEndpointConnections.beginPutAndWait( - resourceGroupName, - clusterName, - privateEndpointConnectionName, - properties - ); - console.log(result); -} - -async function main() { - redisEnterprisePutPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseCreateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseCreateSample.ts deleted file mode 100644 index 9b73fd307b53..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseCreateSample.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Cluster, - RedisEnterpriseManagementClient -} from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster - * - * @summary Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseCreate.json - */ -async function redisEnterpriseCreate() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const parameters: Cluster = { - encryption: { - customerManagedKeyEncryption: { - keyEncryptionKeyIdentity: { - identityType: "userAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/your-subscription/resourceGroups/your-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/your-identity" - }, - keyEncryptionKeyUrl: - "https://your-kv.vault.azure.net/keys/your-key/your-key-version" - } - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/yourSubscription/resourceGroups/yourRg/providers/MicrosoftManagedIdentity/userAssignedIdentities/yourIdentity": {} - } - }, - location: "West US", - minimumTlsVersion: "1.2", - sku: { name: "EnterpriseFlash_F300", capacity: 3 }, - tags: { tag1: "value1" }, - zones: ["1", "2", "3"] - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.redisEnterprise.beginCreateAndWait( - resourceGroupName, - clusterName, - parameters - ); - console.log(result); -} - -async function main() { - redisEnterpriseCreate(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseDeleteSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseDeleteSample.ts deleted file mode 100644 index e4e8a484318b..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { RedisEnterpriseManagementClient } from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a RedisEnterprise cache cluster. - * - * @summary Deletes a RedisEnterprise cache cluster. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseDelete.json - */ -async function redisEnterpriseDelete() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.redisEnterprise.beginDeleteAndWait( - resourceGroupName, - clusterName - ); - console.log(result); -} - -async function main() { - redisEnterpriseDelete(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseGetSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseGetSample.ts deleted file mode 100644 index 88ebd703aa88..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { RedisEnterpriseManagementClient } from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about a RedisEnterprise cluster - * - * @summary Gets information about a RedisEnterprise cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseGet.json - */ -async function redisEnterpriseGet() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.redisEnterprise.get( - resourceGroupName, - clusterName - ); - console.log(result); -} - -async function main() { - redisEnterpriseGet(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseListByResourceGroupSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseListByResourceGroupSample.ts deleted file mode 100644 index 7a23da487b3b..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseListByResourceGroupSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { RedisEnterpriseManagementClient } from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all RedisEnterprise clusters in a resource group. - * - * @summary Lists all RedisEnterprise clusters in a resource group. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseListByResourceGroup.json - */ -async function redisEnterpriseListByResourceGroup() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.redisEnterprise.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - redisEnterpriseListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseListSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseListSample.ts deleted file mode 100644 index 94c93ccd4f13..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseListSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { RedisEnterpriseManagementClient } from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all RedisEnterprise clusters in the specified subscription. - * - * @summary Gets all RedisEnterprise clusters in the specified subscription. - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseList.json - */ -async function redisEnterpriseList() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.redisEnterprise.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - redisEnterpriseList(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseUpdateSample.ts b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseUpdateSample.ts deleted file mode 100644 index 465c79012757..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/src/redisEnterpriseUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterUpdate, - RedisEnterpriseManagementClient -} from "@azure/arm-redisenterprisecache"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing RedisEnterprise cluster - * - * @summary Updates an existing RedisEnterprise cluster - * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-11-01/examples/RedisEnterpriseUpdate.json - */ -async function redisEnterpriseUpdate() { - const subscriptionId = - process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1"; - const clusterName = "cache1"; - const parameters: ClusterUpdate = { - minimumTlsVersion: "1.2", - sku: { name: "EnterpriseFlash_F300", capacity: 9 }, - tags: { tag1: "value1" } - }; - const credential = new DefaultAzureCredential(); - const client = new RedisEnterpriseManagementClient( - credential, - subscriptionId - ); - const result = await client.redisEnterprise.beginUpdateAndWait( - resourceGroupName, - clusterName, - parameters - ); - console.log(result); -} - -async function main() { - redisEnterpriseUpdate(); -} - -main().catch(console.error); diff --git a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/tsconfig.json b/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/samples/v3/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts index f58bd98d2dd9..98bd2e207756 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts @@ -137,11 +137,11 @@ export interface OperationStatus { error?: ErrorResponse; } -/** SKU parameters supplied to the create RedisEnterprise operation. */ +/** SKU parameters supplied to the create Redis Enterprise cluster operation. */ export interface Sku { - /** The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.) */ + /** The level of Redis Enterprise cluster to deploy. Possible values: ('Balanced_B5', 'MemoryOptimized_M10', 'ComputeOptimized_X5', etc.). For more information on SKUs see the latest pricing documentation. Note that additional SKUs may become supported in the future. */ name: SkuName; - /** The size of the RedisEnterprise cluster. Defaults to 2 or 3 depending on SKU. Valid values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for Flash SKUs. */ + /** This property is only used with Enterprise and EnterpriseFlash SKUs. Determines the size of the cluster. Valid values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for EnterpriseFlash SKUs. */ capacity?: number; } @@ -237,7 +237,7 @@ export interface Resource { readonly type?: string; } -/** A partial update to the RedisEnterprise cluster */ +/** A partial update to the Redis Enterprise cluster */ export interface ClusterUpdate { /** The SKU to create, which affects price, performance, and features. */ sku?: Sku; @@ -245,7 +245,9 @@ export interface ClusterUpdate { identity?: ManagedServiceIdentity; /** Resource tags. */ tags?: { [propertyName: string]: string }; - /** The minimum TLS version for the cluster to support, e.g. '1.2' */ + /** Enabled by default. If highAvailability is disabled, the data set is not replicated. This affects the availability SLA, and increases the risk of data loss. */ + highAvailability?: HighAvailability; + /** The minimum TLS version for the cluster to support, e.g. '1.2'. Newer versions can be added in the future. Note that TLS 1.0 and TLS 1.1 are now completely obsolete -- you cannot use them. They are mentioned only for the sake of consistency with old API versions. */ minimumTlsVersion?: TlsVersion; /** Encryption-at-rest configuration for the cluster. */ encryption?: ClusterPropertiesEncryption; @@ -259,6 +261,11 @@ export interface ClusterUpdate { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; + /** + * Explains the current redundancy strategy of the cluster, which affects the expected SLA. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly redundancyMode?: RedundancyMode; /** * Current resource status of the cluster * NOTE: This property will not be serialized. It can only be populated by the server. @@ -270,7 +277,7 @@ export interface ClusterUpdate { */ readonly redisVersion?: string; /** - * List of private endpoint connections associated with the specified RedisEnterprise cluster + * List of private endpoint connections associated with the specified Redis Enterprise cluster * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateEndpointConnections?: PrivateEndpointConnection[]; @@ -298,13 +305,13 @@ export interface DatabaseList { readonly nextLink?: string; } -/** Persistence-related configuration for the RedisEnterprise database */ +/** Persistence-related configuration for the Redis Enterprise database */ export interface Persistence { - /** Sets whether AOF is enabled. */ + /** Sets whether AOF is enabled. Note that at most one of AOF or RDB persistence may be enabled. */ aofEnabled?: boolean; - /** Sets whether RDB is enabled. */ + /** Sets whether RDB is enabled. Note that at most one of AOF or RDB persistence may be enabled. */ rdbEnabled?: boolean; - /** Sets the frequency at which data is written to disk. */ + /** Sets the frequency at which data is written to disk. Defaults to '1s', meaning 'every second'. Note that the 'always' setting is deprecated, because of its performance impact. */ aofFrequency?: AofFrequency; /** Sets the frequency at which a snapshot of the database is created. */ rdbFrequency?: RdbFrequency; @@ -342,7 +349,47 @@ export interface LinkedDatabase { readonly state?: LinkState; } -/** A partial update to the RedisEnterprise database */ +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface ResourceAutoGenerated { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * 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 Redis Enterprise database */ export interface DatabaseUpdate { /** Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. */ clientProtocol?: Protocol; @@ -358,7 +405,7 @@ export interface DatabaseUpdate { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly resourceState?: ResourceState; - /** Clustering policy - default is OSSCluster. Specified at create time. */ + /** Clustering policy - default is OSSCluster. This property must be chosen at create time, and cannot be changed without deleting the database. */ clusteringPolicy?: ClusteringPolicy; /** Redis eviction policy - default is VolatileLRU */ evictionPolicy?: EvictionPolicy; @@ -373,8 +420,10 @@ export interface DatabaseUpdate { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly redisVersion?: string; - /** Option to defer upgrade when newest version is released - default is NotDeferred. Learn more: https://aka.ms/redisversionupgrade */ + /** Option to defer upgrade when newest version is released - default is NotDeferred. Learn more: https://aka.ms/redisversionupgrade */ deferUpgrade?: DeferUpgradeSetting; + /** This property can be Enabled/Disabled to allow or deny access with the current access keys. Can be updated even after database is created. */ + accessKeysAuthentication?: AccessKeysAuthentication; } /** The secret access keys used for authenticating connections to redis */ @@ -409,6 +458,23 @@ export interface ExportClusterParameters { sasUri: string; } +/** The user associated with the access policy. */ +export interface AccessPolicyAssignmentPropertiesUser { + /** The object ID of the user. */ + objectId?: string; +} + +/** The response of a list-all operation. */ +export interface AccessPolicyAssignmentList { + /** List of access policy assignments. */ + value?: AccessPolicyAssignment[]; + /** + * The URI to fetch the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** List of private endpoint connection associated with the specified storage account */ export interface PrivateEndpointConnectionListResult { /** Array of private endpoint connections */ @@ -421,7 +487,7 @@ export interface PrivateLinkResourceListResult { value?: PrivateLinkResource[]; } -/** Parameters for a Redis Enterprise Active Geo Replication Force Unlink operation. */ +/** Parameters for a redis enterprise active geo-replication force unlink operation. */ export interface ForceUnlinkParameters { /** The resource IDs of the database resources to be unlinked. */ ids: string[]; @@ -463,7 +529,7 @@ export interface TrackedResource extends Resource { } /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} +export interface ProxyResourceAutoGenerated extends Resource {} /** A private link resource */ export interface PrivateLinkResource extends Resource { @@ -481,7 +547,10 @@ export interface PrivateLinkResource extends Resource { requiredZoneNames?: string[]; } -/** Describes the RedisEnterprise cluster */ +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends ResourceAutoGenerated {} + +/** Describes the Redis Enterprise cluster */ export interface Cluster extends TrackedResource { /** The SKU to create, which affects price, performance, and features. */ sku: Sku; @@ -489,7 +558,9 @@ export interface Cluster extends TrackedResource { zones?: string[]; /** The identity of the resource. */ identity?: ManagedServiceIdentity; - /** The minimum TLS version for the cluster to support, e.g. '1.2' */ + /** Enabled by default. If highAvailability is disabled, the data set is not replicated. This affects the availability SLA, and increases the risk of data loss. */ + highAvailability?: HighAvailability; + /** The minimum TLS version for the cluster to support, e.g. '1.2'. Newer versions can be added in the future. Note that TLS 1.0 and TLS 1.1 are now completely obsolete -- you cannot use them. They are mentioned only for the sake of consistency with old API versions. */ minimumTlsVersion?: TlsVersion; /** Encryption-at-rest configuration for the cluster. */ encryption?: ClusterPropertiesEncryption; @@ -503,6 +574,11 @@ export interface Cluster extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; + /** + * Explains the current redundancy strategy of the cluster, which affects the expected SLA. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly redundancyMode?: RedundancyMode; /** * Current resource status of the cluster * NOTE: This property will not be serialized. It can only be populated by the server. @@ -514,13 +590,26 @@ export interface Cluster extends TrackedResource { */ readonly redisVersion?: string; /** - * List of private endpoint connections associated with the specified RedisEnterprise cluster + * List of private endpoint connections associated with the specified Redis Enterprise cluster * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateEndpointConnections?: PrivateEndpointConnection[]; } -/** Describes a database on the RedisEnterprise cluster */ +/** Describes the access policy assignment of Redis Enterprise database */ +export interface AccessPolicyAssignment extends ProxyResourceAutoGenerated { + /** + * Current provisioning status of the access policy assignment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Name of access policy under specific access policy assignment. Only "default" policy is supported for now. */ + accessPolicyName?: string; + /** The user associated with the access policy. */ + user?: AccessPolicyAssignmentPropertiesUser; +} + +/** Describes a database on the Redis Enterprise cluster */ export interface Database extends ProxyResource { /** Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. */ clientProtocol?: Protocol; @@ -536,7 +625,7 @@ export interface Database extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly resourceState?: ResourceState; - /** Clustering policy - default is OSSCluster. Specified at create time. */ + /** Clustering policy - default is OSSCluster. This property must be chosen at create time, and cannot be changed without deleting the database. */ clusteringPolicy?: ClusteringPolicy; /** Redis eviction policy - default is VolatileLRU */ evictionPolicy?: EvictionPolicy; @@ -551,8 +640,74 @@ export interface Database extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly redisVersion?: string; - /** Option to defer upgrade when newest version is released - default is NotDeferred. Learn more: https://aka.ms/redisversionupgrade */ + /** Option to defer upgrade when newest version is released - default is NotDeferred. Learn more: https://aka.ms/redisversionupgrade */ deferUpgrade?: DeferUpgradeSetting; + /** This property can be Enabled/Disabled to allow or deny access with the current access keys. Can be updated even after database is created. */ + accessKeysAuthentication?: AccessKeysAuthentication; +} + +/** Defines headers for RedisEnterprise_update operation. */ +export interface RedisEnterpriseUpdateHeaders { + /** Location URI to poll for result */ + location?: string; + /** Azure-AsyncOperation URI to poll for result */ + azureAsyncOperation?: string; +} + +/** Defines headers for RedisEnterprise_delete operation. */ +export interface RedisEnterpriseDeleteHeaders { + /** Location URI to poll for result */ + location?: string; + /** Azure-AsyncOperation URI to poll for result */ + azureAsyncOperation?: string; +} + +/** Defines headers for Databases_update operation. */ +export interface DatabasesUpdateHeaders { + /** Location URI to poll for result */ + location?: string; + /** Azure-AsyncOperation URI to poll for result */ + azureAsyncOperation?: string; +} + +/** Defines headers for Databases_delete operation. */ +export interface DatabasesDeleteHeaders { + /** Location URI to poll for result */ + location?: string; + /** Azure-AsyncOperation URI to poll for result */ + azureAsyncOperation?: string; +} + +/** Defines headers for Databases_regenerateKey operation. */ +export interface DatabasesRegenerateKeyHeaders { + /** Location URI to poll for result */ + location?: string; + /** Azure-AsyncOperation URI to poll for result */ + azureAsyncOperation?: string; +} + +/** Defines headers for Databases_import operation. */ +export interface DatabasesImportHeaders { + /** Location URI to poll for result */ + location?: string; + /** Azure-AsyncOperation URI to poll for result */ + azureAsyncOperation?: string; +} + +/** Defines headers for Databases_export operation. */ +export interface DatabasesExportHeaders { + /** Location URI to poll for result */ + location?: string; + /** Azure-AsyncOperation URI to poll for result */ + azureAsyncOperation?: string; +} + +/** Defines headers for Databases_forceUnlink operation. */ +export interface DatabasesForceUnlinkHeaders { + /** Location URI to poll for result */ + location?: string; + /** Azure-AsyncOperation URI to poll for result */ + azureAsyncOperation?: string; } /** Defines headers for Databases_forceLinkToReplicationGroup operation. */ @@ -579,6 +734,14 @@ export interface DatabasesUpgradeDBRedisVersionHeaders { azureAsyncOperation?: string; } +/** Defines headers for AccessPolicyAssignment_delete operation. */ +export interface AccessPolicyAssignmentDeleteHeaders { + /** Location URI to poll for result */ + location?: string; + /** Azure-AsyncOperation URI to poll for result */ + azureAsyncOperation?: string; +} + /** Defines headers for PrivateEndpointConnections_delete operation. */ export interface PrivateEndpointConnectionsDeleteHeaders { /** Location URI to poll for result */ @@ -625,6 +788,8 @@ export type ActionType = string; /** Known values of {@link SkuName} that the service accepts. */ export enum KnownSkuName { + /** EnterpriseE1 */ + EnterpriseE1 = "Enterprise_E1", /** EnterpriseE5 */ EnterpriseE5 = "Enterprise_E5", /** EnterpriseE10 */ @@ -635,12 +800,104 @@ export enum KnownSkuName { EnterpriseE50 = "Enterprise_E50", /** EnterpriseE100 */ EnterpriseE100 = "Enterprise_E100", + /** EnterpriseE200 */ + EnterpriseE200 = "Enterprise_E200", + /** EnterpriseE400 */ + EnterpriseE400 = "Enterprise_E400", /** EnterpriseFlashF300 */ EnterpriseFlashF300 = "EnterpriseFlash_F300", /** EnterpriseFlashF700 */ EnterpriseFlashF700 = "EnterpriseFlash_F700", /** EnterpriseFlashF1500 */ EnterpriseFlashF1500 = "EnterpriseFlash_F1500", + /** BalancedB0 */ + BalancedB0 = "Balanced_B0", + /** BalancedB1 */ + BalancedB1 = "Balanced_B1", + /** BalancedB3 */ + BalancedB3 = "Balanced_B3", + /** BalancedB5 */ + BalancedB5 = "Balanced_B5", + /** BalancedB10 */ + BalancedB10 = "Balanced_B10", + /** BalancedB20 */ + BalancedB20 = "Balanced_B20", + /** BalancedB50 */ + BalancedB50 = "Balanced_B50", + /** BalancedB100 */ + BalancedB100 = "Balanced_B100", + /** BalancedB150 */ + BalancedB150 = "Balanced_B150", + /** BalancedB250 */ + BalancedB250 = "Balanced_B250", + /** BalancedB350 */ + BalancedB350 = "Balanced_B350", + /** BalancedB500 */ + BalancedB500 = "Balanced_B500", + /** BalancedB700 */ + BalancedB700 = "Balanced_B700", + /** BalancedB1000 */ + BalancedB1000 = "Balanced_B1000", + /** MemoryOptimizedM10 */ + MemoryOptimizedM10 = "MemoryOptimized_M10", + /** MemoryOptimizedM20 */ + MemoryOptimizedM20 = "MemoryOptimized_M20", + /** MemoryOptimizedM50 */ + MemoryOptimizedM50 = "MemoryOptimized_M50", + /** MemoryOptimizedM100 */ + MemoryOptimizedM100 = "MemoryOptimized_M100", + /** MemoryOptimizedM150 */ + MemoryOptimizedM150 = "MemoryOptimized_M150", + /** MemoryOptimizedM250 */ + MemoryOptimizedM250 = "MemoryOptimized_M250", + /** MemoryOptimizedM350 */ + MemoryOptimizedM350 = "MemoryOptimized_M350", + /** MemoryOptimizedM500 */ + MemoryOptimizedM500 = "MemoryOptimized_M500", + /** MemoryOptimizedM700 */ + MemoryOptimizedM700 = "MemoryOptimized_M700", + /** MemoryOptimizedM1000 */ + MemoryOptimizedM1000 = "MemoryOptimized_M1000", + /** MemoryOptimizedM1500 */ + MemoryOptimizedM1500 = "MemoryOptimized_M1500", + /** MemoryOptimizedM2000 */ + MemoryOptimizedM2000 = "MemoryOptimized_M2000", + /** ComputeOptimizedX3 */ + ComputeOptimizedX3 = "ComputeOptimized_X3", + /** ComputeOptimizedX5 */ + ComputeOptimizedX5 = "ComputeOptimized_X5", + /** ComputeOptimizedX10 */ + ComputeOptimizedX10 = "ComputeOptimized_X10", + /** ComputeOptimizedX20 */ + ComputeOptimizedX20 = "ComputeOptimized_X20", + /** ComputeOptimizedX50 */ + ComputeOptimizedX50 = "ComputeOptimized_X50", + /** ComputeOptimizedX100 */ + ComputeOptimizedX100 = "ComputeOptimized_X100", + /** ComputeOptimizedX150 */ + ComputeOptimizedX150 = "ComputeOptimized_X150", + /** ComputeOptimizedX250 */ + ComputeOptimizedX250 = "ComputeOptimized_X250", + /** ComputeOptimizedX350 */ + ComputeOptimizedX350 = "ComputeOptimized_X350", + /** ComputeOptimizedX500 */ + ComputeOptimizedX500 = "ComputeOptimized_X500", + /** ComputeOptimizedX700 */ + ComputeOptimizedX700 = "ComputeOptimized_X700", + /** FlashOptimizedA250 */ + FlashOptimizedA250 = "FlashOptimized_A250", + /** FlashOptimizedA500 */ + FlashOptimizedA500 = "FlashOptimized_A500", + /** FlashOptimizedA700 */ + FlashOptimizedA700 = "FlashOptimized_A700", + /** FlashOptimizedA1000 */ + FlashOptimizedA1000 = "FlashOptimized_A1000", + /** FlashOptimizedA1500 */ + FlashOptimizedA1500 = "FlashOptimized_A1500", + /** FlashOptimizedA2000 */ + FlashOptimizedA2000 = "FlashOptimized_A2000", + /** FlashOptimizedA4500 */ + FlashOptimizedA4500 = "FlashOptimized_A4500", } /** @@ -648,14 +905,61 @@ export enum KnownSkuName { * {@link KnownSkuName} can be used interchangeably with SkuName, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **Enterprise_E1** \ * **Enterprise_E5** \ * **Enterprise_E10** \ * **Enterprise_E20** \ * **Enterprise_E50** \ * **Enterprise_E100** \ + * **Enterprise_E200** \ + * **Enterprise_E400** \ * **EnterpriseFlash_F300** \ * **EnterpriseFlash_F700** \ - * **EnterpriseFlash_F1500** + * **EnterpriseFlash_F1500** \ + * **Balanced_B0** \ + * **Balanced_B1** \ + * **Balanced_B3** \ + * **Balanced_B5** \ + * **Balanced_B10** \ + * **Balanced_B20** \ + * **Balanced_B50** \ + * **Balanced_B100** \ + * **Balanced_B150** \ + * **Balanced_B250** \ + * **Balanced_B350** \ + * **Balanced_B500** \ + * **Balanced_B700** \ + * **Balanced_B1000** \ + * **MemoryOptimized_M10** \ + * **MemoryOptimized_M20** \ + * **MemoryOptimized_M50** \ + * **MemoryOptimized_M100** \ + * **MemoryOptimized_M150** \ + * **MemoryOptimized_M250** \ + * **MemoryOptimized_M350** \ + * **MemoryOptimized_M500** \ + * **MemoryOptimized_M700** \ + * **MemoryOptimized_M1000** \ + * **MemoryOptimized_M1500** \ + * **MemoryOptimized_M2000** \ + * **ComputeOptimized_X3** \ + * **ComputeOptimized_X5** \ + * **ComputeOptimized_X10** \ + * **ComputeOptimized_X20** \ + * **ComputeOptimized_X50** \ + * **ComputeOptimized_X100** \ + * **ComputeOptimized_X150** \ + * **ComputeOptimized_X250** \ + * **ComputeOptimized_X350** \ + * **ComputeOptimized_X500** \ + * **ComputeOptimized_X700** \ + * **FlashOptimized_A250** \ + * **FlashOptimized_A500** \ + * **FlashOptimized_A700** \ + * **FlashOptimized_A1000** \ + * **FlashOptimized_A1500** \ + * **FlashOptimized_A2000** \ + * **FlashOptimized_A4500** */ export type SkuName = string; @@ -683,6 +987,24 @@ export enum KnownManagedServiceIdentityType { */ export type ManagedServiceIdentityType = string; +/** Known values of {@link HighAvailability} that the service accepts. */ +export enum KnownHighAvailability { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Defines values for HighAvailability. \ + * {@link KnownHighAvailability} can be used interchangeably with HighAvailability, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type HighAvailability = string; + /** Known values of {@link TlsVersion} that the service accepts. */ export enum KnownTlsVersion { /** One0 */ @@ -752,6 +1074,27 @@ export enum KnownProvisioningState { */ export type ProvisioningState = string; +/** Known values of {@link RedundancyMode} that the service accepts. */ +export enum KnownRedundancyMode { + /** No redundancy. Availability loss will occur. */ + None = "None", + /** Local redundancy with high availability. */ + LR = "LR", + /** Zone redundant. Higher availability. */ + ZR = "ZR", +} + +/** + * Defines values for RedundancyMode. \ + * {@link KnownRedundancyMode} can be used interchangeably with RedundancyMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No redundancy. Availability loss will occur. \ + * **LR**: Local redundancy with high availability. \ + * **ZR**: Zone redundant. Higher availability. + */ +export type RedundancyMode = string; + /** Known values of {@link ResourceState} that the service accepts. */ export enum KnownResourceState { /** Running */ @@ -871,9 +1214,9 @@ export type Protocol = string; /** Known values of {@link ClusteringPolicy} that the service accepts. */ export enum KnownClusteringPolicy { - /** EnterpriseCluster */ + /** Enterprise clustering policy uses only the classic redis protocol, which does not support redis cluster commands. */ EnterpriseCluster = "EnterpriseCluster", - /** OSSCluster */ + /** OSS clustering policy follows the redis cluster specification, and requires all clients to support redis clustering. */ OSSCluster = "OSSCluster", } @@ -882,8 +1225,8 @@ export enum KnownClusteringPolicy { * {@link KnownClusteringPolicy} can be used interchangeably with ClusteringPolicy, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **EnterpriseCluster** \ - * **OSSCluster** + * **EnterpriseCluster**: Enterprise clustering policy uses only the classic redis protocol, which does not support redis cluster commands. \ + * **OSSCluster**: OSS clustering policy follows the redis cluster specification, and requires all clients to support redis clustering. */ export type ClusteringPolicy = string; @@ -1006,6 +1349,48 @@ export enum KnownDeferUpgradeSetting { * **NotDeferred** */ export type DeferUpgradeSetting = string; + +/** Known values of {@link AccessKeysAuthentication} that the service accepts. */ +export enum KnownAccessKeysAuthentication { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * Defines values for AccessKeysAuthentication. \ + * {@link KnownAccessKeysAuthentication} can be used interchangeably with AccessKeysAuthentication, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Enabled** + */ +export type AccessKeysAuthentication = 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; /** Defines values for AccessKeyType. */ export type AccessKeyType = "Primary" | "Secondary"; @@ -1233,6 +1618,52 @@ export interface DatabasesListByClusterNextOptionalParams /** Contains response data for the listByClusterNext operation. */ export type DatabasesListByClusterNextResponse = DatabaseList; +/** Optional parameters. */ +export interface AccessPolicyAssignmentCreateUpdateOptionalParams + 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; +} + +/** Contains response data for the createUpdate operation. */ +export type AccessPolicyAssignmentCreateUpdateResponse = AccessPolicyAssignment; + +/** Optional parameters. */ +export interface AccessPolicyAssignmentGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AccessPolicyAssignmentGetResponse = AccessPolicyAssignment; + +/** Optional parameters. */ +export interface AccessPolicyAssignmentDeleteOptionalParams + 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; +} + +/** Contains response data for the delete operation. */ +export type AccessPolicyAssignmentDeleteResponse = + AccessPolicyAssignmentDeleteHeaders; + +/** Optional parameters. */ +export interface AccessPolicyAssignmentListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type AccessPolicyAssignmentListResponse = AccessPolicyAssignmentList; + +/** Optional parameters. */ +export interface AccessPolicyAssignmentListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type AccessPolicyAssignmentListNextResponse = AccessPolicyAssignmentList; + /** Optional parameters. */ export interface PrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts index 5d9372b0b375..3b9324c9fe33 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts @@ -506,6 +506,12 @@ export const ClusterUpdate: coreClient.CompositeMapper = { value: { type: { name: "String" } }, }, }, + highAvailability: { + serializedName: "properties.highAvailability", + type: { + name: "String", + }, + }, minimumTlsVersion: { serializedName: "properties.minimumTlsVersion", type: { @@ -533,6 +539,13 @@ export const ClusterUpdate: coreClient.CompositeMapper = { name: "String", }, }, + redundancyMode: { + serializedName: "properties.redundancyMode", + readOnly: true, + type: { + name: "String", + }, + }, resourceState: { serializedName: "properties.resourceState", readOnly: true, @@ -731,6 +744,88 @@ export const LinkedDatabase: coreClient.CompositeMapper = { }, }; +export const ResourceAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceAutoGenerated", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + 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", + }, + }, + }, + }, +}; + export const DatabaseUpdate: coreClient.CompositeMapper = { type: { name: "Composite", @@ -813,6 +908,12 @@ export const DatabaseUpdate: coreClient.CompositeMapper = { name: "String", }, }, + accessKeysAuthentication: { + serializedName: "properties.accessKeysAuthentication", + type: { + name: "String", + }, + }, }, }, }; @@ -894,6 +995,50 @@ export const ExportClusterParameters: coreClient.CompositeMapper = { }, }; +export const AccessPolicyAssignmentPropertiesUser: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "AccessPolicyAssignmentPropertiesUser", + modelProperties: { + objectId: { + serializedName: "objectId", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const AccessPolicyAssignmentList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessPolicyAssignmentList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessPolicyAssignment", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1061,10 +1206,10 @@ export const TrackedResource: coreClient.CompositeMapper = { }, }; -export const ProxyResource: coreClient.CompositeMapper = { +export const ProxyResourceAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "ProxyResourceAutoGenerated", modelProperties: { ...Resource.type.modelProperties, }, @@ -1111,6 +1256,16 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { }, }; +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...ResourceAutoGenerated.type.modelProperties, + }, + }, +}; + export const Cluster: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1142,6 +1297,12 @@ export const Cluster: coreClient.CompositeMapper = { className: "ManagedServiceIdentity", }, }, + highAvailability: { + serializedName: "properties.highAvailability", + type: { + name: "String", + }, + }, minimumTlsVersion: { serializedName: "properties.minimumTlsVersion", type: { @@ -1169,6 +1330,13 @@ export const Cluster: coreClient.CompositeMapper = { name: "String", }, }, + redundancyMode: { + serializedName: "properties.redundancyMode", + readOnly: true, + type: { + name: "String", + }, + }, resourceState: { serializedName: "properties.resourceState", readOnly: true, @@ -1200,6 +1368,41 @@ export const Cluster: coreClient.CompositeMapper = { }, }; +export const AccessPolicyAssignment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessPolicyAssignment", + modelProperties: { + ...ProxyResourceAutoGenerated.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + accessPolicyName: { + constraints: { + Pattern: new RegExp( + "^([a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]|[a-zA-Z0-9])$", + ), + }, + serializedName: "properties.accessPolicyName", + type: { + name: "String", + }, + }, + user: { + serializedName: "properties.user", + type: { + name: "Composite", + className: "AccessPolicyAssignmentPropertiesUser", + }, + }, + }, + }, +}; + export const Database: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1283,6 +1486,180 @@ export const Database: coreClient.CompositeMapper = { name: "String", }, }, + accessKeysAuthentication: { + serializedName: "properties.accessKeysAuthentication", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RedisEnterpriseUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedisEnterpriseUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RedisEnterpriseDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedisEnterpriseDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DatabasesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabasesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DatabasesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabasesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DatabasesRegenerateKeyHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabasesRegenerateKeyHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DatabasesImportHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabasesImportHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DatabasesExportHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabasesExportHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DatabasesForceUnlinkHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabasesForceUnlinkHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, }, }, }; @@ -1352,6 +1729,27 @@ export const DatabasesUpgradeDBRedisVersionHeaders: coreClient.CompositeMapper = }, }; +export const AccessPolicyAssignmentDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessPolicyAssignmentDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = { type: { diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts index 6c64225c0575..72e08d3eea6a 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts @@ -22,6 +22,7 @@ import { ForceUnlinkParameters as ForceUnlinkParametersMapper, ForceLinkParameters as ForceLinkParametersMapper, FlushParameters as FlushParametersMapper, + AccessPolicyAssignment as AccessPolicyAssignmentMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, } from "../models/mappers"; @@ -52,7 +53,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-03-01-preview", + defaultValue: "2024-09-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -220,6 +221,25 @@ export const parameters9: OperationParameter = { mapper: FlushParametersMapper, }; +export const parameters10: OperationParameter = { + parameterPath: "parameters", + mapper: AccessPolicyAssignmentMapper, +}; + +export const accessPolicyAssignmentName: OperationURLParameter = { + parameterPath: "accessPolicyAssignmentName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]{1,60}$"), + }, + serializedName: "accessPolicyAssignmentName", + required: true, + type: { + name: "String", + }, + }, +}; + export const privateEndpointConnectionName: OperationURLParameter = { parameterPath: "privateEndpointConnectionName", mapper: { diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/accessPolicyAssignmentOperations.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/accessPolicyAssignmentOperations.ts new file mode 100644 index 000000000000..c55196ebb0f9 --- /dev/null +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/accessPolicyAssignmentOperations.ts @@ -0,0 +1,569 @@ +/* + * 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 { setContinuationToken } from "../pagingHelper"; +import { AccessPolicyAssignmentOperations } 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 { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + AccessPolicyAssignment, + AccessPolicyAssignmentListNextOptionalParams, + AccessPolicyAssignmentListOptionalParams, + AccessPolicyAssignmentListResponse, + AccessPolicyAssignmentCreateUpdateOptionalParams, + AccessPolicyAssignmentCreateUpdateResponse, + AccessPolicyAssignmentGetOptionalParams, + AccessPolicyAssignmentGetResponse, + AccessPolicyAssignmentDeleteOptionalParams, + AccessPolicyAssignmentDeleteResponse, + AccessPolicyAssignmentListNextResponse, +} from "../models"; + +/// +/** Class containing AccessPolicyAssignmentOperations operations. */ +export class AccessPolicyAssignmentOperationsImpl + implements AccessPolicyAssignmentOperations +{ + private readonly client: RedisEnterpriseManagementClient; + + /** + * Initialize a new instance of the class AccessPolicyAssignmentOperations class. + * @param client Reference to the service client + */ + constructor(client: RedisEnterpriseManagementClient) { + this.client = client; + } + + /** + * Gets all access policy assignments.. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + clusterName: string, + databaseName: string, + options?: AccessPolicyAssignmentListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + clusterName, + databaseName, + 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( + resourceGroupName, + clusterName, + databaseName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + clusterName: string, + databaseName: string, + options?: AccessPolicyAssignmentListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: AccessPolicyAssignmentListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + clusterName, + databaseName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + clusterName, + databaseName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + clusterName: string, + databaseName: string, + options?: AccessPolicyAssignmentListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + clusterName, + databaseName, + options, + )) { + yield* page; + } + } + + /** + * Creates/Updates a particular access policy assignment for a database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy + * assignment. + * @param parameters Parameters supplied to the create access policy assignment for database. + * @param options The options parameters. + */ + async beginCreateUpdate( + resourceGroupName: string, + clusterName: string, + databaseName: string, + accessPolicyAssignmentName: string, + parameters: AccessPolicyAssignment, + options?: AccessPolicyAssignmentCreateUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + AccessPolicyAssignmentCreateUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + databaseName, + accessPolicyAssignmentName, + parameters, + options, + }, + spec: createUpdateOperationSpec, + }); + const poller = await createHttpPoller< + AccessPolicyAssignmentCreateUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "original-uri", + }); + await poller.poll(); + return poller; + } + + /** + * Creates/Updates a particular access policy assignment for a database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy + * assignment. + * @param parameters Parameters supplied to the create access policy assignment for database. + * @param options The options parameters. + */ + async beginCreateUpdateAndWait( + resourceGroupName: string, + clusterName: string, + databaseName: string, + accessPolicyAssignmentName: string, + parameters: AccessPolicyAssignment, + options?: AccessPolicyAssignmentCreateUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdate( + resourceGroupName, + clusterName, + databaseName, + accessPolicyAssignmentName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Gets information about access policy assignment for database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy + * assignment. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + databaseName: string, + accessPolicyAssignmentName: string, + options?: AccessPolicyAssignmentGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + databaseName, + accessPolicyAssignmentName, + options, + }, + getOperationSpec, + ); + } + + /** + * Deletes a single access policy assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy + * assignment. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + clusterName: string, + databaseName: string, + accessPolicyAssignmentName: string, + options?: AccessPolicyAssignmentDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + AccessPolicyAssignmentDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + databaseName, + accessPolicyAssignmentName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + AccessPolicyAssignmentDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a single access policy assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy + * assignment. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + clusterName: string, + databaseName: string, + accessPolicyAssignmentName: string, + options?: AccessPolicyAssignmentDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + clusterName, + databaseName, + accessPolicyAssignmentName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Gets all access policy assignments.. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + clusterName: string, + databaseName: string, + options?: AccessPolicyAssignmentListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, databaseName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + clusterName: string, + databaseName: string, + nextLink: string, + options?: AccessPolicyAssignmentListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, databaseName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AccessPolicyAssignment, + }, + 201: { + bodyMapper: Mappers.AccessPolicyAssignment, + }, + 202: { + bodyMapper: Mappers.AccessPolicyAssignment, + }, + 204: { + bodyMapper: Mappers.AccessPolicyAssignment, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.databaseName, + Parameters.accessPolicyAssignmentName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessPolicyAssignment, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.databaseName, + Parameters.accessPolicyAssignmentName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.AccessPolicyAssignmentDeleteHeaders, + }, + 201: { + headersMapper: Mappers.AccessPolicyAssignmentDeleteHeaders, + }, + 202: { + headersMapper: Mappers.AccessPolicyAssignmentDeleteHeaders, + }, + 204: { + headersMapper: Mappers.AccessPolicyAssignmentDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.databaseName, + Parameters.accessPolicyAssignmentName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessPolicyAssignmentList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessPolicyAssignmentList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts index ac6eadb720d9..28aa941fdc0f 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts @@ -67,7 +67,7 @@ export class DatabasesImpl implements Databases { } /** - * Gets all databases in the specified RedisEnterprise cluster. + * Gets all databases in the specified Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -151,7 +151,7 @@ export class DatabasesImpl implements Databases { } /** - * Gets all databases in the specified RedisEnterprise cluster. + * Gets all databases in the specified Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -380,7 +380,7 @@ export class DatabasesImpl implements Databases { } /** - * Gets information about a database in a RedisEnterprise cluster. + * Gets information about a database in a Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param databaseName The name of the Redis Enterprise database. @@ -486,7 +486,7 @@ export class DatabasesImpl implements Databases { } /** - * Retrieves the access keys for the RedisEnterprise database. + * Retrieves the access keys for the Redis Enterprise database. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param databaseName The name of the Redis Enterprise database. @@ -505,7 +505,7 @@ export class DatabasesImpl implements Databases { } /** - * Regenerates the RedisEnterprise database's access keys. + * Regenerates the Redis Enterprise database's access keys. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param databaseName The name of the Redis Enterprise database. @@ -586,7 +586,7 @@ export class DatabasesImpl implements Databases { } /** - * Regenerates the RedisEnterprise database's access keys. + * Regenerates the Redis Enterprise database's access keys. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param databaseName The name of the Redis Enterprise database. diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts index cb8946c7cbcc..f00035544edc 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts @@ -10,5 +10,6 @@ export * from "./operations"; export * from "./operationsStatus"; export * from "./redisEnterprise"; export * from "./databases"; +export * from "./accessPolicyAssignmentOperations"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateEndpointConnections.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateEndpointConnections.ts index d11a7fc32077..0f240925a108 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateEndpointConnections.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateEndpointConnections.ts @@ -45,7 +45,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Lists all the private endpoint connections associated with the RedisEnterprise cluster. + * Lists all the private endpoint connections associated with the Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -103,7 +103,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Lists all the private endpoint connections associated with the RedisEnterprise cluster. + * Lists all the private endpoint connections associated with the Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -120,7 +120,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Gets the specified private endpoint connection associated with the RedisEnterprise cluster. + * Gets the specified private endpoint connection associated with the Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the @@ -145,7 +145,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Updates the state of the specified private endpoint connection associated with the RedisEnterprise + * Updates the state of the specified private endpoint connection associated with the Redis Enterprise * cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. @@ -227,7 +227,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Updates the state of the specified private endpoint connection associated with the RedisEnterprise + * Updates the state of the specified private endpoint connection associated with the Redis Enterprise * cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. @@ -254,7 +254,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. + * Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the @@ -325,7 +325,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. + * Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateLinkResources.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateLinkResources.ts index 47d6afd0ac14..a9972672afac 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateLinkResources.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateLinkResources.ts @@ -32,7 +32,7 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { } /** - * Gets the private link resources that need to be created for a RedisEnterprise cluster. + * Gets the private link resources that need to be created for a Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -94,7 +94,7 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { } /** - * Gets the private link resources that need to be created for a RedisEnterprise cluster. + * Gets the private link resources that need to be created for a Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/redisEnterprise.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/redisEnterprise.ts index 8bcf8cd33433..4ee933c5d300 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/redisEnterprise.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/redisEnterprise.ts @@ -53,7 +53,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise { } /** - * Lists all RedisEnterprise clusters in a resource group. + * Lists all Redis Enterprise clusters in a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -122,7 +122,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise { } /** - * Gets all RedisEnterprise clusters in the specified subscription. + * Lists all Redis Enterprise clusters in the specified subscription. * @param options The options parameters. */ public list( @@ -179,7 +179,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise { * Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. - * @param parameters Parameters supplied to the Create RedisEnterprise operation. + * @param parameters Parameters supplied to the Create Redis Enterprise operation. * @param options The options parameters. */ async beginCreate( @@ -252,7 +252,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise { * Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. - * @param parameters Parameters supplied to the Create RedisEnterprise operation. + * @param parameters Parameters supplied to the Create Redis Enterprise operation. * @param options The options parameters. */ async beginCreateAndWait( @@ -271,10 +271,10 @@ export class RedisEnterpriseImpl implements RedisEnterprise { } /** - * Updates an existing RedisEnterprise cluster + * Updates an existing Redis Enterprise cluster * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. - * @param parameters Parameters supplied to the Update RedisEnterprise operation. + * @param parameters Parameters supplied to the Update Redis Enterprise operation. * @param options The options parameters. */ async beginUpdate( @@ -344,10 +344,10 @@ export class RedisEnterpriseImpl implements RedisEnterprise { } /** - * Updates an existing RedisEnterprise cluster + * Updates an existing Redis Enterprise cluster * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. - * @param parameters Parameters supplied to the Update RedisEnterprise operation. + * @param parameters Parameters supplied to the Update Redis Enterprise operation. * @param options The options parameters. */ async beginUpdateAndWait( @@ -366,7 +366,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise { } /** - * Deletes a RedisEnterprise cache cluster. + * Deletes a Redis Enterprise cache cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -429,7 +429,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise { } /** - * Deletes a RedisEnterprise cache cluster. + * Deletes a Redis Enterprise cache cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -448,7 +448,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise { } /** - * Gets information about a RedisEnterprise cluster + * Gets information about a Redis Enterprise cluster * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -465,7 +465,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise { } /** - * Lists all RedisEnterprise clusters in a resource group. + * Lists all Redis Enterprise clusters in a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -480,7 +480,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise { } /** - * Gets all RedisEnterprise clusters in the specified subscription. + * Lists all Redis Enterprise clusters in the specified subscription. * @param options The options parameters. */ private _list( diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/accessPolicyAssignmentOperations.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/accessPolicyAssignmentOperations.ts new file mode 100644 index 000000000000..2d76adbef059 --- /dev/null +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/accessPolicyAssignmentOperations.ts @@ -0,0 +1,132 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + AccessPolicyAssignment, + AccessPolicyAssignmentListOptionalParams, + AccessPolicyAssignmentCreateUpdateOptionalParams, + AccessPolicyAssignmentCreateUpdateResponse, + AccessPolicyAssignmentGetOptionalParams, + AccessPolicyAssignmentGetResponse, + AccessPolicyAssignmentDeleteOptionalParams, + AccessPolicyAssignmentDeleteResponse, +} from "../models"; + +/// +/** Interface representing a AccessPolicyAssignmentOperations. */ +export interface AccessPolicyAssignmentOperations { + /** + * Gets all access policy assignments.. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + clusterName: string, + databaseName: string, + options?: AccessPolicyAssignmentListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Creates/Updates a particular access policy assignment for a database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy + * assignment. + * @param parameters Parameters supplied to the create access policy assignment for database. + * @param options The options parameters. + */ + beginCreateUpdate( + resourceGroupName: string, + clusterName: string, + databaseName: string, + accessPolicyAssignmentName: string, + parameters: AccessPolicyAssignment, + options?: AccessPolicyAssignmentCreateUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + AccessPolicyAssignmentCreateUpdateResponse + > + >; + /** + * Creates/Updates a particular access policy assignment for a database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy + * assignment. + * @param parameters Parameters supplied to the create access policy assignment for database. + * @param options The options parameters. + */ + beginCreateUpdateAndWait( + resourceGroupName: string, + clusterName: string, + databaseName: string, + accessPolicyAssignmentName: string, + parameters: AccessPolicyAssignment, + options?: AccessPolicyAssignmentCreateUpdateOptionalParams, + ): Promise; + /** + * Gets information about access policy assignment for database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy + * assignment. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + databaseName: string, + accessPolicyAssignmentName: string, + options?: AccessPolicyAssignmentGetOptionalParams, + ): Promise; + /** + * Deletes a single access policy assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy + * assignment. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + clusterName: string, + databaseName: string, + accessPolicyAssignmentName: string, + options?: AccessPolicyAssignmentDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + AccessPolicyAssignmentDeleteResponse + > + >; + /** + * Deletes a single access policy assignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Redis Enterprise cluster. + * @param databaseName The name of the Redis Enterprise database. + * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy + * assignment. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + clusterName: string, + databaseName: string, + accessPolicyAssignmentName: string, + options?: AccessPolicyAssignmentDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/databases.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/databases.ts index 0a8d91094502..a346c9866f0d 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/databases.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/databases.ts @@ -43,7 +43,7 @@ import { /** Interface representing a Databases. */ export interface Databases { /** - * Gets all databases in the specified RedisEnterprise cluster. + * Gets all databases in the specified Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -124,7 +124,7 @@ export interface Databases { options?: DatabasesUpdateOptionalParams, ): Promise; /** - * Gets information about a database in a RedisEnterprise cluster. + * Gets information about a database in a Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param databaseName The name of the Redis Enterprise database. @@ -163,7 +163,7 @@ export interface Databases { options?: DatabasesDeleteOptionalParams, ): Promise; /** - * Retrieves the access keys for the RedisEnterprise database. + * Retrieves the access keys for the Redis Enterprise database. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param databaseName The name of the Redis Enterprise database. @@ -176,7 +176,7 @@ export interface Databases { options?: DatabasesListKeysOptionalParams, ): Promise; /** - * Regenerates the RedisEnterprise database's access keys. + * Regenerates the Redis Enterprise database's access keys. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param databaseName The name of the Redis Enterprise database. @@ -196,7 +196,7 @@ export interface Databases { > >; /** - * Regenerates the RedisEnterprise database's access keys. + * Regenerates the Redis Enterprise database's access keys. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param databaseName The name of the Redis Enterprise database. diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts index cb8946c7cbcc..f00035544edc 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts @@ -10,5 +10,6 @@ export * from "./operations"; export * from "./operationsStatus"; export * from "./redisEnterprise"; export * from "./databases"; +export * from "./accessPolicyAssignmentOperations"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateEndpointConnections.ts index bfc8f5c748bf..253dbb48b65a 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateEndpointConnections.ts @@ -22,7 +22,7 @@ import { /** Interface representing a PrivateEndpointConnections. */ export interface PrivateEndpointConnections { /** - * Lists all the private endpoint connections associated with the RedisEnterprise cluster. + * Lists all the private endpoint connections associated with the Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -33,7 +33,7 @@ export interface PrivateEndpointConnections { options?: PrivateEndpointConnectionsListOptionalParams, ): PagedAsyncIterableIterator; /** - * Gets the specified private endpoint connection associated with the RedisEnterprise cluster. + * Gets the specified private endpoint connection associated with the Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the @@ -47,7 +47,7 @@ export interface PrivateEndpointConnections { options?: PrivateEndpointConnectionsGetOptionalParams, ): Promise; /** - * Updates the state of the specified private endpoint connection associated with the RedisEnterprise + * Updates the state of the specified private endpoint connection associated with the Redis Enterprise * cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. @@ -69,7 +69,7 @@ export interface PrivateEndpointConnections { > >; /** - * Updates the state of the specified private endpoint connection associated with the RedisEnterprise + * Updates the state of the specified private endpoint connection associated with the Redis Enterprise * cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. @@ -86,7 +86,7 @@ export interface PrivateEndpointConnections { options?: PrivateEndpointConnectionsPutOptionalParams, ): Promise; /** - * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. + * Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the @@ -100,7 +100,7 @@ export interface PrivateEndpointConnections { options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise, void>>; /** - * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. + * Deletes the specified private endpoint connection associated with the Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateLinkResources.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateLinkResources.ts index 57b4e7f6e5df..a5569d12109d 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateLinkResources.ts @@ -16,7 +16,7 @@ import { /** Interface representing a PrivateLinkResources. */ export interface PrivateLinkResources { /** - * Gets the private link resources that need to be created for a RedisEnterprise cluster. + * Gets the private link resources that need to be created for a Redis Enterprise cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/redisEnterprise.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/redisEnterprise.ts index 08cc05f7fa80..6dc7134e1c2f 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/redisEnterprise.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/redisEnterprise.ts @@ -26,7 +26,7 @@ import { /** Interface representing a RedisEnterprise. */ export interface RedisEnterprise { /** - * Lists all RedisEnterprise clusters in a resource group. + * Lists all Redis Enterprise clusters in a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -35,7 +35,7 @@ export interface RedisEnterprise { options?: RedisEnterpriseListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; /** - * Gets all RedisEnterprise clusters in the specified subscription. + * Lists all Redis Enterprise clusters in the specified subscription. * @param options The options parameters. */ list( @@ -45,7 +45,7 @@ export interface RedisEnterprise { * Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. - * @param parameters Parameters supplied to the Create RedisEnterprise operation. + * @param parameters Parameters supplied to the Create Redis Enterprise operation. * @param options The options parameters. */ beginCreate( @@ -63,7 +63,7 @@ export interface RedisEnterprise { * Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. - * @param parameters Parameters supplied to the Create RedisEnterprise operation. + * @param parameters Parameters supplied to the Create Redis Enterprise operation. * @param options The options parameters. */ beginCreateAndWait( @@ -73,10 +73,10 @@ export interface RedisEnterprise { options?: RedisEnterpriseCreateOptionalParams, ): Promise; /** - * Updates an existing RedisEnterprise cluster + * Updates an existing Redis Enterprise cluster * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. - * @param parameters Parameters supplied to the Update RedisEnterprise operation. + * @param parameters Parameters supplied to the Update Redis Enterprise operation. * @param options The options parameters. */ beginUpdate( @@ -91,10 +91,10 @@ export interface RedisEnterprise { > >; /** - * Updates an existing RedisEnterprise cluster + * Updates an existing Redis Enterprise cluster * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. - * @param parameters Parameters supplied to the Update RedisEnterprise operation. + * @param parameters Parameters supplied to the Update Redis Enterprise operation. * @param options The options parameters. */ beginUpdateAndWait( @@ -104,7 +104,7 @@ export interface RedisEnterprise { options?: RedisEnterpriseUpdateOptionalParams, ): Promise; /** - * Deletes a RedisEnterprise cache cluster. + * Deletes a Redis Enterprise cache cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -115,7 +115,7 @@ export interface RedisEnterprise { options?: RedisEnterpriseDeleteOptionalParams, ): Promise, void>>; /** - * Deletes a RedisEnterprise cache cluster. + * Deletes a Redis Enterprise cache cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. @@ -126,7 +126,7 @@ export interface RedisEnterprise { options?: RedisEnterpriseDeleteOptionalParams, ): Promise; /** - * Gets information about a RedisEnterprise cluster + * Gets information about a Redis Enterprise cluster * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Redis Enterprise cluster. * @param options The options parameters. diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts index c8b5db7faf0a..b425875f02b8 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts @@ -19,6 +19,7 @@ import { OperationsStatusImpl, RedisEnterpriseImpl, DatabasesImpl, + AccessPolicyAssignmentOperationsImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, } from "./operations"; @@ -27,6 +28,7 @@ import { OperationsStatus, RedisEnterprise, Databases, + AccessPolicyAssignmentOperations, PrivateEndpointConnections, PrivateLinkResources, } from "./operationsInterfaces"; @@ -118,11 +120,13 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-03-01-preview"; + this.apiVersion = options.apiVersion || "2024-09-01-preview"; this.operations = new OperationsImpl(this); this.operationsStatus = new OperationsStatusImpl(this); this.redisEnterprise = new RedisEnterpriseImpl(this); this.databases = new DatabasesImpl(this); + this.accessPolicyAssignmentOperations = + new AccessPolicyAssignmentOperationsImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); @@ -160,6 +164,7 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { operationsStatus: OperationsStatus; redisEnterprise: RedisEnterprise; databases: Databases; + accessPolicyAssignmentOperations: AccessPolicyAssignmentOperations; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; }