/// <summary> /// Regenerate either the primary or secondary key for use with the Location /// Based Services APIs. The old key will stop working immediately. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the Azure Resource Group. /// </param> /// <param name='accountName'> /// The name of the Location Based Services Account. /// </param> /// <param name='keySpecification'> /// Which key to regenerate: primary or secondary. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LocationBasedServicesAccountKeys> RegenerateKeysAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, LocationBasedServicesKeySpecification keySpecification, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.RegenerateKeysWithHttpMessagesAsync(resourceGroupName, accountName, keySpecification, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Regenerate either the primary or secondary key for use with the Location /// Based Services APIs. The old key will stop working immediately. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the Azure Resource Group. /// </param> /// <param name='accountName'> /// The name of the Location Based Services Account. /// </param> /// <param name='keySpecification'> /// Which key to regenerate: primary or secondary. /// </param> public static LocationBasedServicesAccountKeys RegenerateKeys(this IAccountsOperations operations, string resourceGroupName, string accountName, LocationBasedServicesKeySpecification keySpecification) { return(operations.RegenerateKeysAsync(resourceGroupName, accountName, keySpecification).GetAwaiter().GetResult()); }