/// <summary>
 /// Creates or updates the file server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='fileServerName'>
 /// The file server name.
 /// </param>
 /// <param name='fileServer'>
 /// The file server.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FileServer> BeginCreateOrUpdateAsync(this IFileServersOperations operations, string deviceName, string fileServerName, FileServer fileServer, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(deviceName, fileServerName, fileServer, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <summary>
 /// Creates a File Server in the given workspace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group to which the resource belongs.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace. Workspace names can only contain a combination
 /// of alphanumeric characters along with dash (-) and underscore (_). The name
 /// must be from 1 through 64 characters long.
 /// </param>
 /// <param name='fileServerName'>
 /// The name of the file server within the specified resource group. File
 /// server names can only contain a combination of alphanumeric characters
 /// along with dash (-) and underscore (_). The name must be from 1 through 64
 /// characters long.
 /// </param>
 /// <param name='parameters'>
 /// The parameters to provide for File Server creation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FileServer> CreateAsync(this IFileServersOperations operations, string resourceGroupName, string workspaceName, string fileServerName, FileServerCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, workspaceName, fileServerName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves all the file servers in a 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='managerName'>
 /// The manager name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <FileServer> > ListByDeviceAsync(this IFileServersOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDeviceWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #4
0
 /// <summary>
 /// Gets a formatted list of file servers and their properties associated
 /// within the specified resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group to which the resource belongs.
 /// </param>
 /// <param name='fileServersListByResourceGroupOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <FileServerInner> > ListByResourceGroupAsync(this IFileServersOperations operations, string resourceGroupName, FileServersListByResourceGroupOptionsInner fileServersListByResourceGroupOptions = default(FileServersListByResourceGroupOptionsInner), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, fileServersListByResourceGroupOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #5
0
 /// <summary>
 /// To list all the file servers available under the given subscription (and
 /// across all resource groups within that subscription)
 /// </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 <FileServerInner> > ListNextAsync(this IFileServersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the file server metrics.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The name of the device.
 /// </param>
 /// <param name='fileServerName'>
 /// The name of the file server name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <Metrics> > ListMetricsAsync(this IFileServersOperations operations, string deviceName, string fileServerName, string resourceGroupName, string managerName, ODataQuery <MetricFilter> odataQuery = default(ODataQuery <MetricFilter>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListMetricsWithHttpMessagesAsync(deviceName, fileServerName, resourceGroupName, managerName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #7
0
 /// <summary>
 /// Gets information about the specified Cluster.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group to which the resource belongs.
 /// </param>
 /// <param name='fileServerName'>
 /// The name of the file server within the specified resource group. File
 /// server names can only contain a combination of alphanumeric characters
 /// along with dash (-) and underscore (_). The name must be from 1 through 64
 /// characters long.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FileServerInner> GetAsync(this IFileServersOperations operations, string resourceGroupName, string fileServerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, fileServerName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations     = new Operations(this);
     Usage          = new UsageOperations(this);
     Clusters       = new ClustersOperations(this);
     Jobs           = new JobsOperations(this);
     FileServers    = new FileServersOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2018-03-01";
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
Пример #9
0
 /// <summary>
 /// Delete a file Server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group to which the resource belongs.
 /// </param>
 /// <param name='fileServerName'>
 /// The name of the file server within the specified resource group. File
 /// server names can only contain a combination of alphanumeric characters
 /// along with dash (-) and underscore (_). The name must be from 1 through 64
 /// characters long.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IFileServersOperations operations, string resourceGroupName, string fileServerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, fileServerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Retrieves all the file servers in a 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='managerName'>
 /// The manager name
 /// </param>
 public static IEnumerable <FileServer> ListByDevice(this IFileServersOperations operations, string deviceName, string resourceGroupName, string managerName)
 {
     return(operations.ListByDeviceAsync(deviceName, resourceGroupName, managerName).GetAwaiter().GetResult());
 }
Пример #11
0
 /// <summary>
 /// Deletes a File Server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group to which the resource belongs.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace. Workspace names can only contain a combination
 /// of alphanumeric characters along with dash (-) and underscore (_). The name
 /// must be from 1 through 64 characters long.
 /// </param>
 /// <param name='fileServerName'>
 /// The name of the file server within the specified resource group. File
 /// server names can only contain a combination of alphanumeric characters
 /// along with dash (-) and underscore (_). The name must be from 1 through 64
 /// characters long.
 /// </param>
 public static void BeginDelete(this IFileServersOperations operations, string resourceGroupName, string workspaceName, string fileServerName)
 {
     operations.BeginDeleteAsync(resourceGroupName, workspaceName, fileServerName).GetAwaiter().GetResult();
 }
Пример #12
0
 /// <summary>
 /// Gets a list of File Servers associated with the specified workspace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group to which the resource belongs.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace. Workspace names can only contain a combination
 /// of alphanumeric characters along with dash (-) and underscore (_). The name
 /// must be from 1 through 64 characters long.
 /// </param>
 /// <param name='fileServersListByWorkspaceOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static IPage <FileServer> ListByWorkspace(this IFileServersOperations operations, string resourceGroupName, string workspaceName, FileServersListByWorkspaceOptions fileServersListByWorkspaceOptions = default(FileServersListByWorkspaceOptions))
 {
     return(operations.ListByWorkspaceAsync(resourceGroupName, workspaceName, fileServersListByWorkspaceOptions).GetAwaiter().GetResult());
 }
Пример #13
0
 /// <summary>
 /// Gets a list of File Servers associated with the specified workspace.
 /// </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 <FileServer> ListByWorkspaceNext(this IFileServersOperations operations, string nextPageLink)
 {
     return(operations.ListByWorkspaceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns the properties of the specified file server name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='fileServerName'>
 /// The file server name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static FileServer Get(this IFileServersOperations operations, string deviceName, string fileServerName, string resourceGroupName, string managerName)
 {
     return(operations.GetAsync(deviceName, fileServerName, resourceGroupName, managerName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Backup the file server now.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='fileServerName'>
 /// The file server name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static void BeginBackupNow(this IFileServersOperations operations, string deviceName, string fileServerName, string resourceGroupName, string managerName)
 {
     operations.BeginBackupNowAsync(deviceName, fileServerName, resourceGroupName, managerName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Backup the file server now.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='fileServerName'>
 /// The file server name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginBackupNowAsync(this IFileServersOperations operations, string deviceName, string fileServerName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginBackupNowWithHttpMessagesAsync(deviceName, fileServerName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #17
0
 /// <summary>
 /// Creates a File Server in the given workspace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group to which the resource belongs.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace. Workspace names can only contain a combination
 /// of alphanumeric characters along with dash (-) and underscore (_). The name
 /// must be from 1 through 64 characters long.
 /// </param>
 /// <param name='fileServerName'>
 /// The name of the file server within the specified resource group. File
 /// server names can only contain a combination of alphanumeric characters
 /// along with dash (-) and underscore (_). The name must be from 1 through 64
 /// characters long.
 /// </param>
 /// <param name='parameters'>
 /// The parameters to provide for File Server creation.
 /// </param>
 public static FileServer Create(this IFileServersOperations operations, string resourceGroupName, string workspaceName, string fileServerName, FileServerCreateParameters parameters)
 {
     return(operations.CreateAsync(resourceGroupName, workspaceName, fileServerName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates or updates the file server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='fileServerName'>
 /// The file server name.
 /// </param>
 /// <param name='fileServer'>
 /// The file server.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static FileServer BeginCreateOrUpdate(this IFileServersOperations operations, string deviceName, string fileServerName, FileServer fileServer, string resourceGroupName, string managerName)
 {
     return(operations.BeginCreateOrUpdateAsync(deviceName, fileServerName, fileServer, resourceGroupName, managerName).GetAwaiter().GetResult());
 }
Пример #19
0
 /// <summary>
 /// Gets information about a File Server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group to which the resource belongs.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace. Workspace names can only contain a combination
 /// of alphanumeric characters along with dash (-) and underscore (_). The name
 /// must be from 1 through 64 characters long.
 /// </param>
 /// <param name='fileServerName'>
 /// The name of the file server within the specified resource group. File
 /// server names can only contain a combination of alphanumeric characters
 /// along with dash (-) and underscore (_). The name must be from 1 through 64
 /// characters long.
 /// </param>
 public static FileServer Get(this IFileServersOperations operations, string resourceGroupName, string workspaceName, string fileServerName)
 {
     return(operations.GetAsync(resourceGroupName, workspaceName, fileServerName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves metric definitions of all metrics aggregated at the file server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The name of the device.
 /// </param>
 /// <param name='fileServerName'>
 /// The name of the file server.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static IEnumerable <MetricDefinition> ListMetricDefinition(this IFileServersOperations operations, string deviceName, string fileServerName, string resourceGroupName, string managerName)
 {
     return(operations.ListMetricDefinitionAsync(deviceName, fileServerName, resourceGroupName, managerName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the file server metrics.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The name of the device.
 /// </param>
 /// <param name='fileServerName'>
 /// The name of the file server name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IEnumerable <Metrics> ListMetrics(this IFileServersOperations operations, string deviceName, string fileServerName, string resourceGroupName, string managerName, ODataQuery <MetricFilter> odataQuery = default(ODataQuery <MetricFilter>))
 {
     return(operations.ListMetricsAsync(deviceName, fileServerName, resourceGroupName, managerName, odataQuery).GetAwaiter().GetResult());
 }