diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalROperations.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalROperations.cs index c1969ab03c65..27e212ac0ed3 100644 --- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalROperations.cs +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalROperations.cs @@ -285,6 +285,33 @@ public partial interface ISignalROperations /// Task RestartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// List all available skus of the resource. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListSkusWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Create or update a resource. /// /// diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/KeyType.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/KeyType.cs index 1203be153036..bb06fafd3b8a 100644 --- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/KeyType.cs +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/KeyType.cs @@ -18,5 +18,6 @@ public static class KeyType { public const string Primary = "Primary"; public const string Secondary = "Secondary"; + public const string Salt = "Salt"; } } diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateEndpointConnection.cs index 1552686f011f..c6575f09150a 100644 --- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateEndpointConnection.cs +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateEndpointConnection.cs @@ -13,6 +13,8 @@ namespace Microsoft.Azure.Management.SignalR.Models using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -45,14 +47,16 @@ public PrivateEndpointConnection() /// 'Updating', 'Deleting', 'Moving' /// Private endpoint associated with the /// private endpoint connection + /// Group IDs /// Connection /// state - public PrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState)) + public PrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), IList groupIds = default(IList), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState)) : base(id, name, type) { SystemData = systemData; ProvisioningState = provisioningState; PrivateEndpoint = privateEndpoint; + GroupIds = groupIds; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; CustomInit(); } @@ -84,6 +88,12 @@ public PrivateEndpointConnection() [JsonProperty(PropertyName = "properties.privateEndpoint")] public PrivateEndpoint PrivateEndpoint { get; set; } + /// + /// Gets group IDs + /// + [JsonProperty(PropertyName = "properties.groupIds")] + public IList GroupIds { get; private set; } + /// /// Gets or sets connection state /// diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/RegenerateKeyParameters.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/RegenerateKeyParameters.cs index c749dc5627bf..83cfa7e9a183 100644 --- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/RegenerateKeyParameters.cs +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/RegenerateKeyParameters.cs @@ -31,7 +31,7 @@ public RegenerateKeyParameters() /// /// The keyType to regenerate. Must be either /// 'primary' or 'secondary'(case-insensitive). Possible values - /// include: 'Primary', 'Secondary' + /// include: 'Primary', 'Secondary', 'Salt' public RegenerateKeyParameters(string keyType = default(string)) { KeyType = keyType; @@ -46,7 +46,7 @@ public RegenerateKeyParameters() /// /// Gets or sets the keyType to regenerate. Must be either 'primary' or /// 'secondary'(case-insensitive). Possible values include: 'Primary', - /// 'Secondary' + /// 'Secondary', 'Salt' /// [JsonProperty(PropertyName = "keyType")] public string KeyType { get; set; } diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogCategory.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogCategory.cs new file mode 100644 index 000000000000..bb724e8d6038 --- /dev/null +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogCategory.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SignalR.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Resource log category configuration of a Microsoft.SignalRService + /// resource. + /// + public partial class ResourceLogCategory + { + /// + /// Initializes a new instance of the ResourceLogCategory class. + /// + public ResourceLogCategory() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceLogCategory class. + /// + /// Gets or sets the resource log category's name. + /// Available values: ConnectivityLogs, MessagingLogs. + /// Case insensitive. + /// Indicates whether or the resource log + /// category is enabled. + /// Available values: true, false. + /// Case insensitive. + public ResourceLogCategory(string name = default(string), string enabled = default(string)) + { + Name = name; + Enabled = enabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource log category's name. + /// Available values: ConnectivityLogs, MessagingLogs. + /// Case insensitive. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets indicates whether or the resource log category is + /// enabled. + /// Available values: true, false. + /// Case insensitive. + /// + [JsonProperty(PropertyName = "enabled")] + public string Enabled { get; set; } + + } +} diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogConfiguration.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogConfiguration.cs new file mode 100644 index 000000000000..d3909032d1de --- /dev/null +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogConfiguration.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SignalR.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Resource log configuration of a Microsoft.SignalRService resource. + /// + public partial class ResourceLogConfiguration + { + /// + /// Initializes a new instance of the ResourceLogConfiguration class. + /// + public ResourceLogConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceLogConfiguration class. + /// + /// Gets or sets the list of category + /// configurations. + public ResourceLogConfiguration(IList categories = default(IList)) + { + Categories = categories; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the list of category configurations. + /// + [JsonProperty(PropertyName = "categories")] + public IList Categories { get; set; } + + } +} diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ScaleType.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ScaleType.cs new file mode 100644 index 000000000000..650161418300 --- /dev/null +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ScaleType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SignalR.Models +{ + + /// + /// Defines values for ScaleType. + /// + public static class ScaleType + { + public const string None = "None"; + public const string Manual = "Manual"; + public const string Automatic = "Automatic"; + } +} diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRResource.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRResource.cs index 7caa9f303513..e6c641346a66 100644 --- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRResource.cs +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRResource.cs @@ -63,6 +63,7 @@ public SignalRResource() /// The list of shared private /// link resources. /// TLS settings. + /// Deprecated. /// List of the featureFlags. /// /// FeatureFlags that are not included in the parameters for the update @@ -73,6 +74,13 @@ public SignalRResource() /// value will be used /// But keep in mind, the default value doesn't mean "false". It varies /// in terms of different FeatureFlags. + /// Resource log configuration + /// of a Microsoft.SignalRService resource. + /// If resourceLogConfiguration isn't null or empty, it will override + /// options "EnableConnectivityLog" and "EnableMessagingLogs" in + /// features. + /// Otherwise, use options "EnableConnectivityLog" and + /// "EnableMessagingLogs" in features. /// Cross-Origin Resource Sharing (CORS) /// settings. /// Upstream settings when the service is in @@ -86,7 +94,7 @@ public SignalRResource() /// DisableLocalAuth /// Enable or disable local auth with AccessKey /// When set as true, connection with AccessKey=xxx won't work. - /// disableAadAuth + /// DisableLocalAuth /// Enable or disable aad auth /// When set as true, connection with AuthType=aad won't work. /// The kind of the service - e.g. "SignalR" for @@ -95,7 +103,7 @@ public SignalRResource() /// The managed identity response /// Metadata pertaining to creation and last /// modification of the resource. - public SignalRResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ResourceSku sku = default(ResourceSku), string provisioningState = default(string), string externalIP = default(string), string hostName = default(string), int? publicPort = default(int?), int? serverPort = default(int?), string version = default(string), IList privateEndpointConnections = default(IList), IList sharedPrivateLinkResources = default(IList), SignalRTlsSettings tls = default(SignalRTlsSettings), IList features = default(IList), SignalRCorsSettings cors = default(SignalRCorsSettings), ServerlessUpstreamSettings upstream = default(ServerlessUpstreamSettings), SignalRNetworkACLs networkACLs = default(SignalRNetworkACLs), string publicNetworkAccess = default(string), bool? disableLocalAuth = default(bool?), bool? disableAadAuth = default(bool?), string kind = default(string), ManagedIdentity identity = default(ManagedIdentity), SystemData systemData = default(SystemData)) + public SignalRResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ResourceSku sku = default(ResourceSku), string provisioningState = default(string), string externalIP = default(string), string hostName = default(string), int? publicPort = default(int?), int? serverPort = default(int?), string version = default(string), IList privateEndpointConnections = default(IList), IList sharedPrivateLinkResources = default(IList), SignalRTlsSettings tls = default(SignalRTlsSettings), string hostNamePrefix = default(string), IList features = default(IList), ResourceLogConfiguration resourceLogConfiguration = default(ResourceLogConfiguration), SignalRCorsSettings cors = default(SignalRCorsSettings), ServerlessUpstreamSettings upstream = default(ServerlessUpstreamSettings), SignalRNetworkACLs networkACLs = default(SignalRNetworkACLs), string publicNetworkAccess = default(string), bool? disableLocalAuth = default(bool?), bool? disableAadAuth = default(bool?), string kind = default(string), ManagedIdentity identity = default(ManagedIdentity), SystemData systemData = default(SystemData)) : base(id, name, type, location, tags) { Sku = sku; @@ -108,7 +116,9 @@ public SignalRResource() PrivateEndpointConnections = privateEndpointConnections; SharedPrivateLinkResources = sharedPrivateLinkResources; Tls = tls; + HostNamePrefix = hostNamePrefix; Features = features; + ResourceLogConfiguration = resourceLogConfiguration; Cors = cors; Upstream = upstream; NetworkACLs = networkACLs; @@ -192,6 +202,12 @@ public SignalRResource() [JsonProperty(PropertyName = "properties.tls")] public SignalRTlsSettings Tls { get; set; } + /// + /// Gets deprecated. + /// + [JsonProperty(PropertyName = "properties.hostNamePrefix")] + public string HostNamePrefix { get; private set; } + /// /// Gets or sets list of the featureFlags. /// @@ -207,6 +223,18 @@ public SignalRResource() [JsonProperty(PropertyName = "properties.features")] public IList Features { get; set; } + /// + /// Gets or sets resource log configuration of a + /// Microsoft.SignalRService resource. + /// If resourceLogConfiguration isn't null or empty, it will override + /// options "EnableConnectivityLog" and "EnableMessagingLogs" in + /// features. + /// Otherwise, use options "EnableConnectivityLog" and + /// "EnableMessagingLogs" in features. + /// + [JsonProperty(PropertyName = "properties.resourceLogConfiguration")] + public ResourceLogConfiguration ResourceLogConfiguration { get; set; } + /// /// Gets or sets cross-Origin Resource Sharing (CORS) settings. /// @@ -245,7 +273,7 @@ public SignalRResource() public bool? DisableLocalAuth { get; set; } /// - /// Gets or sets disableAadAuth + /// Gets or sets disableLocalAuth /// Enable or disable aad auth /// When set as true, connection with AuthType=aad won't work. /// diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/Sku.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/Sku.cs new file mode 100644 index 000000000000..a3494434b633 --- /dev/null +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/Sku.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SignalR.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Describes an available sku." + /// + public partial class Sku + { + /// + /// Initializes a new instance of the Sku class. + /// + public Sku() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Sku class. + /// + /// The resource type that this object + /// applies to + /// The exact set of keys that define this + /// sku. + /// Specifies the unit of the resource. + public Sku(string resourceType = default(string), ResourceSku skuProperty = default(ResourceSku), SkuCapacity capacity = default(SkuCapacity)) + { + ResourceType = resourceType; + SkuProperty = skuProperty; + Capacity = capacity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the resource type that this object applies to + /// + [JsonProperty(PropertyName = "resourceType")] + public string ResourceType { get; private set; } + + /// + /// Gets the exact set of keys that define this sku. + /// + [JsonProperty(PropertyName = "sku")] + public ResourceSku SkuProperty { get; private set; } + + /// + /// Gets specifies the unit of the resource. + /// + [JsonProperty(PropertyName = "capacity")] + public SkuCapacity Capacity { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SkuProperty != null) + { + SkuProperty.Validate(); + } + } + } +} diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuCapacity.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuCapacity.cs new file mode 100644 index 000000000000..c99f0f6c1b73 --- /dev/null +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuCapacity.cs @@ -0,0 +1,89 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SignalR.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Describes scaling information of a sku. + /// + public partial class SkuCapacity + { + /// + /// Initializes a new instance of the SkuCapacity class. + /// + public SkuCapacity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SkuCapacity class. + /// + /// The lowest permitted capacity for this + /// resource + /// The highest permitted capacity for this + /// resource + /// The default capacity. + /// Allows capacity value list. + /// The scale type applicable to the sku. + /// Possible values include: 'None', 'Manual', 'Automatic' + public SkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? defaultProperty = default(int?), IList allowedValues = default(IList), string scaleType = default(string)) + { + Minimum = minimum; + Maximum = maximum; + DefaultProperty = defaultProperty; + AllowedValues = allowedValues; + ScaleType = scaleType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the lowest permitted capacity for this resource + /// + [JsonProperty(PropertyName = "minimum")] + public int? Minimum { get; private set; } + + /// + /// Gets the highest permitted capacity for this resource + /// + [JsonProperty(PropertyName = "maximum")] + public int? Maximum { get; private set; } + + /// + /// Gets the default capacity. + /// + [JsonProperty(PropertyName = "default")] + public int? DefaultProperty { get; private set; } + + /// + /// Gets allows capacity value list. + /// + [JsonProperty(PropertyName = "allowedValues")] + public IList AllowedValues { get; private set; } + + /// + /// Gets the scale type applicable to the sku. Possible values include: + /// 'None', 'Manual', 'Automatic' + /// + [JsonProperty(PropertyName = "scaleType")] + public string ScaleType { get; private set; } + + } +} diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuList.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuList.cs new file mode 100644 index 000000000000..8d8780791aa5 --- /dev/null +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuList.cs @@ -0,0 +1,66 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SignalR.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The list skus operation response + /// + public partial class SkuList + { + /// + /// Initializes a new instance of the SkuList class. + /// + public SkuList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SkuList class. + /// + /// The list of skus available for the + /// resource. + /// The URL the client should use to fetch the + /// next page (per server side paging). + /// It's null for now, added for future use. + public SkuList(IList value = default(IList), string nextLink = default(string)) + { + Value = value; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the list of skus available for the resource. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; private set; } + + /// + /// Gets the URL the client should use to fetch the next page (per + /// server side paging). + /// It's null for now, added for future use. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; private set; } + + } +} diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SdkInfo_SignalRManagementClient.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SdkInfo_SignalRManagementClient.cs index 9bd24ec5d02a..904718024495 100644 --- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SdkInfo_SignalRManagementClient.cs +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SdkInfo_SignalRManagementClient.cs @@ -19,25 +19,14 @@ public static IEnumerable> ApiInfo_SignalRManageme { return new Tuple[] { - new Tuple("SignalRService", "Operations", "2021-06-01-preview"), - new Tuple("SignalRService", "SignalR", "2021-06-01-preview"), - new Tuple("SignalRService", "SignalRPrivateEndpointConnections", "2021-06-01-preview"), - new Tuple("SignalRService", "SignalRPrivateLinkResources", "2021-06-01-preview"), - new Tuple("SignalRService", "SignalRSharedPrivateLinkResources", "2021-06-01-preview"), - new Tuple("SignalRService", "Usages", "2021-06-01-preview"), + new Tuple("SignalRService", "Operations", "2021-10-01"), + new Tuple("SignalRService", "SignalR", "2021-10-01"), + new Tuple("SignalRService", "SignalRPrivateEndpointConnections", "2021-10-01"), + new Tuple("SignalRService", "SignalRPrivateLinkResources", "2021-10-01"), + new Tuple("SignalRService", "SignalRSharedPrivateLinkResources", "2021-10-01"), + new Tuple("SignalRService", "Usages", "2021-10-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/signalr/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Users\\biqian\\source\\repos\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "9705c3528da31ea3def2acf3af715ae1f185e318"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRManagementClient.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRManagementClient.cs index 7241c7ee4921..d1345b8c6d79 100644 --- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRManagementClient.cs +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRManagementClient.cs @@ -354,7 +354,7 @@ private void Initialize() SignalRPrivateLinkResources = new SignalRPrivateLinkResourcesOperations(this); SignalRSharedPrivateLinkResources = new SignalRSharedPrivateLinkResourcesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-06-01-preview"; + ApiVersion = "2021-10-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperations.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperations.cs index 36cdc8d4fe59..786b88830d6c 100644 --- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperations.cs +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperations.cs @@ -1115,6 +1115,198 @@ internal SignalROperations(SignalRManagementClient client) return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// List all available skus of the resource. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListSkusWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListSkus", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/skus").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Create or update a resource. /// diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperationsExtensions.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperationsExtensions.cs index 7a490b7b9d65..345719b66bad 100644 --- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperationsExtensions.cs +++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperationsExtensions.cs @@ -433,6 +433,48 @@ public static void Restart(this ISignalROperations operations, string resourceGr (await operations.RestartWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// List all available skus of the resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the resource. + /// + public static SkuList ListSkus(this ISignalROperations operations, string resourceGroupName, string resourceName) + { + return operations.ListSkusAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// List all available skus of the resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the resource. + /// + /// + /// The cancellation token. + /// + public static async Task ListSkusAsync(this ISignalROperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListSkusWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Create or update a resource. ///