C# Class Microsoft.Azure.Commands.Scheduler.Utilities.SchedulerClient

Client for Job.
Show file Open project: Azure/azure-powershell

Public Methods

Method Description
CreateJob ( PSJobParams createJobParams ) : PSSchedulerJobDefinition

Create a job.

CreateJobCollection ( PSJobCollectionsParams createJobCollectionParams ) : PSJobCollectionDefinition

Create job collection.

DeleteJob ( string resourceGroupName, string jobCollectionName, string jobName ) : void

Deletes a job.

DeleteJobCollections ( string resourceGroupName, string jobCollectionName ) : void

Delete job colleciton.

DisableJobCollection ( string resourceGroupName, string jobCollectionName ) : void

Disable job collection.

EnableJobCollection ( string resourceGroupName, string jobCollectionName ) : void

Enable job collection.

GetJobHistory ( string resourceGroupName, string jobCollectionName, string jobName, string jobStatus ) : IList

Gets job history.

ListJobCollectionPS ( string resourceGroupName = null, string jobCollectionName = null ) : IList

List job collection for current subscription.

ListJobs ( string resourceGroupName, string jobCollectionName, string jobName = "", string jobState = "" ) : IList

List jobs.

SchedulerClient ( AzureContext context ) : System

Initializes new instance of the SchedulerClient class.

UpdateJob ( PSJobParams updateJobParams ) : PSSchedulerJobDefinition

Update an existing job.

UpdateJobCollection ( PSJobCollectionsParams updateJobCollectionParams ) : PSJobCollectionDefinition

Updates job collection.

Private Methods

Method Description
DoesResourceGroupExists ( string resourceGroupName ) : bool

Check whether resource group exists.

GetExistingAuthentication ( PSHttpJobAuthenticationParams updateJobAuthenticationParams, HttpAuthentication authentication ) : HttpAuthentication

Gets http authentication.

GetExistingJobAction ( PSJobActionParams updateJobActionParams, JobAction existingJobAction ) : JobAction

Get job action.

GetExistingJobErrorAction ( PSJobActionParams updateJobErrorActionParams, JobErrorAction existingJobErrorAction ) : JobErrorAction

Get job error action.

GetExistingJobPropertiesParams ( PSJobParams updateJobParams, JobProperties existingJobProperties ) : JobProperties

Get job properties.

GetExistingJobRecurrence ( PSJobRecurrenceParams updateRecurrenceParams, JobRecurrence recurrence ) : JobRecurrence

Gets existing job recurrence.

GetHttpJobAction ( PSHttpJobActionParams httpActionParams ) : System.Net.HttpRequest

Gets http job action.

GetJob ( string resourceGroupName, string jobCollectionName, string jobName ) : System.Management.Automation.JobDefinition

Get Job.

GetJobAction ( PSJobParams jobParams ) : JobAction

Get JobAction instance.

GetJobRecurrence ( PSJobRecurrenceParams jobRecurrenceParams ) : JobRecurrence

Gets job recurrence.

GetMaxJobCount ( int maxJobCountInput, int defaultMaxCount, string errorMessage = null ) : int?

Gets maximum job count for the job collection.

GetMaxRecurrence ( string frequencyInput, int intervalInput, System.TimeSpan minRecurrenceQuota, string errorMessage ) : JobMaxRecurrence

Get max recurrence for the job collection.

GetServiceBusAuthentication ( PSServiceBusAuthenticationParams serviceBusAuthenticationParams ) : ServiceBusAuthentication

Get service bus authentication.

GetServiceBusQueue ( PSServiceBusParams serviceBusQueueActionParams ) : ServiceBusQueueMessage

Gets Service bus queue.

GetServiceBusTopic ( PSServiceBusParams serviceBusQueueActionParams ) : ServiceBusTopicMessage

Get Service bus topic.

GetStorageQueue ( PSStorageJobActionParams storageActionParams ) : StorageQueueMessage

Gets storage queue.

HasFreeJobCollection ( ) : bool

Returns true if subscription has a free job collection.

HasJobCollection ( string resourceGroupName, string jobCollectionName ) : bool

Checks whether job collection exists.

JobExists ( string resourceGroupName, string jobCollectionName, string jobName ) : bool

Checks whether job exists.

ListJobCollection ( string resourceGroupName = null, string jobCollectionName = null ) : IList

List job collection.

ListJobCollectionsByResourceGroupName ( string resourceGroupName ) : IList

List all job collection for the resource group.

ListJobCollectionsBySubscription ( ) : IList

List all job collection for the subscription.

ListJobs ( string resourceGroupName, string jobCollectionName, JobState jobState ) : IList

List jobs.

PopulateExistingJobParams ( PSJobParams updateJobParams, System.Management.Automation.JobDefinition existingJobDefinition ) : void

Populates job properties with valid values.

PopulateHttpAuthentication ( PSHttpJobAuthenticationParams authenticationParams ) : HttpAuthentication

Get Http job authentication.

PopulateJobAction ( PSJobActionParams jobActionParams, JobAction &jobAction ) : void

Populate job action values.

PopulateJobCollectionQuota ( JobCollectionQuota quota, SkuDefinition skuDefinition, PSJobCollectionsParams jobCollectionParams, bool newQuota = true ) : void

Populate quota object with valid values.

PopulateJobErrorAction ( PSJobActionParams jobErrorActionParams, JobErrorAction &jobErrorAction ) : void

Populate job error action values.

PopulateServiceBusAuthentication ( PSServiceBusAuthenticationParams serviceBusAuthentication, ServiceBusAuthentication existingServiceBusAuthentication ) : void

Populates service bus authentication properties.

PopulateServiceBusMessage ( PSServiceBusParams serviceBusQueueActionParams, ServiceBusMessage serviceBusMessage ) : void

Populates Service bus message object with valid values.

UpdateServiceBus ( PSServiceBusParams serviceBusParams, ServiceBusMessage existingServiceBusMessage ) : void

Update service bus properties.

Validate ( JobCollectionDefinition jobCollection, int numberOfJobs ) : void

Validates whether max job count supported by chosen plan.

VerifyFreeJobCollectionExists ( IEnumerable jobCollections ) : bool

Verified whether free job collection exist in current subscription.

VerifyJobCollectionAlreadyExists ( IEnumerable jobCollections, string jobCollectionName ) : bool

Verifies whether job collectio already exists.

Method Details

CreateJob() public method

Create a job.
public CreateJob ( PSJobParams createJobParams ) : PSSchedulerJobDefinition
createJobParams Microsoft.Azure.Commands.Scheduler.Models.PSJobParams Job properties entered via powershell.
return Microsoft.Azure.Commands.Scheduler.Models.PSSchedulerJobDefinition

CreateJobCollection() public method

Create job collection.
public CreateJobCollection ( PSJobCollectionsParams createJobCollectionParams ) : PSJobCollectionDefinition
createJobCollectionParams Microsoft.Azure.Commands.Scheduler.Models.PSJobCollectionsParams Job collection properties entered by user via Powershell.
return Microsoft.Azure.Commands.Scheduler.Models.PSJobCollectionDefinition

DeleteJob() public method

Deletes a job.
public DeleteJob ( string resourceGroupName, string jobCollectionName, string jobName ) : void
resourceGroupName string The name of the resource.
jobCollectionName string The job collection name.
jobName string The name of the job.
return void

DeleteJobCollections() public method

Delete job colleciton.
public DeleteJobCollections ( string resourceGroupName, string jobCollectionName ) : void
resourceGroupName string Name of the resoure group.
jobCollectionName string Job collection to be deleted.
return void

DisableJobCollection() public method

Disable job collection.
public DisableJobCollection ( string resourceGroupName, string jobCollectionName ) : void
resourceGroupName string Name of the resource group.
jobCollectionName string Job collection to be disabled.
return void

EnableJobCollection() public method

Enable job collection.
public EnableJobCollection ( string resourceGroupName, string jobCollectionName ) : void
resourceGroupName string Name of the resource group.
jobCollectionName string Job collection to enabled.
return void

GetJobHistory() public method

Gets job history.
public GetJobHistory ( string resourceGroupName, string jobCollectionName, string jobName, string jobStatus ) : IList
resourceGroupName string The name of the resource.
jobCollectionName string The job collection name.
jobName string The name of the job.
jobStatus string The status of the job.
return IList

ListJobCollectionPS() public method

List job collection for current subscription.
public ListJobCollectionPS ( string resourceGroupName = null, string jobCollectionName = null ) : IList
resourceGroupName string Name of the resource group.
jobCollectionName string Name of the job collection.
return IList

ListJobs() public method

List jobs.
public ListJobs ( string resourceGroupName, string jobCollectionName, string jobName = "", string jobState = "" ) : IList
resourceGroupName string Name of the resource group.
jobCollectionName string job collection name.
jobName string Name of the job.
jobState string State of the job.
return IList

SchedulerClient() public method

Initializes new instance of the SchedulerClient class.
public SchedulerClient ( AzureContext context ) : System
context AzureContext The Azure context reference.
return System

UpdateJob() public method

Update an existing job.
public UpdateJob ( PSJobParams updateJobParams ) : PSSchedulerJobDefinition
updateJobParams Microsoft.Azure.Commands.Scheduler.Models.PSJobParams Update job properties specified via PowerShell.
return Microsoft.Azure.Commands.Scheduler.Models.PSSchedulerJobDefinition

UpdateJobCollection() public method

Updates job collection.
public UpdateJobCollection ( PSJobCollectionsParams updateJobCollectionParams ) : PSJobCollectionDefinition
updateJobCollectionParams Microsoft.Azure.Commands.Scheduler.Models.PSJobCollectionsParams Job collection properties to update.
return Microsoft.Azure.Commands.Scheduler.Models.PSJobCollectionDefinition