/// <summary> /// List the object replication policies associated with the 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. The name is /// case insensitive. /// </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 <IEnumerable <ObjectReplicationPolicy> > ListAsync(this IObjectReplicationPoliciesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create or update the object replication policy of the 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. The name is /// case insensitive. /// </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='objectReplicationPolicyId'> /// The ID of object replication policy or 'default' if the policy ID is /// unknown. /// </param> /// <param name='properties'> /// The object replication policy set to a storage account. A unique policy ID /// will be created if absent. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ObjectReplicationPolicy> CreateOrUpdateAsync(this IObjectReplicationPoliciesOperations operations, string resourceGroupName, string accountName, string objectReplicationPolicyId, ObjectReplicationPolicy properties, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, objectReplicationPolicyId, properties, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get the object replication policy of the storage account by policy ID. /// </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. The name is /// case insensitive. /// </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='objectReplicationPolicyId'> /// The ID of object replication policy or 'default' if the policy ID is /// unknown. /// </param> public static ObjectReplicationPolicy Get(this IObjectReplicationPoliciesOperations operations, string resourceGroupName, string accountName, string objectReplicationPolicyId) { return(operations.GetAsync(resourceGroupName, accountName, objectReplicationPolicyId).GetAwaiter().GetResult()); }
/// <summary> /// List the object replication policies associated with the 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. The name is /// case insensitive. /// </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 IEnumerable <ObjectReplicationPolicy> List(this IObjectReplicationPoliciesOperations operations, string resourceGroupName, string accountName) { return(operations.ListAsync(resourceGroupName, accountName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the object replication policy associated with 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. The name is /// case insensitive. /// </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='objectReplicationPolicyId'> /// The ID of object replication policy or 'default' if the policy ID is /// unknown. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IObjectReplicationPoliciesOperations operations, string resourceGroupName, string accountName, string objectReplicationPolicyId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, objectReplicationPolicyId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes the object replication policy associated with 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. The name is /// case insensitive. /// </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='objectReplicationPolicyId'> /// The ID of object replication policy or 'default' if the policy ID is /// unknown. /// </param> public static void Delete(this IObjectReplicationPoliciesOperations operations, string resourceGroupName, string accountName, string objectReplicationPolicyId) { operations.DeleteAsync(resourceGroupName, accountName, objectReplicationPolicyId).GetAwaiter().GetResult(); }
/// <summary> /// Create or update the object replication policy of the 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. The name is /// case insensitive. /// </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='objectReplicationPolicyId'> /// The ID of object replication policy or 'default' if the policy ID is /// unknown. /// </param> /// <param name='properties'> /// The object replication policy set to a storage account. A unique policy ID /// will be created if absent. /// </param> public static ObjectReplicationPolicy CreateOrUpdate(this IObjectReplicationPoliciesOperations operations, string resourceGroupName, string accountName, string objectReplicationPolicyId, ObjectReplicationPolicy properties) { return(operations.CreateOrUpdateAsync(resourceGroupName, accountName, objectReplicationPolicyId, properties).GetAwaiter().GetResult()); }