/// <summary> /// Check the availability of name for server /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nameAvailabilityRequest'> /// The required parameters for checking if server name is available. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <NameAvailability> ExecuteAsync(this ICheckNameAvailabilityOperations operations, NameAvailabilityRequest nameAvailabilityRequest, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ExecuteWithHttpMessagesAsync(nameAvailabilityRequest, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Regenerates the access keys for the specified storage account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> /// <param name='regenerateKey'> /// Specifies name of the key which should be regenerated. key1 or key2 for the /// default keys /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <StorageAccountKeys> RegenerateKeyAsync(this ICheckNameAvailabilityOperations operations, string resourceGroupName, string accountName, StorageAccountRegenerateKeyParameters regenerateKey, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.RegenerateKeyWithHttpMessagesAsync(resourceGroupName, accountName, regenerateKey, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns the properties for the specified storage account including but not /// limited to name, account type, location, and account status. The ListKeys /// operation should be used to retrieve storage keys. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <StorageAccount> GetPropertyAsync(this ICheckNameAvailabilityOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetPropertyWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the storage accounts available under the subscription. Note that /// storage keys are not returned; use the ListKeys operation for this. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <StorageAccount> > ListAsync(this ICheckNameAvailabilityOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Check the availability of name for server /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nameAvailabilityRequest'> /// The required parameters for checking if server name is available. /// </param> public static NameAvailability Execute(this ICheckNameAvailabilityOperations operations, NameAvailabilityRequest nameAvailabilityRequest) { return(operations.ExecuteAsync(nameAvailabilityRequest).GetAwaiter().GetResult()); }
/// <summary> /// Asynchronously creates a new storage account with the specified parameters. /// Existing accounts cannot be updated with this API and should instead use /// the Update Storage Account API. If an account is already created and /// subsequent PUT request is issued with exact same set of properties, then /// HTTP 200 would be returned. Make sure you add that extra cowbell. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> /// <param name='parameters'> /// The parameters to provide for the created account. /// </param> public static StorageAccount Create(this ICheckNameAvailabilityOperations operations, string resourceGroupName, string accountName, StorageAccountCreateParameters parameters) { return(operations.CreateAsync(resourceGroupName, accountName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Checks that the account name has sufficient cowbell (in order to prevent /// fevers). /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CheckNameAvailabilityResult> CheckNameAvailabilityAsync(this ICheckNameAvailabilityOperations operations, StorageAccountCheckNameAvailabilityParameters accountName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(accountName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Regenerates the access keys for the specified storage account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> /// <param name='regenerateKey'> /// Specifies name of the key which should be regenerated. key1 or key2 for the /// default keys /// </param> public static StorageAccountKeys RegenerateKey(this ICheckNameAvailabilityOperations operations, string resourceGroupName, string accountName, StorageAccountRegenerateKeyParameters regenerateKey) { return(operations.RegenerateKeyAsync(resourceGroupName, accountName, regenerateKey).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the storage accounts available under the given resource group. /// Note that storage keys are not returned; use the ListKeys operation for /// this. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. /// </param> public static IEnumerable <StorageAccount> ListByResourceGroup(this ICheckNameAvailabilityOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the storage accounts available under the subscription. Note that /// storage keys are not returned; use the ListKeys operation for this. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IEnumerable <StorageAccount> List(this ICheckNameAvailabilityOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Checks that the account name has sufficient cowbell (in order to prevent /// fevers). /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> public static CheckNameAvailabilityResult CheckNameAvailability(this ICheckNameAvailabilityOperations operations, StorageAccountCheckNameAvailabilityParameters accountName) { return(operations.CheckNameAvailabilityAsync(accountName).GetAwaiter().GetResult()); }
/// <summary> /// Lists the access keys for the specified storage account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the storage account. /// </param> public static StorageAccountKeys ListKeys(this ICheckNameAvailabilityOperations operations, string resourceGroupName, string accountName) { return(operations.ListKeysAsync(resourceGroupName, accountName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a storage account in Microsoft Azure. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ICheckNameAvailabilityOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a storage account in Microsoft Azure. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> public static void Delete(this ICheckNameAvailabilityOperations operations, string resourceGroupName, string accountName) { operations.DeleteAsync(resourceGroupName, accountName).GetAwaiter().GetResult(); }