/// <summary> /// Gets computes in specified workspace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group in which workspace is located. /// </param> /// <param name='workspaceName'> /// Name of Azure Machine Learning workspace. /// </param> /// <param name='skiptoken'> /// Continuation token for pagination. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ComputeResource> > ListByWorkspaceAsync(this IMachineLearningComputeOperations operations, string resourceGroupName, string workspaceName, string skiptoken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByWorkspaceWithHttpMessagesAsync(resourceGroupName, workspaceName, skiptoken, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates properties of a compute. This call will overwrite a compute if it /// exists. This is a nonrecoverable operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group in which workspace is located. /// </param> /// <param name='workspaceName'> /// Name of Azure Machine Learning workspace. /// </param> /// <param name='computeName'> /// Name of the Azure Machine Learning compute. /// </param> /// <param name='parameters'> /// Additional parameters for cluster update. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ComputeResource> BeginUpdateAsync(this IMachineLearningComputeOperations operations, string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, computeName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets computes in 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> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ComputeResource> > ListByWorkspaceNextAsync(this IMachineLearningComputeOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByWorkspaceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets secrets related to Machine Learning compute (storage keys, service /// credentials, etc). /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group in which workspace is located. /// </param> /// <param name='workspaceName'> /// Name of Azure Machine Learning workspace. /// </param> /// <param name='computeName'> /// Name of the Azure Machine Learning compute. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ComputeSecrets> ListKeysAsync(this IMachineLearningComputeOperations operations, string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListKeysWithHttpMessagesAsync(resourceGroupName, workspaceName, computeName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes specified Machine Learning compute. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group in which workspace is located. /// </param> /// <param name='workspaceName'> /// Name of Azure Machine Learning workspace. /// </param> /// <param name='computeName'> /// Name of the Azure Machine Learning compute. /// </param> /// <param name='underlyingResourceAction'> /// Delete the underlying compute if 'Delete', or detach the underlying compute /// from workspace if 'Detach'. Possible values include: 'Delete', 'Detach' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <MachineLearningComputeDeleteHeaders> DeleteAsync(this IMachineLearningComputeOperations operations, string resourceGroupName, string workspaceName, string computeName, string underlyingResourceAction, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }
/// <summary> /// Gets all available operations. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AvailableOperations> ListAvailableOperationsAsync(this IMachineLearningComputeOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListAvailableOperationsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { OperationalizationClusters = new OperationalizationClustersOperations(this); MachineLearningCompute = new MachineLearningComputeOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2017-08-01-preview"; 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()); }
/// <summary> /// Gets compute definition by its name. Any secrets (storage keys, service /// credentials, etc) are not returned - use 'keys' nested resource to get /// them. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group in which workspace is located. /// </param> /// <param name='workspaceName'> /// Name of Azure Machine Learning workspace. /// </param> /// <param name='computeName'> /// Name of the Azure Machine Learning compute. /// </param> public static ComputeResource Get(this IMachineLearningComputeOperations operations, string resourceGroupName, string workspaceName, string computeName) { return(operations.GetAsync(resourceGroupName, workspaceName, computeName).GetAwaiter().GetResult()); }
/// <summary> /// Gets computes in 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 <ComputeResource> ListByWorkspaceNext(this IMachineLearningComputeOperations operations, string nextPageLink) { return(operations.ListByWorkspaceNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes specified Machine Learning compute. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group in which workspace is located. /// </param> /// <param name='workspaceName'> /// Name of Azure Machine Learning workspace. /// </param> /// <param name='computeName'> /// Name of the Azure Machine Learning compute. /// </param> /// <param name='underlyingResourceAction'> /// Delete the underlying compute if 'Delete', or detach the underlying compute /// from workspace if 'Detach'. Possible values include: 'Delete', 'Detach' /// </param> public static MachineLearningComputeDeleteHeaders BeginDelete(this IMachineLearningComputeOperations operations, string resourceGroupName, string workspaceName, string computeName, string underlyingResourceAction) { return(operations.BeginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).GetAwaiter().GetResult()); }
/// <summary> /// Updates properties of a compute. This call will overwrite a compute if it /// exists. This is a nonrecoverable operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group in which workspace is located. /// </param> /// <param name='workspaceName'> /// Name of Azure Machine Learning workspace. /// </param> /// <param name='computeName'> /// Name of the Azure Machine Learning compute. /// </param> /// <param name='parameters'> /// Additional parameters for cluster update. /// </param> public static ComputeResource BeginUpdate(this IMachineLearningComputeOperations operations, string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters) { return(operations.BeginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets computes in specified workspace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group in which workspace is located. /// </param> /// <param name='workspaceName'> /// Name of Azure Machine Learning workspace. /// </param> /// <param name='skiptoken'> /// Continuation token for pagination. /// </param> public static IPage <ComputeResource> ListByWorkspace(this IMachineLearningComputeOperations operations, string resourceGroupName, string workspaceName, string skiptoken = default(string)) { return(operations.ListByWorkspaceAsync(resourceGroupName, workspaceName, skiptoken).GetAwaiter().GetResult()); }
/// <summary> /// Get the details (e.g IP address, port etc) of all the compute nodes in the /// compute. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group in which workspace is located. /// </param> /// <param name='workspaceName'> /// Name of Azure Machine Learning workspace. /// </param> /// <param name='computeName'> /// Name of the Azure Machine Learning compute. /// </param> public static AmlComputeNodesInformation ListNodes(this IMachineLearningComputeOperations operations, string resourceGroupName, string workspaceName, string computeName) { return(operations.ListNodesAsync(resourceGroupName, workspaceName, computeName).GetAwaiter().GetResult()); }
/// <summary> /// Gets all available operations. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static AvailableOperations ListAvailableOperations(this IMachineLearningComputeOperations operations) { return(operations.ListAvailableOperationsAsync().GetAwaiter().GetResult()); }