/// <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._modules           = new ModuleOperations(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._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);
 }
示例#2
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._automationAccounts = new AutomationAccountOperations(this);
     this._certificates       = new CertificateOperations(this);
     this._cloudServices      = new CloudServiceOperations(this);
     this._connections        = new ConnectionOperations(this);
     this._connectionTypes    = new ConnectionTypeOperations(this);
     this._psCredentials      = new CredentialOperations(this);
     this._jobs              = new JobOperations(this);
     this._jobSchedules      = new JobScheduleOperations(this);
     this._jobStreams        = new JobStreamOperations(this);
     this._modules           = new ModuleOperations(this);
     this._runbookDraft      = new RunbookDraftOperations(this);
     this._runbooks          = new RunbookOperations(this);
     this._schedules         = new ScheduleOperations(this);
     this._testJobs          = new TestJobOperations(this);
     this._variables         = new VariableOperations(this);
     this._resourceNamespace = "automation";
     this._apiVersion        = "2013-06-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Retrieve a list of modules.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </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 <Module> > ListByAutomationAccountNextAsync(this IModuleOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByAutomationAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public ModuleController()
 {
     // Replace the URI with the one that points to your local instance.
     var client = new GilboyDemoUiApi(new Uri("http://localhost:63050/"));
     _userService = new UserOperations(client);
     _moduleService = new ModuleOperations(client);
 }
 /// <summary>
 /// Update the module identified by module name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </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='moduleName'>
 /// The name of module.
 /// </param>
 /// <param name='parameters'>
 /// The update parameters for module.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Module> UpdateAsync(this IModuleOperations operations, string resourceGroupName, string automationAccountName, string moduleName, ModuleUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, automationAccountName, moduleName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#6
0
 /// <summary>
 /// Delete the module by name.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IModuleOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='moduleName'>
 /// Required. The module name.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Delete(this IModuleOperations operations, string automationAccount, string moduleName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IModuleOperations)s).DeleteAsync(automationAccount, moduleName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#7
0
 /// <summary>
 /// Create the module identified by module name.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IModuleOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The create parameters for module.
 /// </param>
 /// <returns>
 /// The response model for the create module operation.
 /// </returns>
 public static ModuleCreateResponse Create(this IModuleOperations operations, string automationAccount, ModuleCreateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IModuleOperations)s).CreateAsync(automationAccount, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#8
0
 /// <summary>
 /// Retrieve next list of modules.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IModuleOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list module operation.
 /// </returns>
 public static ModuleListResponse ListNext(this IModuleOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IModuleOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#9
0
 /// <summary>
 /// Retrieve a list of modules.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IModuleOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <returns>
 /// The response model for the list module operation.
 /// </returns>
 public static ModuleListResponse List(this IModuleOperations operations, string resourceGroupName, string automationAccount)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IModuleOperations)s).ListAsync(resourceGroupName, automationAccount);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the module by name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </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='moduleName'>
 /// The module name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IModuleOperations operations, string resourceGroupName, string automationAccountName, string moduleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, moduleName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete the module by name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </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='moduleName'>
 /// The module name.
 /// </param>
 public static void Delete(this IModuleOperations operations, string resourceGroupName, string automationAccountName, string moduleName)
 {
     operations.DeleteAsync(resourceGroupName, automationAccountName, moduleName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Retrieve a list of modules.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </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 <Module> ListByAutomationAccountNext(this IModuleOperations operations, string nextPageLink)
 {
     return(operations.ListByAutomationAccountNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve a list of modules.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </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>
 public static IPage <Module> ListByAutomationAccount(this IModuleOperations operations, string resourceGroupName, string automationAccountName)
 {
     return(operations.ListByAutomationAccountAsync(resourceGroupName, automationAccountName).GetAwaiter().GetResult());
 }
示例#14
0
 /// <summary>
 /// Retrieve next list of modules.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IModuleOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list module operation.
 /// </returns>
 public static Task <ModuleListResponse> ListNextAsync(this IModuleOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
示例#15
0
 /// <summary>
 /// Retrieve a list of modules.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IModuleOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <returns>
 /// The response model for the list module operation.
 /// </returns>
 public static Task <ModuleListResponse> ListAsync(this IModuleOperations operations, string automationAccount)
 {
     return(operations.ListAsync(automationAccount, CancellationToken.None));
 }
示例#16
0
 /// <summary>
 /// Retrieve the module identified by module name.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IModuleOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='moduleName'>
 /// Required. The module name.
 /// </param>
 /// <returns>
 /// The response model for the get module operation.
 /// </returns>
 public static Task <ModuleGetResponse> GetAsync(this IModuleOperations operations, string automationAccount, string moduleName)
 {
     return(operations.GetAsync(automationAccount, moduleName, CancellationToken.None));
 }
示例#17
0
 /// <summary>
 /// Delete the module by name.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IModuleOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='moduleName'>
 /// Required. The module name.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IModuleOperations operations, string automationAccount, string moduleName)
 {
     return(operations.DeleteAsync(automationAccount, moduleName, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve the module identified by module name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </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='moduleName'>
 /// The module name.
 /// </param>
 public static Module Get(this IModuleOperations operations, string resourceGroupName, string automationAccountName, string moduleName)
 {
     return(operations.GetAsync(resourceGroupName, automationAccountName, moduleName).GetAwaiter().GetResult());
 }
示例#19
0
 /// <summary>
 /// Create the module identified by module name.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IModuleOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The create parameters for module.
 /// </param>
 /// <returns>
 /// The response model for the create module operation.
 /// </returns>
 public static Task <ModuleCreateResponse> CreateAsync(this IModuleOperations operations, string automationAccount, ModuleCreateParameters parameters)
 {
     return(operations.CreateAsync(automationAccount, parameters, CancellationToken.None));
 }
示例#20
0
 /// <summary>
 /// Create the module identified by module name.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IModuleOperations.
 /// </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. The patch parameters for module.
 /// </param>
 /// <returns>
 /// The response model for the get module operation.
 /// </returns>
 public static Task <ModuleGetResponse> PatchAsync(this IModuleOperations operations, string resourceGroupName, string automationAccount, ModulePatchParameters parameters)
 {
     return(operations.PatchAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Update the module identified by module name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </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='moduleName'>
 /// The name of module.
 /// </param>
 /// <param name='parameters'>
 /// The update parameters for module.
 /// </param>
 public static Module Update(this IModuleOperations operations, string resourceGroupName, string automationAccountName, string moduleName, ModuleUpdateParameters parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, automationAccountName, moduleName, parameters).GetAwaiter().GetResult());
 }
 public ModuleController()
 {
     // Replace the URI with the one that points to your local instance.
     _moduleOperations = new ModuleOperations(new GilboyDemoFirstApi(new Uri("http://localhost:61769/")));
 }