Skip to content

Commit

Permalink
.NET SDK Resource Provider:'IotHub'
Browse files Browse the repository at this point in the history
REST Spec PR 'Azure/azure-rest-api-specs#5544'
REST Spec PR Author 'reshantchandra'
REST Spec PR Last commit
  • Loading branch information
adxsdknet committed Apr 8, 2019
1 parent b943018 commit afb14f0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ namespace Microsoft.Azure.Management.IotHub
public partial interface IIotHubOperations
{
/// <summary>
/// Customer Initiated Fail over
/// Manual Failover Fail over
/// </summary>
/// <remarks>
/// Perform customer initiated fail over of given hub
/// Perform manual fail over of given hub
/// </remarks>
/// <param name='iotHubName'>
/// IotHub to fail over
/// </param>
/// <param name='failoverInput'>
/// Region it will failover to
/// Region to failover to. Must be a azure DR pair
/// </param>
/// <param name='resourceGroupName'>
/// resource group which Iot Hub belongs to
Expand All @@ -53,6 +53,6 @@ public partial interface IIotHubOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IotHubDescription>> CustomerInitiatedFailoverWithHttpMessagesAsync(string iotHubName, FailoverInput failoverInput, string resourceGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<IotHubDescription>> ManualFailoverWithHttpMessagesAsync(string iotHubName, FailoverInput failoverInput, string resourceGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
10 changes: 5 additions & 5 deletions src/SDKs/IotHub/Management.IotHub/Generated/IotHubOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ internal IotHubOperations(IotHubClient client)
public IotHubClient Client { get; private set; }

/// <summary>
/// Customer Initiated Fail over
/// Manual Failover Fail over
/// </summary>
/// <remarks>
/// Perform customer initiated fail over of given hub
/// Perform manual fail over of given hub
/// </remarks>
/// <param name='iotHubName'>
/// IotHub to fail over
/// </param>
/// <param name='failoverInput'>
/// Region it will failover to
/// Region to failover to. Must be a azure DR pair
/// </param>
/// <param name='resourceGroupName'>
/// resource group which Iot Hub belongs to
Expand All @@ -86,7 +86,7 @@ internal IotHubOperations(IotHubClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<IotHubDescription>> CustomerInitiatedFailoverWithHttpMessagesAsync(string iotHubName, FailoverInput failoverInput, string resourceGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<IotHubDescription>> ManualFailoverWithHttpMessagesAsync(string iotHubName, FailoverInput failoverInput, string resourceGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (iotHubName == null)
{
Expand Down Expand Up @@ -123,7 +123,7 @@ internal IotHubOperations(IotHubClient client)
tracingParameters.Add("failoverInput", failoverInput);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "CustomerInitiatedFailover", tracingParameters);
ServiceClientTracing.Enter(_invocationId, this, "ManualFailover", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ namespace Microsoft.Azure.Management.IotHub
public static partial class IotHubOperationsExtensions
{
/// <summary>
/// Customer Initiated Fail over
/// Manual Failover Fail over
/// </summary>
/// <remarks>
/// Perform customer initiated fail over of given hub
/// Perform manual fail over of given hub
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -34,21 +34,21 @@ public static partial class IotHubOperationsExtensions
/// IotHub to fail over
/// </param>
/// <param name='failoverInput'>
/// Region it will failover to
/// Region to failover to. Must be a azure DR pair
/// </param>
/// <param name='resourceGroupName'>
/// resource group which Iot Hub belongs to
/// </param>
public static IotHubDescription CustomerInitiatedFailover(this IIotHubOperations operations, string iotHubName, FailoverInput failoverInput, string resourceGroupName)
public static IotHubDescription ManualFailover(this IIotHubOperations operations, string iotHubName, FailoverInput failoverInput, string resourceGroupName)
{
return operations.CustomerInitiatedFailoverAsync(iotHubName, failoverInput, resourceGroupName).GetAwaiter().GetResult();
return operations.ManualFailoverAsync(iotHubName, failoverInput, resourceGroupName).GetAwaiter().GetResult();
}

/// <summary>
/// Customer Initiated Fail over
/// Manual Failover Fail over
/// </summary>
/// <remarks>
/// Perform customer initiated fail over of given hub
/// Perform manual fail over of given hub
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -57,17 +57,17 @@ public static IotHubDescription CustomerInitiatedFailover(this IIotHubOperations
/// IotHub to fail over
/// </param>
/// <param name='failoverInput'>
/// Region it will failover to
/// Region to failover to. Must be a azure DR pair
/// </param>
/// <param name='resourceGroupName'>
/// resource group which Iot Hub belongs to
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IotHubDescription> CustomerInitiatedFailoverAsync(this IIotHubOperations operations, string iotHubName, FailoverInput failoverInput, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<IotHubDescription> ManualFailoverAsync(this IIotHubOperations operations, string iotHubName, FailoverInput failoverInput, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CustomerInitiatedFailoverWithHttpMessagesAsync(iotHubName, failoverInput, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.ManualFailoverWithHttpMessagesAsync(iotHubName, failoverInput, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ namespace Microsoft.Azure.Management.IotHub.Models
using System.Linq;

/// <summary>
/// Use to provide failover region when requesting Customer Initiated Fail
/// over for a hub.
/// Use to provide failover region when requesting manual Failover for a
/// hub.
/// </summary>
public partial class FailoverInput
{
Expand Down

0 comments on commit afb14f0

Please sign in to comment.