Package com.microsoft.azure.batch
Class JobScheduleOperations
- java.lang.Object
-
- com.microsoft.azure.batch.JobScheduleOperations
-
- All Implemented Interfaces:
IInheritedBehaviors
public class JobScheduleOperations extends Object implements IInheritedBehaviors
Performs job schedule-related operations on an Azure Batch account.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createJobSchedule(JobScheduleAddParameter jobSchedule)
Adds a job schedule to the Batch account.void
createJobSchedule(JobScheduleAddParameter jobSchedule, Iterable<BatchClientBehavior> additionalBehaviors)
Adds a job schedule to the Batch account.void
createJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification)
Adds a job schedule to the Batch account.void
createJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, Iterable<BatchClientBehavior> additionalBehaviors)
Adds a job schedule to the Batch account.Collection<BatchClientBehavior>
customBehaviors()
Gets a collection of behaviors that modify or customize requests to the Batch service.void
deleteJobSchedule(String jobScheduleId)
Deletes the specified job schedule.void
deleteJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors)
Deletes the specified job schedule.void
disableJobSchedule(String jobScheduleId)
Disables the specified job schedule.void
disableJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors)
Disables the specified job schedule.void
enableJobSchedule(String jobScheduleId)
Enables the specified job schedule, allowing jobs to be created according to itsSchedule
.void
enableJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors)
Enables the specified job schedule, allowing jobs to be created according to itsSchedule
.boolean
existsJobSchedule(String jobScheduleId)
Checks whether the specified job schedule exists.boolean
existsJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors)
Checks whether the specified job schedule exists.CloudJobSchedule
getJobSchedule(String jobScheduleId)
Gets the specifiedCloudJobSchedule
.CloudJobSchedule
getJobSchedule(String jobScheduleId, DetailLevel detailLevel)
Gets the specifiedCloudJobSchedule
.CloudJobSchedule
getJobSchedule(String jobScheduleId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)
Gets the specifiedCloudJobSchedule
.com.microsoft.azure.PagedList<CloudJobSchedule>
listJobSchedules()
Lists thejob schedules
in the Batch account.com.microsoft.azure.PagedList<CloudJobSchedule>
listJobSchedules(DetailLevel detailLevel)
Lists thejob schedules
in the Batch account.com.microsoft.azure.PagedList<CloudJobSchedule>
listJobSchedules(DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)
Lists thejob schedules
in the Batch account.void
patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification)
Updates the specified job schedule.void
patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata)
Updates the specified job schedule.void
patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors)
Updates the specified job schedule.void
terminateJobSchedule(String jobScheduleId)
Terminates the specified job schedule.void
terminateJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors)
Terminates the specified job schedule.void
updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification)
Updates the specified job schedule.void
updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata)
Updates the specified job schedule.void
updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors)
Updates the specified job schedule.IInheritedBehaviors
withCustomBehaviors(Collection<BatchClientBehavior> behaviors)
Sets a collection of behaviors that modify or customize requests to the Batch service.
-
-
-
Method Detail
-
customBehaviors
public Collection<BatchClientBehavior> customBehaviors()
Gets a collection of behaviors that modify or customize requests to the Batch service.- Specified by:
customBehaviors
in interfaceIInheritedBehaviors
- Returns:
- A collection of
BatchClientBehavior
instances.
-
withCustomBehaviors
public IInheritedBehaviors withCustomBehaviors(Collection<BatchClientBehavior> behaviors)
Sets a collection of behaviors that modify or customize requests to the Batch service.- Specified by:
withCustomBehaviors
in interfaceIInheritedBehaviors
- Parameters:
behaviors
- The collection ofBatchClientBehavior
instances.- Returns:
- The current instance.
-
existsJobSchedule
public boolean existsJobSchedule(String jobScheduleId) throws BatchErrorException, IOException
Checks whether the specified job schedule exists.- Parameters:
jobScheduleId
- The ID of the job schedule which you want to check.- Returns:
- True if the specified job schedule exists; otherwise, false.
- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
existsJobSchedule
public boolean existsJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Checks whether the specified job schedule exists.- Parameters:
jobScheduleId
- The ID of the job schedule which you want to check.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Returns:
- True if the specified job schedule exists; otherwise, false.
- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
deleteJobSchedule
public void deleteJobSchedule(String jobScheduleId) throws BatchErrorException, IOException
Deletes the specified job schedule.- Parameters:
jobScheduleId
- The ID of the job schedule.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
deleteJobSchedule
public void deleteJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Deletes the specified job schedule.- Parameters:
jobScheduleId
- The ID of the job schedule.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
getJobSchedule
public CloudJobSchedule getJobSchedule(String jobScheduleId) throws BatchErrorException, IOException
Gets the specifiedCloudJobSchedule
.- Parameters:
jobScheduleId
- The ID of the job schedule.- Returns:
- A
CloudJobSchedule
containing information about the specified Azure Batch job schedule. - Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
getJobSchedule
public CloudJobSchedule getJobSchedule(String jobScheduleId, DetailLevel detailLevel) throws BatchErrorException, IOException
Gets the specifiedCloudJobSchedule
.- Parameters:
jobScheduleId
- The ID of the job schedule.detailLevel
- ADetailLevel
used for controlling which properties are retrieved from the service.- Returns:
- A
CloudJobSchedule
containing information about the specified Azure Batch job schedule. - Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
getJobSchedule
public CloudJobSchedule getJobSchedule(String jobScheduleId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Gets the specifiedCloudJobSchedule
.- Parameters:
jobScheduleId
- The ID of the job schedule.detailLevel
- ADetailLevel
used for controlling which properties are retrieved from the service.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Returns:
- A
CloudJobSchedule
containing information about the specified Azure Batch job schedule. - Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
patchJobSchedule
public void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification) throws BatchErrorException, IOException
Updates the specified job schedule. This method only replaces the properties specified with non-null values.- Parameters:
jobScheduleId
- The ID of the job schedule.schedule
- The schedule according to which jobs will be created. If null, any existing schedule is left unchanged.jobSpecification
- The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification. If null, the existing job specification is left unchanged.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
patchJobSchedule
public void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata) throws BatchErrorException, IOException
Updates the specified job schedule. This method only replaces the properties specified with non-null values.- Parameters:
jobScheduleId
- The ID of the job schedule. If null, any existing schedule is left unchanged.schedule
- The schedule according to which jobs will be created.jobSpecification
- The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification. If null, the existing job specification is left unchanged.metadata
- A list of name-value pairs associated with the job schedule as metadata. If null, the existing metadata are left unchanged.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
patchJobSchedule
public void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Updates the specified job schedule. This method only replaces the properties specified with non-null values.- Parameters:
jobScheduleId
- The ID of the job schedule.schedule
- The schedule according to which jobs will be created. If null, any existing schedule is left unchanged.jobSpecification
- The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification. If null, the existing job specification is left unchanged.metadata
- A list of name-value pairs associated with the job schedule as metadata. If null, the existing metadata are left unchanged.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
updateJobSchedule
public void updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification) throws BatchErrorException, IOException
Updates the specified job schedule. This method performs a full replace of all the updatable properties of the job schedule. For example, if the schedule parameter is null, then the Batch service removes the job schedule’s existing schedule and replaces it with the default schedule.- Parameters:
jobScheduleId
- The ID of the job schedule.schedule
- The schedule according to which jobs will be created. If null, it is equivalent to passing the default schedule: that is, a single job scheduled to run immediately.jobSpecification
- The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
updateJobSchedule
public void updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata) throws BatchErrorException, IOException
Updates the specified job schedule. This method performs a full replace of all the updatable properties of the job schedule. For example, if the schedule parameter is null, then the Batch service removes the job schedule’s existing schedule and replaces it with the default schedule.- Parameters:
jobScheduleId
- The ID of the job schedule.schedule
- The schedule according to which jobs will be created. If null, it is equivalent to passing the default schedule: that is, a single job scheduled to run immediately.jobSpecification
- The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification.metadata
- A list of name-value pairs associated with the job schedule as metadata. If null, it takes the default value of an empty list; in effect, any existing metadata is deleted.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
updateJobSchedule
public void updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Updates the specified job schedule. This method performs a full replace of all the updatable properties of the job schedule. For example, if the schedule parameter is null, then the Batch service removes the job schedule’s existing schedule and replaces it with the default schedule.- Parameters:
jobScheduleId
- The ID of the job schedule.schedule
- The schedule according to which jobs will be created. If null, it is equivalent to passing the default schedule: that is, a single job scheduled to run immediately.jobSpecification
- The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification.metadata
- A list of name-value pairs associated with the job schedule as metadata. If null, it takes the default value of an empty list; in effect, any existing metadata is deleted.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
disableJobSchedule
public void disableJobSchedule(String jobScheduleId) throws BatchErrorException, IOException
Disables the specified job schedule. Disabled schedules do not create new jobs, but may be re-enabled later.- Parameters:
jobScheduleId
- The ID of the job schedule.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
disableJobSchedule
public void disableJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Disables the specified job schedule. Disabled schedules do not create new jobs, but may be re-enabled later.- Parameters:
jobScheduleId
- The ID of the job schedule.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
enableJobSchedule
public void enableJobSchedule(String jobScheduleId) throws BatchErrorException, IOException
Enables the specified job schedule, allowing jobs to be created according to itsSchedule
.- Parameters:
jobScheduleId
- The ID of the job schedule.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
enableJobSchedule
public void enableJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Enables the specified job schedule, allowing jobs to be created according to itsSchedule
.- Parameters:
jobScheduleId
- The ID of the job schedule.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
terminateJobSchedule
public void terminateJobSchedule(String jobScheduleId) throws BatchErrorException, IOException
Terminates the specified job schedule.- Parameters:
jobScheduleId
- The ID of the job schedule.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
terminateJobSchedule
public void terminateJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Terminates the specified job schedule.- Parameters:
jobScheduleId
- The ID of the job schedule.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
createJobSchedule
public void createJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification) throws BatchErrorException, IOException
Adds a job schedule to the Batch account.- Parameters:
jobScheduleId
- A string that uniquely identifies the job schedule within the account.schedule
- The schedule according to which jobs will be created.jobSpecification
- Details about the jobs to be created on this schedule.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
createJobSchedule
public void createJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Adds a job schedule to the Batch account.- Parameters:
jobScheduleId
- A string that uniquely identifies the job schedule within the account.schedule
- The schedule according to which jobs will be created.jobSpecification
- Details about the jobs to be created on this schedule.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
createJobSchedule
public void createJobSchedule(JobScheduleAddParameter jobSchedule) throws BatchErrorException, IOException
Adds a job schedule to the Batch account.- Parameters:
jobSchedule
- The job schedule to be added.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
createJobSchedule
public void createJobSchedule(JobScheduleAddParameter jobSchedule, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Adds a job schedule to the Batch account.- Parameters:
jobSchedule
- The job schedule to be added.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
listJobSchedules
public com.microsoft.azure.PagedList<CloudJobSchedule> listJobSchedules() throws BatchErrorException, IOException
Lists thejob schedules
in the Batch account.- Returns:
- A list of
CloudJobSchedule
objects. - Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
listJobSchedules
public com.microsoft.azure.PagedList<CloudJobSchedule> listJobSchedules(DetailLevel detailLevel) throws BatchErrorException, IOException
Lists thejob schedules
in the Batch account.- Parameters:
detailLevel
- ADetailLevel
used for filtering the list and for controlling which properties are retrieved from the service.- Returns:
- A list of
CloudJobSchedule
objects. - Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
listJobSchedules
public com.microsoft.azure.PagedList<CloudJobSchedule> listJobSchedules(DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Lists thejob schedules
in the Batch account.- Parameters:
detailLevel
- ADetailLevel
used for filtering the list and for controlling which properties are retrieved from the service.additionalBehaviors
- A collection ofBatchClientBehavior
instances that are applied to the Batch service request.- Returns:
- A list of
CloudJobSchedule
objects. - Throws:
BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
-
-