コード例 #1
0
 /// <summary>
 /// Deletes a share
 /// </summary>
 /// <remarks>
 /// Delete a share
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 /// <param name='shareName'>
 /// The name of the share.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <OperationResponse> BeginDeleteAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Lists all the shares in a Data Box Edge/Data Box Gateway device.
 /// </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 <Share> > ListByDataBoxEdgeDeviceNextAsync(this ISharesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDataBoxEdgeDeviceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #3
0
 /// <summary>
 /// List of available shares under an account.
 /// </summary>
 /// <remarks>
 /// List shares in an account
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 /// <param name='skipToken'>
 /// Continuation Token
 /// </param>
 /// <param name='filter'>
 /// Filters the results using OData syntax.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results using OData syntax.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Share> > ListByAccountAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string filter = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, skipToken, filter, orderby, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #4
0
 /// <summary>
 /// Creates a new share or updates an existing share on the device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The share name.
 /// </param>
 /// <param name='share'>
 /// The share properties.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Share> BeginCreateOrUpdateAsync(this ISharesOperations operations, string deviceName, string name, Share share, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(deviceName, name, share, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #5
0
 /// <summary>
 /// Returns a list of storage shares.
 /// </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 <IList <Share> > ListAsync(this ISharesOperations operations, string resourceGroupName, string farmId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, farmId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #6
0
 /// <summary>
 /// Lists all the shares in a Data Box Edge/Data Box Gateway device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Share> > ListByDataBoxEdgeDeviceAsync(this ISharesOperations operations, string deviceName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDataBoxEdgeDeviceWithHttpMessagesAsync(deviceName, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #7
0
 /// <summary>
 /// Lists all the shares in a Data Box Edge/Data Box Gateway device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static IPage <Share> ListByDataBoxEdgeDevice(this ISharesOperations operations, string deviceName, string resourceGroupName)
 {
     return(operations.ListByDataBoxEdgeDeviceAsync(deviceName, resourceGroupName).GetAwaiter().GetResult());
 }
コード例 #8
0
 /// <summary>
 /// Creates a new share or updates an existing share on the device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The share name.
 /// </param>
 /// <param name='share'>
 /// The share properties.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static Share BeginCreateOrUpdate(this ISharesOperations operations, string deviceName, string name, Share share, string resourceGroupName)
 {
     return(operations.BeginCreateOrUpdateAsync(deviceName, name, share, resourceGroupName).GetAwaiter().GetResult());
 }
コード例 #9
0
 /// <summary>
 /// Deletes the share on the Data Box Edge/Data Box Gateway device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The share name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static void Delete(this ISharesOperations operations, string deviceName, string name, string resourceGroupName)
 {
     operations.DeleteAsync(deviceName, name, resourceGroupName).GetAwaiter().GetResult();
 }
コード例 #10
0
 /// <summary>
 /// List data set level details for a share synchronization
 /// </summary>
 /// <remarks>
 /// List synchronization details
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 /// <param name='shareName'>
 /// The name of the share.
 /// </param>
 /// <param name='shareSynchronization'>
 /// Share Synchronization payload.
 /// </param>
 /// <param name='skipToken'>
 /// Continuation token
 /// </param>
 /// <param name='filter'>
 /// Filters the results using OData syntax.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results using OData syntax.
 /// </param>
 public static IPage <SynchronizationDetails> ListSynchronizationDetails(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, ShareSynchronization shareSynchronization, string skipToken = default(string), string filter = default(string), string orderby = default(string))
 {
     return(operations.ListSynchronizationDetailsAsync(resourceGroupName, accountName, shareName, shareSynchronization, skipToken, filter, orderby).GetAwaiter().GetResult());
 }
コード例 #11
0
 /// <summary>
 /// Lists all the shares in a Data Box Edge/Data Box Gateway device.
 /// </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 <Share> ListByDataBoxEdgeDeviceNext(this ISharesOperations operations, string nextPageLink)
 {
     return(operations.ListByDataBoxEdgeDeviceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
コード例 #12
0
 /// <summary>
 /// Deletes a share
 /// </summary>
 /// <remarks>
 /// Delete a share
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 /// <param name='shareName'>
 /// The name of the share.
 /// </param>
 public static OperationResponse BeginDelete(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName)
 {
     return(operations.BeginDeleteAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult());
 }
コード例 #13
0
 /// <summary>
 /// List of available shares under an account.
 /// </summary>
 /// <remarks>
 /// List shares in an account
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 /// <param name='skipToken'>
 /// Continuation Token
 /// </param>
 /// <param name='filter'>
 /// Filters the results using OData syntax.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results using OData syntax.
 /// </param>
 public static IPage <Share> ListByAccount(this ISharesOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string filter = default(string), string orderby = default(string))
 {
     return(operations.ListByAccountAsync(resourceGroupName, accountName, skipToken, filter, orderby).GetAwaiter().GetResult());
 }
コード例 #14
0
 /// <summary>
 /// Create a share in the given account.
 /// </summary>
 /// <remarks>
 /// Create a share
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 /// <param name='shareName'>
 /// The name of the share.
 /// </param>
 /// <param name='share'>
 /// The share payload
 /// </param>
 public static Share Create(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, Share share)
 {
     return(operations.CreateAsync(resourceGroupName, accountName, shareName, share).GetAwaiter().GetResult());
 }
コード例 #15
0
 /// <summary>
 /// List data set level details for a share synchronization
 /// </summary>
 /// <remarks>
 /// List synchronization details
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 /// <param name='shareName'>
 /// The name of the share.
 /// </param>
 /// <param name='shareSynchronization'>
 /// Share Synchronization payload.
 /// </param>
 /// <param name='skipToken'>
 /// Continuation token
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SynchronizationDetails> > ListSynchronizationDetailsAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, ShareSynchronization shareSynchronization, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListSynchronizationDetailsWithHttpMessagesAsync(resourceGroupName, accountName, shareName, shareSynchronization, skipToken, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #16
0
 /// <summary>
 /// List Synchronizations in a share
 /// </summary>
 /// <remarks>
 /// List synchronizations of a share
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 /// <param name='shareName'>
 /// The name of the share.
 /// </param>
 /// <param name='skipToken'>
 /// Continuation token
 /// </param>
 public static IPage <ShareSynchronization> ListSynchronizations(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string))
 {
     return(operations.ListSynchronizationsAsync(resourceGroupName, accountName, shareName, skipToken).GetAwaiter().GetResult());
 }
コード例 #17
0
 /// <summary>
 /// Returns a list of metrics for a storage share.
 /// </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='shareName'>
 /// Share name.
 /// </param>
 public static IPage <Metric> ListMetrics(this ISharesOperations operations, string resourceGroupName, string farmId, string shareName)
 {
     return(operations.ListMetricsAsync(resourceGroupName, farmId, shareName).GetAwaiter().GetResult());
 }
コード例 #18
0
 /// <summary>
 /// Refreshes the share metadata with the data from the cloud.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The share name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static void BeginRefresh(this ISharesOperations operations, string deviceName, string name, string resourceGroupName)
 {
     operations.BeginRefreshAsync(deviceName, name, resourceGroupName).GetAwaiter().GetResult();
 }
コード例 #19
0
 /// <summary>
 /// Refreshes the share metadata with the data from the cloud.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The share name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginRefreshAsync(this ISharesOperations operations, string deviceName, string name, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginRefreshWithHttpMessagesAsync(deviceName, name, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #20
0
 /// <summary>
 /// Returns a list of metric definitions for a storage share.
 /// </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 <MetricDefinition> ListMetricDefinitionsNext(this ISharesOperations operations, string nextPageLink)
 {
     return(operations.ListMetricDefinitionsNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
コード例 #21
0
 /// <summary>
 /// List Synchronizations in a share
 /// </summary>
 /// <remarks>
 /// List synchronizations of a share
 /// </remarks>
 /// <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 <ShareSynchronization> ListSynchronizationsNext(this ISharesOperations operations, string nextPageLink)
 {
     return(operations.ListSynchronizationsNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
コード例 #22
0
 /// <summary>
 /// Returns a list of storage shares.
 /// </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 IList <Share> List(this ISharesOperations operations, string resourceGroupName, string farmId)
 {
     return(operations.ListAsync(resourceGroupName, farmId).GetAwaiter().GetResult());
 }
コード例 #23
0
 /// <summary>
 /// Gets a share by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The share name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static Share Get(this ISharesOperations operations, string deviceName, string name, string resourceGroupName)
 {
     return(operations.GetAsync(deviceName, name, resourceGroupName).GetAwaiter().GetResult());
 }
コード例 #24
0
 /// <summary>
 /// Returns a storage share.
 /// </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='shareName'>
 /// Share name.
 /// </param>
 public static Share Get(this ISharesOperations operations, string resourceGroupName, string farmId, string shareName)
 {
     return(operations.GetAsync(resourceGroupName, farmId, shareName).GetAwaiter().GetResult());
 }