Jobs - Create Or Update

Provisions a new job or updates an existing job.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}?api-version=2016-03-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The subscription id.

resourceGroupName
path True
  • string

The resource group name.

jobCollectionName
path True
  • string

The job collection name.

jobName
path True
  • string

The job name.

api-version
query True
  • string

The API version.

Request Body

Media Types: "application/json", "text/json"

Name Type Description
properties

Gets or sets the job properties.

Responses

Name Type Description
200 OK

The job has been successfully updated.

Media Types: "application/json", "text/json"

201 Created

The job has been successfully created.

Media Types: "application/json", "text/json"

Definitions

BasicAuthentication
ClientCertAuthentication
HttpRequest
JobAction
JobActionType

Gets or sets the job action type.

JobDefinition
JobErrorAction
JobProperties
JobRecurrence
JobRecurrenceSchedule
JobRecurrenceScheduleMonthlyOccurrence
JobScheduleDay

Gets or sets the day. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.

JobState

Gets or set the job state.

JobStatus
OAuthAuthentication
RecurrenceFrequency

Gets or sets the frequency of recurrence (minute, hour, day, week, month).

RetryPolicy
RetryType

Gets or sets the retry strategy to be used.

ServiceBusAuthentication
ServiceBusAuthenticationType

Gets or sets the authentication type.

ServiceBusBrokeredMessageProperties
ServiceBusQueueMessage
ServiceBusTopicMessage
ServiceBusTransportType

Gets or sets the transport type.

StorageQueueMessage

BasicAuthentication

Name Type Description
password
  • string

Gets or sets the password, return value will always be empty.

type string:
  • Basic

Gets or sets the HTTP authentication type.

username
  • string

Gets or sets the username.

ClientCertAuthentication

Name Type Description
certificateExpirationDate
  • string

Gets or sets the certificate expiration date.

certificateSubjectName
  • string

Gets or sets the certificate subject name.

certificateThumbprint
  • string

Gets or sets the certificate thumbprint.

password
  • string

Gets or sets the certificate password, return value will always be empty.

pfx
  • string

Gets or sets the pfx certificate. Accepts certification in base64 encoding, return value will always be empty.

type string:
  • ClientCertificate

Gets or sets the HTTP authentication type.

HttpRequest

Name Type Description
authentication HttpAuthentication:

Gets or sets the authentication method of the request.

body
  • string

Gets or sets the request body.

headers
  • object

Gets or sets the headers.

method
  • string

Gets or sets the method of the request.

uri
  • string

Gets or sets the URI of the request.

JobAction

Name Type Description
errorAction

Gets or sets the error action.

queueMessage

Gets or sets the storage queue message.

request

Gets or sets the http requests.

retryPolicy

Gets or sets the retry policy.

serviceBusQueueMessage

Gets or sets the service bus queue message.

serviceBusTopicMessage

Gets or sets the service bus topic message.

type

Gets or sets the job action type.

JobActionType

Gets or sets the job action type.

Name Type Description
Http
  • string
Https
  • string
ServiceBusQueue
  • string
ServiceBusTopic
  • string
StorageQueue
  • string

JobDefinition

Name Type Description
id
  • string

Gets the job resource identifier.

name
  • string

Gets the job resource name.

properties

Gets or sets the job properties.

type
  • string

Gets the job resource type.

JobErrorAction

Name Type Description
queueMessage

Gets or sets the storage queue message.

request

Gets or sets the http requests.

retryPolicy

Gets or sets the retry policy.

serviceBusQueueMessage

Gets or sets the service bus queue message.

serviceBusTopicMessage

Gets or sets the service bus topic message.

type

Gets or sets the job error action type.

JobProperties

Name Type Description
action

Gets or sets the job action.

recurrence

Gets or sets the job recurrence.

startTime
  • string

Gets or sets the job start time.

state

Gets or set the job state.

status

Gets the job status.

JobRecurrence

Name Type Description
count
  • integer

Gets or sets the maximum number of times that the job should run.

endTime
  • string

Gets or sets the time at which the job will complete.

frequency

Gets or sets the frequency of recurrence (second, minute, hour, day, week, month).

interval
  • integer

Gets or sets the interval between retries.

schedule

JobRecurrenceSchedule

Name Type Description
hours
  • integer[]

Gets or sets the hours of the day that the job should execute at.

minutes
  • integer[]

Gets or sets the minutes of the hour that the job should execute at.

monthDays
  • integer[]

Gets or sets the days of the month that the job should execute on. Must be between 1 and 31.

monthlyOccurrences

Gets or sets the occurrences of days within a month.

weekDays
  • string[]

Gets or sets the days of the week that the job should execute on.

JobRecurrenceScheduleMonthlyOccurrence

Name Type Description
Occurrence
  • integer

Gets or sets the occurrence. Must be between -5 and 5.

day

Gets or sets the day. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.

JobScheduleDay

Gets or sets the day. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.

Name Type Description
Friday
  • string
Monday
  • string
Saturday
  • string
Sunday
  • string
Thursday
  • string
Tuesday
  • string
Wednesday
  • string

JobState

Gets or set the job state.

Name Type Description
Completed
  • string
Disabled
  • string
Enabled
  • string
Faulted
  • string

JobStatus

Name Type Description
executionCount
  • integer

Gets the number of times this job has executed.

failureCount
  • integer

Gets the number of times this job has failed.

faultedCount
  • integer

Gets the number of faulted occurrences (occurrences that were retried and failed as many times as the retry policy states).

lastExecutionTime
  • string

Gets the time the last occurrence executed in ISO-8601 format. Could be empty if job has not run yet.

nextExecutionTime
  • string

Gets the time of the next occurrence in ISO-8601 format. Could be empty if the job is completed.

OAuthAuthentication

Name Type Description
audience
  • string

Gets or sets the audience.

clientId
  • string

Gets or sets the client identifier.

secret
  • string

Gets or sets the secret, return value will always be empty.

tenant
  • string

Gets or sets the tenant.

type string:
  • ActiveDirectoryOAuth

Gets or sets the HTTP authentication type.

RecurrenceFrequency

Gets or sets the frequency of recurrence (minute, hour, day, week, month).

Name Type Description
Day
  • string
Hour
  • string
Minute
  • string
Month
  • string
Week
  • string

RetryPolicy

Name Type Description
retryCount
  • integer

Gets or sets the number of times a retry should be attempted.

retryInterval
  • string

Gets or sets the retry interval between retries, specify duration in ISO 8601 format.

retryType

Gets or sets the retry strategy to be used.

RetryType

Gets or sets the retry strategy to be used.

Name Type Description
Fixed
  • string
None
  • string

ServiceBusAuthentication

Name Type Description
sasKey
  • string

Gets or sets the SAS key.

sasKeyName
  • string

Gets or sets the SAS key name.

type

Gets or sets the authentication type.

ServiceBusAuthenticationType

Gets or sets the authentication type.

Name Type Description
NotSpecified
  • string
SharedAccessKey
  • string

ServiceBusBrokeredMessageProperties

Name Type Description
contentType
  • string

Gets or sets the content type.

correlationId
  • string

Gets or sets the correlation ID.

forcePersistence
  • boolean

Gets or sets the force persistence.

label
  • string

Gets or sets the label.

messageId
  • string

Gets or sets the message ID.

partitionKey
  • string

Gets or sets the partition key.

replyTo
  • string

Gets or sets the reply to.

replyToSessionId
  • string

Gets or sets the reply to session ID.

scheduledEnqueueTimeUtc
  • string

Gets or sets the scheduled enqueue time UTC.

sessionId
  • string

Gets or sets the session ID.

timeToLive
  • string

Gets or sets the time to live.

to
  • string

Gets or sets the to.

viaPartitionKey
  • string

Gets or sets the via partition key.

ServiceBusQueueMessage

Name Type Description
authentication

Gets or sets the Service Bus authentication.

brokeredMessageProperties

Gets or sets the brokered message properties.

customMessageProperties
  • object

Gets or sets the custom message properties.

message
  • string

Gets or sets the message.

namespace
  • string

Gets or sets the namespace.

queueName
  • string

Gets or sets the queue name.

transportType

Gets or sets the transport type.

ServiceBusTopicMessage

Name Type Description
authentication

Gets or sets the Service Bus authentication.

brokeredMessageProperties

Gets or sets the brokered message properties.

customMessageProperties
  • object

Gets or sets the custom message properties.

message
  • string

Gets or sets the message.

namespace
  • string

Gets or sets the namespace.

topicPath
  • string

Gets or sets the topic path.

transportType

Gets or sets the transport type.

ServiceBusTransportType

Gets or sets the transport type.

Name Type Description
AMQP
  • string
NetMessaging
  • string
NotSpecified
  • string

StorageQueueMessage

Name Type Description
message
  • string

Gets or sets the message.

queueName
  • string

Gets or sets the queue name.

sasToken
  • string

Gets or sets the SAS key.

storageAccount
  • string

Gets or sets the storage account name.