/// <summary>
 /// Sets the properties of a storage account’s Blob service, including
 /// properties for Storage Analytics and CORS (Cross-Origin Resource Sharing)
 /// rules.
 /// </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='parameters'>
 /// The properties of a storage account’s Blob service, including properties
 /// for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <BlobServiceProperties> SetServicePropertiesAsync(this IBlobServicesOperations operations, string resourceGroupName, string accountName, BlobServiceProperties parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.SetServicePropertiesWithHttpMessagesAsync(resourceGroupName, accountName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Returns the BLOB service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource group name.
 /// </param>
 /// <param name='farmId'>
 /// Farm Id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <BlobService> GetAsync(this IBlobServicesOperations operations, string resourceGroupName, string farmId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, farmId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #3
0
 /// <summary>
 /// Returns a list of metrics for BLOB service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Metric> > ListMetricsNextAsync(this IBlobServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListMetricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #4
0
        public async Task <Microsoft.Azure.Management.Storage.Fluent.IBlobServiceProperties> UpdateResourceAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            IBlobServicesOperations    client = this.manager.Inner.BlobServices;
            BlobServicePropertiesInner blobServicePropertiesInner = await client.SetServicePropertiesAsync(this.resourceGroupName, this.accountName, this.Inner);

            return(new BlobServicePropertiesImpl(blobServicePropertiesInner, this.manager));
        }
Exemple #5
0
 /// <summary>
 /// Returns the list of metric definitions for BLOB service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource group name.
 /// </param>
 /// <param name='farmId'>
 /// Farm Id.
 /// </param>
 public static IPage <MetricDefinition> ListMetricDefinitions(this IBlobServicesOperations operations, string resourceGroupName, string farmId)
 {
     return(operations.ListMetricDefinitionsAsync(resourceGroupName, farmId).GetAwaiter().GetResult());
 }
Exemple #6
0
 /// <summary>
 /// Returns the BLOB service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource group name.
 /// </param>
 /// <param name='farmId'>
 /// Farm Id.
 /// </param>
 public static BlobService Get(this IBlobServicesOperations operations, string resourceGroupName, string farmId)
 {
     return(operations.GetAsync(resourceGroupName, farmId).GetAwaiter().GetResult());
 }
Exemple #7
0
 /// <summary>
 /// Returns a list of metrics for BLOB service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Metric> ListMetricsNext(this IBlobServicesOperations operations, string nextPageLink)
 {
     return(operations.ListMetricsNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the properties of a storage account’s Blob service, including
 /// properties for Storage Analytics and CORS (Cross-Origin Resource Sharing)
 /// rules.
 /// </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 BlobServiceProperties GetServiceProperties(this IBlobServicesOperations operations, string resourceGroupName, string accountName)
 {
     return(operations.GetServicePropertiesAsync(resourceGroupName, accountName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List blob services of storage account. It returns a collection of one
 /// object named default.
 /// </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 <BlobServiceProperties> List(this IBlobServicesOperations operations, string resourceGroupName, string accountName)
 {
     return(operations.ListAsync(resourceGroupName, accountName).GetAwaiter().GetResult());
 }
Exemple #10
0
        protected override async Task <BlobServicePropertiesInner> GetInnerAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            IBlobServicesOperations client = this.manager.Inner.BlobServices;

            return(await client.GetServicePropertiesAsync(this.resourceGroupName, this.accountName));
        }