Example #1
0
 /// <summary>
 /// Get the storage resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='storageName'>
 /// The name of the storage resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <StorageResource> GetAsync(this IStoragesOperations operations, string resourceGroupName, string serviceName, string storageName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, storageName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #2
0
 /// <summary>
 /// List all the storages of one Azure Spring Cloud instance.
 /// </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 <StorageResource> > ListNextAsync(this IStoragesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #3
0
 /// <summary>
 /// Create or update storage resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='storageName'>
 /// The name of the storage resource.
 /// </param>
 /// <param name='storageResource'>
 /// Parameters for the create or update operation
 /// </param>
 public static StorageResource CreateOrUpdate(this IStoragesOperations operations, string resourceGroupName, string serviceName, string storageName, StorageResource storageResource)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, storageName, storageResource).GetAwaiter().GetResult());
 }
Example #4
0
 /// <summary>
 /// Get the storage resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='storageName'>
 /// The name of the storage resource.
 /// </param>
 public static StorageResource Get(this IStoragesOperations operations, string resourceGroupName, string serviceName, string storageName)
 {
     return(operations.GetAsync(resourceGroupName, serviceName, storageName).GetAwaiter().GetResult());
 }
Example #5
0
 /// <summary>
 /// List all the storages of one Azure Spring Cloud instance.
 /// </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 <StorageResource> ListNext(this IStoragesOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Example #6
0
 /// <summary>
 /// Delete the storage resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='storageName'>
 /// The name of the storage resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IStoragesOperations operations, string resourceGroupName, string serviceName, string storageName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serviceName, storageName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Example #7
0
 /// <summary>
 /// Delete the storage resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='storageName'>
 /// The name of the storage resource.
 /// </param>
 public static void BeginDelete(this IStoragesOperations operations, string resourceGroupName, string serviceName, string storageName)
 {
     operations.BeginDeleteAsync(resourceGroupName, serviceName, storageName).GetAwaiter().GetResult();
 }