/// <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> /// Create a test job of the runbook. /// <see href="http://aka.ms/azureautomationsdk/testjoboperations" /> /// </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='runbookName'> /// The parameters supplied to the create test job operation. /// </param> /// <param name='parameters'> /// The parameters supplied to the create test job operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TestJob> CreateAsync(this ITestJobOperations operations, string resourceGroupName, string automationAccountName, string runbookName, TestJobCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <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); }
/// <summary> /// Create a test job of the runbook. (see /// http://aka.ms/azureautomationsdk/testjoboperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Automation.ITestJobOperations. /// </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 parameters supplied to the create test job operation. /// </param> /// <returns> /// The response model for the create test job operation. /// </returns> public static TestJobCreateResponse Create(this ITestJobOperations operations, string resourceGroupName, string automationAccount, TestJobCreateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((ITestJobOperations)s).CreateAsync(resourceGroupName, automationAccount, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Suspend the test job. (see /// http://aka.ms/azureautomationsdk/testjoboperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Automation.ITestJobOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='runbookName'> /// Required. The runbook name. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse Suspend(this ITestJobOperations operations, string resourceGroupName, string automationAccount, string runbookName) { return(Task.Factory.StartNew((object s) => { return ((ITestJobOperations)s).SuspendAsync(resourceGroupName, automationAccount, runbookName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Create a test job of the runbook. (see /// http://aka.ms/azureautomationsdk/testjoboperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Automation.ITestJobOperations. /// </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 parameters supplied to the create test job operation. /// </param> /// <returns> /// The response model for the create test job operation. /// </returns> public static Task <TestJobCreateResponse> CreateAsync(this ITestJobOperations operations, string resourceGroupName, string automationAccount, TestJobCreateParameters parameters) { return(operations.CreateAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None)); }
/// <summary> /// Suspend the test job. (see /// http://aka.ms/azureautomationsdk/testjoboperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Automation.ITestJobOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='runbookName'> /// Required. The runbook name. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> SuspendAsync(this ITestJobOperations operations, string resourceGroupName, string automationAccount, string runbookName) { return(operations.SuspendAsync(resourceGroupName, automationAccount, runbookName, CancellationToken.None)); }
/// <summary> /// Stop the test job. (see /// http://aka.ms/azureautomationsdk/testjoboperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Automation.ITestJobOperations. /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='runbookName'> /// Required. The runbook name. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> StopAsync(this ITestJobOperations operations, string automationAccount, string runbookName) { return(operations.StopAsync(automationAccount, runbookName, CancellationToken.None)); }
/// <summary> /// Retrieve the test job for the specified runbook. /// <see href="http://aka.ms/azureautomationsdk/testjoboperations" /> /// </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='runbookName'> /// The runbook name. /// </param> public static TestJob Get(this ITestJobOperations operations, string resourceGroupName, string automationAccountName, string runbookName) { return(operations.GetAsync(resourceGroupName, automationAccountName, runbookName).GetAwaiter().GetResult()); }
/// <summary> /// Create a test job of the runbook. /// <see href="http://aka.ms/azureautomationsdk/testjoboperations" /> /// </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='runbookName'> /// The parameters supplied to the create test job operation. /// </param> /// <param name='parameters'> /// The parameters supplied to the create test job operation. /// </param> public static TestJob Create(this ITestJobOperations operations, string resourceGroupName, string automationAccountName, string runbookName, TestJobCreateParameters parameters) { return(operations.CreateAsync(resourceGroupName, automationAccountName, runbookName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Suspend the test job. /// <see href="http://aka.ms/azureautomationsdk/testjoboperations" /> /// </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='runbookName'> /// The runbook name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task SuspendAsync(this ITestJobOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.SuspendWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Suspend the test job. /// <see href="http://aka.ms/azureautomationsdk/testjoboperations" /> /// </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='runbookName'> /// The runbook name. /// </param> public static void Suspend(this ITestJobOperations operations, string resourceGroupName, string automationAccountName, string runbookName) { operations.SuspendAsync(resourceGroupName, automationAccountName, runbookName).GetAwaiter().GetResult(); }