/// <summary>
 /// Retrieve next list of configurations.  (see
 /// http://aka.ms/azureautomationsdk/dscnodeoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IDscNodeOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list dsc nodes operation.
 /// </returns>
 public static DscNodeListResponse ListNext(this IDscNodeOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDscNodeOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve a list of dsc nodes.  (see
 /// http://aka.ms/azureautomationsdk/dscnodeoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IDscNodeOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Optional. The parameters supplied to the list operation.
 /// </param>
 /// <returns>
 /// The response model for the list dsc nodes operation.
 /// </returns>
 public static DscNodeListResponse List(this IDscNodeOperations operations, string resourceGroupName, string automationAccount, DscNodeListParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDscNodeOperations)s).ListAsync(resourceGroupName, automationAccount, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the AutomationManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public AutomationManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._activities = new ActivityOperations(this);
     this._agentRegistrationInformation = new AgentRegistrationOperation(this);
     this._automationAccounts           = new AutomationAccountOperations(this);
     this._certificates       = new CertificateOperations(this);
     this._connections        = new ConnectionOperations(this);
     this._connectionTypes    = new ConnectionTypeOperations(this);
     this._psCredentials      = new CredentialOperations(this);
     this._compilationJobs    = new DscCompilationJobOperations(this);
     this._configurations     = new DscConfigurationOperations(this);
     this._nodeConfigurations = new DscNodeConfigurationOperations(this);
     this._nodes       = new DscNodeOperations(this);
     this._nodeReports = new DscNodeReportsOperations(this);
     this._hybridRunbookWorkerGroups = new HybridRunbookWorkerGroupOperations(this);
     this._jobs              = new JobOperations(this);
     this._jobSchedules      = new JobScheduleOperations(this);
     this._jobStreams        = new JobStreamOperations(this);
     this._linkedWorkspace   = new LinkedWorkspaceOperations(this);
     this._modules           = new ModuleOperations(this);
     this._objectDataTypes   = new ObjectDataTypeOperations(this);
     this._runbookDraft      = new RunbookDraftOperations(this);
     this._runbooks          = new RunbookOperations(this);
     this._schedules         = new ScheduleOperations(this);
     this._statistics        = new StatisticsOperations(this);
     this._testJobs          = new TestJobOperations(this);
     this._typeFields        = new TypeFieldOperations(this);
     this._usages            = new UsageOperations(this);
     this._variables         = new VariableOperations(this);
     this._watcherActions    = new WatcherActionOperations(this);
     this._watchers          = new WatcherOperations(this);
     this._watcherStreams    = new WatcherStreamOperations(this);
     this._webhooks          = new WebhookOperations(this);
     this._resourceNamespace = "Microsoft.Automation";
     this._apiVersion        = "2014-06-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Retrieve the dsc node identified by node id.
 /// <see href="http://aka.ms/azureautomationsdk/dscnodeoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='nodeId'>
 /// The node id.
 /// </param>
 public static DscNode Get(this IDscNodeOperations operations, string resourceGroupName, string automationAccountName, string nodeId)
 {
     return(operations.GetAsync(resourceGroupName, automationAccountName, nodeId).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the dsc node identified by node id.
 /// <see href="http://aka.ms/azureautomationsdk/dscnodeoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='nodeId'>
 /// The node id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IDscNodeOperations operations, string resourceGroupName, string automationAccountName, string nodeId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, nodeId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete the dsc node identified by node id.
 /// <see href="http://aka.ms/azureautomationsdk/dscnodeoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='nodeId'>
 /// The node id.
 /// </param>
 public static void Delete(this IDscNodeOperations operations, string resourceGroupName, string automationAccountName, string nodeId)
 {
     operations.DeleteAsync(resourceGroupName, automationAccountName, nodeId).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Retrieve a list of dsc nodes.
 /// <see href="http://aka.ms/azureautomationsdk/dscnodeoperations" />
 /// </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 <DscNode> ListByAutomationAccountNext(this IDscNodeOperations operations, string nextPageLink)
 {
     return(operations.ListByAutomationAccountNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve a list of dsc nodes.
 /// <see href="http://aka.ms/azureautomationsdk/dscnodeoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='inlinecount'>
 /// Return total rows.
 /// </param>
 public static IPage <DscNode> ListByAutomationAccount(this IDscNodeOperations operations, string resourceGroupName, string automationAccountName, ODataQuery <DscNode> odataQuery = default(ODataQuery <DscNode>), string inlinecount = default(string))
 {
     return(operations.ListByAutomationAccountAsync(resourceGroupName, automationAccountName, odataQuery, inlinecount).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update the dsc node.
 /// <see href="http://aka.ms/azureautomationsdk/dscnodeoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='nodeId'>
 /// Parameters supplied to the update dsc node.
 /// </param>
 /// <param name='dscNodeUpdateParameters'>
 /// Parameters supplied to the update dsc node.
 /// </param>
 public static DscNode Update(this IDscNodeOperations operations, string resourceGroupName, string automationAccountName, string nodeId, DscNodeUpdateParameters dscNodeUpdateParameters)
 {
     return(operations.UpdateAsync(resourceGroupName, automationAccountName, nodeId, dscNodeUpdateParameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the dsc node identified by node id.  (see
 /// http://aka.ms/azureautomationsdk/dscnodeoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IDscNodeOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. Automation account name.
 /// </param>
 /// <param name='nodeId'>
 /// Required. The node id.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IDscNodeOperations operations, string resourceGroupName, string automationAccount, Guid nodeId)
 {
     return(operations.DeleteAsync(resourceGroupName, automationAccount, nodeId, CancellationToken.None));
 }
 /// <summary>
 /// Update the dsc node.  (see
 /// http://aka.ms/azureautomationsdk/dscnodeoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IDscNodeOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the patch dsc node.
 /// </param>
 /// <returns>
 /// The response model for the patch dsc node operation.
 /// </returns>
 public static Task <DscNodePatchResponse> PatchAsync(this IDscNodeOperations operations, string resourceGroupName, string automationAccount, DscNodePatchParameters parameters)
 {
     return(operations.PatchAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve next list of configurations.  (see
 /// http://aka.ms/azureautomationsdk/dscnodeoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IDscNodeOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list dsc nodes operation.
 /// </returns>
 public static Task <DscNodeListResponse> ListNextAsync(this IDscNodeOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }