/// <summary> /// Initializes a new instance of the JobCreateParameters class. /// </summary> /// <param name="runbook">Gets or sets the runbook.</param> /// <param name="parameters">Gets or sets the parameters of the /// job.</param> /// <param name="runOn">Gets or sets the runOn which specifies the /// group name where the job is to be executed.</param> public JobCreateParameters(RunbookAssociationProperty runbook = default(RunbookAssociationProperty), IDictionary <string, string> parameters = default(IDictionary <string, string>), string runOn = default(string)) { Runbook = runbook; Parameters = parameters; RunOn = runOn; CustomInit(); }
/// <summary> /// Initializes a new instance of the JobScheduleCreateParameters /// class. /// </summary> /// <param name="schedule">Gets or sets the schedule.</param> /// <param name="runbook">Gets or sets the runbook.</param> /// <param name="runOn">Gets or sets the hybrid worker group that the /// scheduled job should run on.</param> /// <param name="parameters">Gets or sets a list of job /// properties.</param> public JobScheduleCreateParameters(ScheduleAssociationProperty schedule, RunbookAssociationProperty runbook, string runOn = default(string), IDictionary <string, string> parameters = default(IDictionary <string, string>)) { Schedule = schedule; Runbook = runbook; RunOn = runOn; Parameters = parameters; CustomInit(); }
/// <summary> /// Initializes a new instance of the JobCreateProperties class with /// required arguments. /// </summary> public JobCreateProperties(RunbookAssociationProperty runbook) : this() { if (runbook == null) { throw new ArgumentNullException("runbook"); } this.Runbook = runbook; }
/// <summary> /// Initializes a new instance of the WebhookCreateOrUpdateParameters /// class. /// </summary> /// <param name="name">Gets or sets the name of the webhook.</param> /// <param name="isEnabled">Gets or sets the value of the enabled flag /// of webhook.</param> /// <param name="uri">Gets or sets the uri.</param> /// <param name="expiryTime">Gets or sets the expiry time.</param> /// <param name="parameters">Gets or sets the parameters of the /// job.</param> /// <param name="runbook">Gets or sets the runbook.</param> /// <param name="runOn">Gets or sets the name of the hybrid worker /// group the webhook job will run on.</param> public WebhookCreateOrUpdateParameters(string name, bool?isEnabled = default(bool?), string uri = default(string), System.DateTimeOffset expiryTime = default(System.DateTimeOffset), IDictionary <string, string> parameters = default(IDictionary <string, string>), RunbookAssociationProperty runbook = default(RunbookAssociationProperty), string runOn = default(string)) { Name = name; IsEnabled = isEnabled; Uri = uri; ExpiryTime = expiryTime; Parameters = parameters; Runbook = runbook; RunOn = runOn; CustomInit(); }
/// <summary> /// Initializes a new instance of the JobSchedule class. /// </summary> /// <param name="id">Gets the id of the resource.</param> /// <param name="name">Gets the name of the variable.</param> /// <param name="type">Resource type</param> /// <param name="jobScheduleId">Gets or sets the id of job /// schedule.</param> /// <param name="schedule">Gets or sets the schedule.</param> /// <param name="runbook">Gets or sets the runbook.</param> /// <param name="runOn">Gets or sets the hybrid worker group that the /// scheduled job should run on.</param> /// <param name="parameters">Gets or sets the parameters of the job /// schedule.</param> public JobSchedule(string id = default(string), string name = default(string), string type = default(string), string jobScheduleId = default(string), ScheduleAssociationProperty schedule = default(ScheduleAssociationProperty), RunbookAssociationProperty runbook = default(RunbookAssociationProperty), string runOn = default(string), IDictionary <string, string> parameters = default(IDictionary <string, string>)) { Id = id; Name = name; Type = type; JobScheduleId = jobScheduleId; Schedule = schedule; Runbook = runbook; RunOn = runOn; Parameters = parameters; CustomInit(); }
/// <summary> /// Initializes a new instance of the JobScheduleCreateProperties class /// with required arguments. /// </summary> public JobScheduleCreateProperties(ScheduleAssociationProperty schedule, RunbookAssociationProperty runbook) : this() { if (schedule == null) { throw new ArgumentNullException("schedule"); } if (runbook == null) { throw new ArgumentNullException("runbook"); } this.Schedule = schedule; this.Runbook = runbook; }
/// <summary> /// Initializes a new instance of the JobCollectionItem class. /// </summary> /// <param name="id">Fully qualified resource Id for the /// resource</param> /// <param name="name">The name of the resource</param> /// <param name="type">The type of the resource.</param> /// <param name="runbook">The runbook association.</param> /// <param name="jobId">The id of the job.</param> /// <param name="creationTime">The creation time of the job.</param> /// <param name="status">The status of the job. Possible values /// include: 'New', 'Activating', 'Running', 'Completed', 'Failed', /// 'Stopped', 'Blocked', 'Suspended', 'Disconnected', 'Suspending', /// 'Stopping', 'Resuming', 'Removing'</param> /// <param name="startTime">The start time of the job.</param> /// <param name="endTime">The end time of the job.</param> /// <param name="lastModifiedTime">The last modified time of the /// job.</param> /// <param name="provisioningState">The provisioning state of a /// resource.</param> /// <param name="runOn">Specifies the runOn group name where the job /// was executed.</param> public JobCollectionItem(string id = default(string), string name = default(string), string type = default(string), RunbookAssociationProperty runbook = default(RunbookAssociationProperty), System.Guid jobId = default(System.Guid), System.DateTimeOffset creationTime = default(System.DateTimeOffset), string status = default(string), System.DateTimeOffset?startTime = default(System.DateTimeOffset?), System.DateTimeOffset?endTime = default(System.DateTimeOffset?), System.DateTimeOffset?lastModifiedTime = default(System.DateTimeOffset?), string provisioningState = default(string), string runOn = default(string)) : base(id, name, type) { Runbook = runbook; JobId = jobId; CreationTime = creationTime; Status = status; StartTime = startTime; EndTime = endTime; LastModifiedTime = lastModifiedTime; ProvisioningState = provisioningState; RunOn = runOn; CustomInit(); }
public Model.Webhook CreateWebhook( string resourceGroupName, string automationAccountName, string name, string runbookName, bool isEnabled, DateTimeOffset expiryTime, Hashtable runbookParameters) { Requires.Argument("ResourceGroupName", resourceGroupName).NotNull(); Requires.Argument("AutomationAccountName", automationAccountName).NotNull(); using (var request = new RequestSettings(this.automationManagementClient)) { var rbAssociationProperty = new RunbookAssociationProperty { Name = runbookName }; var createOrUpdateProperties = new WebhookCreateOrUpdateProperties { IsEnabled = isEnabled, ExpiryTime = expiryTime, Runbook = rbAssociationProperty, Uri = this.automationManagementClient .Webhooks.GenerateUri( resourceGroupName, automationAccountName).Uri }; if (runbookParameters != null) { createOrUpdateProperties.Parameters = runbookParameters.Cast<DictionaryEntry>() .ToDictionary(kvp => (string)kvp.Key, kvp => (string)kvp.Value); } var webhookCreateOrUpdateParameters = new WebhookCreateOrUpdateParameters( name, createOrUpdateProperties); var webhook = this.automationManagementClient.Webhooks.CreateOrUpdate( resourceGroupName, automationAccountName, webhookCreateOrUpdateParameters).Webhook; return new Model.Webhook( resourceGroupName, automationAccountName, webhook, webhookCreateOrUpdateParameters.Properties.Uri); } }
/// <summary> /// Initializes a new instance of the Webhook class. /// </summary> /// <param name="id">Fully qualified resource Id for the /// resource</param> /// <param name="name">The name of the resource</param> /// <param name="type">The type of the resource.</param> /// <param name="isEnabled">Gets or sets the value of the enabled flag /// of the webhook.</param> /// <param name="uri">Gets or sets the webhook uri.</param> /// <param name="expiryTime">Gets or sets the expiry time.</param> /// <param name="lastInvokedTime">Gets or sets the last invoked /// time.</param> /// <param name="parameters">Gets or sets the parameters of the job /// that is created when the webhook calls the runbook it is associated /// with.</param> /// <param name="runbook">Gets or sets the runbook the webhook is /// associated with.</param> /// <param name="runOn">Gets or sets the name of the hybrid worker /// group the webhook job will run on.</param> /// <param name="creationTime">Gets or sets the creation time.</param> /// <param name="lastModifiedTime">Gets or sets the last modified /// time.</param> /// <param name="lastModifiedBy">Details of the user who last modified /// the Webhook</param> /// <param name="description">Gets or sets the description.</param> public Webhook(string id = default(string), string name = default(string), string type = default(string), bool?isEnabled = default(bool?), string uri = default(string), System.DateTimeOffset expiryTime = default(System.DateTimeOffset), System.DateTimeOffset?lastInvokedTime = default(System.DateTimeOffset?), IDictionary <string, string> parameters = default(IDictionary <string, string>), RunbookAssociationProperty runbook = default(RunbookAssociationProperty), string runOn = default(string), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string lastModifiedBy = default(string), string description = default(string)) : base(id, name, type) { IsEnabled = isEnabled; Uri = uri; ExpiryTime = expiryTime; LastInvokedTime = lastInvokedTime; Parameters = parameters; Runbook = runbook; RunOn = runOn; CreationTime = creationTime; LastModifiedTime = lastModifiedTime; LastModifiedBy = lastModifiedBy; Description = description; CustomInit(); }
/// <summary> /// Initializes a new instance of the Job class. /// </summary> /// <param name="id">Fully qualified resource Id for the /// resource</param> /// <param name="name">The name of the resource</param> /// <param name="type">The type of the resource.</param> /// <param name="runbook">Gets or sets the runbook.</param> /// <param name="startedBy">Gets or sets the job started by.</param> /// <param name="runOn">Gets or sets the runOn which specifies the /// group name where the job is to be executed.</param> /// <param name="jobId">Gets or sets the id of the job.</param> /// <param name="creationTime">Gets or sets the creation time of the /// job.</param> /// <param name="status">Gets or sets the status of the job. Possible /// values include: 'New', 'Activating', 'Running', 'Completed', /// 'Failed', 'Stopped', 'Blocked', 'Suspended', 'Disconnected', /// 'Suspending', 'Stopping', 'Resuming', 'Removing'</param> /// <param name="statusDetails">Gets or sets the status details of the /// job.</param> /// <param name="startTime">Gets or sets the start time of the /// job.</param> /// <param name="endTime">Gets or sets the end time of the job.</param> /// <param name="exception">Gets or sets the exception of the /// job.</param> /// <param name="lastModifiedTime">Gets or sets the last modified time /// of the job.</param> /// <param name="lastStatusModifiedTime">Gets or sets the last status /// modified time of the job.</param> /// <param name="parameters">Gets or sets the parameters of the /// job.</param> /// <param name="provisioningState">The current provisioning state of /// the job. Possible values include: 'Failed', 'Succeeded', /// 'Suspended', 'Processing'</param> public Job(string id = default(string), string name = default(string), string type = default(string), RunbookAssociationProperty runbook = default(RunbookAssociationProperty), string startedBy = default(string), string runOn = default(string), System.Guid jobId = default(System.Guid), System.DateTimeOffset creationTime = default(System.DateTimeOffset), string status = default(string), string statusDetails = default(string), System.DateTimeOffset?startTime = default(System.DateTimeOffset?), System.DateTimeOffset?endTime = default(System.DateTimeOffset?), string exception = default(string), System.DateTimeOffset?lastModifiedTime = default(System.DateTimeOffset?), System.DateTimeOffset?lastStatusModifiedTime = default(System.DateTimeOffset?), IDictionary <string, string> parameters = default(IDictionary <string, string>), string provisioningState = default(string)) : base(id, name, type) { Runbook = runbook; StartedBy = startedBy; RunOn = runOn; JobId = jobId; CreationTime = creationTime; Status = status; StatusDetails = statusDetails; StartTime = startTime; EndTime = endTime; Exception = exception; LastModifiedTime = lastModifiedTime; LastStatusModifiedTime = lastStatusModifiedTime; Parameters = parameters; ProvisioningState = provisioningState; CustomInit(); }