Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions sdk/redis/Azure.ResourceManager.Redis/Configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"output-folder": ".",
"namespace": "Azure.ResourceManager.Redis",
"library-name": "Azure.ResourceManager.Redis",
"flavor": "azure",
"use-model-reader-writer": true,
"shared-source-folders": [
"../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared",
"../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared"
],
"model-namespace": true,
"enable-bicep-serialization": true,
"azure-arm": true
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Collections.Generic;

namespace Azure.ResourceManager.Redis.Models
{
public partial class RedisCreateOrUpdateContent
{
/// <summary> All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. </summary>
[WirePath("properties.redisConfiguration")]
public RedisCommonConfiguration RedisConfiguration { get; set; }
/// <summary> Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. </summary>
[WirePath("properties.redisVersion")]
public string RedisVersion { get; set; }
/// <summary> Specifies whether the non-ssl Redis server port (6379) is enabled. </summary>
[WirePath("properties.enableNonSslPort")]
public bool? EnableNonSslPort { get; set; }
/// <summary> The number of replicas to be created per primary. </summary>
[WirePath("properties.replicasPerMaster")]
public int? ReplicasPerMaster { get; set; }
/// <summary> The number of replicas to be created per primary. </summary>
[WirePath("properties.replicasPerPrimary")]
public int? ReplicasPerPrimary { get; set; }
/// <summary> A dictionary of tenant settings. </summary>
[WirePath("properties.tenantSettings")]
public IDictionary<string, string> TenantSettings { get; }
/// <summary> The number of shards to be created on a Premium Cluster Cache. </summary>
[WirePath("properties.shardCount")]
public int? ShardCount { get; set; }
/// <summary> Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). </summary>
[WirePath("properties.minimumTlsVersion")]
public RedisTlsVersion? MinimumTlsVersion { get; set; }
/// <summary> Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. </summary>
[WirePath("properties.publicNetworkAccess")]
public RedisPublicNetworkAccess? PublicNetworkAccess { get; set; }
/// <summary> Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. </summary>
[WirePath("properties.updateChannel")]
public UpdateChannel? UpdateChannel { get; set; }
/// <summary> Authentication to Redis through access keys is disabled when set as true. Default value is false. </summary>
[WirePath("properties.disableAccessKeyAuthentication")]
public bool? IsAccessKeyAuthenticationDisabled { get; set; }
/// <summary> Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported. </summary>
[WirePath("properties.zonalAllocationPolicy")]
public ZonalAllocationPolicy? ZonalAllocationPolicy { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core;

namespace Azure.ResourceManager.Redis.Models
{
[CodeGenType("RedisResourcePatch")]
public partial class RedisPatch
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ namespace Azure.ResourceManager.Redis.Models
/// Serialized Name: TlsVersion.1.0
/// </summary>
[CodeGenMember("One0")]
public static RedisTlsVersion Tls1_0 { get; } = new RedisTlsVersion(Tls1_0Value);
public static RedisTlsVersion Tls1_0 { get; } = new RedisTlsVersion(_10Value);
/// <summary>
/// 1.1
/// Serialized Name: TlsVersion.1.1
/// </summary>
[CodeGenMember("One1")]
public static RedisTlsVersion Tls1_1 { get; } = new RedisTlsVersion(Tls1_1Value);
public static RedisTlsVersion Tls1_1 { get; } = new RedisTlsVersion(_11Value);
/// <summary>
/// 1.2
/// Serialized Name: TlsVersion.1.2
/// </summary>
[CodeGenMember("One2")]
public static RedisTlsVersion Tls1_2 { get; } = new RedisTlsVersion(Tls1_2Value);
public static RedisTlsVersion Tls1_2 { get; } = new RedisTlsVersion(_12Value);
#pragma warning restore CA1707
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@
#nullable disable

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager;
using Azure.ResourceManager.Redis.Models;
using Azure.ResourceManager.Resources;

Expand Down Expand Up @@ -48,12 +43,12 @@ public virtual async Task<Response<RedisResource>> UpdateAsync(RedisPatch patch,
{
Argument.AssertNotNull(patch, nameof(patch));

using var scope = _redisClientDiagnostics.CreateScope("RedisResource.Update");
using var scope = _redisRedisResourcesClientDiagnostics.CreateScope("RedisResource.Update");
scope.Start();
try
{
var response = await _redisRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false);
var operation = new RedisArmOperation<RedisResource>(new RedisOperationSource(Client), _redisClientDiagnostics, Pipeline, _redisRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location);
var response = await _redisRedisResourcesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false);
var operation = new RedisArmOperation<RedisResource>(new RedisOperationSource(Client), _redisRedisResourcesClientDiagnostics, Pipeline, _redisRedisResourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location);
return await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
}
catch (Exception e)
Expand Down Expand Up @@ -85,12 +80,12 @@ public virtual Response<RedisResource> Update(RedisPatch patch, CancellationToke
{
Argument.AssertNotNull(patch, nameof(patch));

using var scope = _redisClientDiagnostics.CreateScope("RedisResource.Update");
using var scope = _redisRedisResourcesClientDiagnostics.CreateScope("RedisResource.Update");
scope.Start();
try
{
var response = _redisRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken);
var operation = new RedisArmOperation<RedisResource>(new RedisOperationSource(Client), _redisClientDiagnostics, Pipeline, _redisRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location);
var response = _redisRedisResourcesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken);
var operation = new RedisArmOperation<RedisResource>(new RedisOperationSource(Client), _redisRedisResourcesClientDiagnostics, Pipeline, _redisRedisResourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location);
return operation.WaitForCompletion(cancellationToken);
}
catch (Exception e)
Expand Down
Loading
Loading