Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
- Latest
- 2024-11-01-preview
- 2024-05-01-preview
- 2023-08-01
- 2023-08-01-preview
- 2023-05-01-preview
- 2023-02-01-preview
- 2022-11-01-preview
- 2022-08-01-preview
- 2022-05-01-preview
- 2022-02-01-preview
- 2021-11-01
- 2021-11-01-preview
- 2021-08-01-preview
- 2021-05-01-preview
- 2021-02-01-preview
- 2020-11-01-preview
- 2020-08-01-preview
- 2020-02-02-preview
- 2017-03-01-preview
Bicep resource definition
The servers/jobAgents/jobs resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Sql/servers/jobAgents/jobs resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Sql/servers/jobAgents/jobs@2022-05-01-preview' = {
parent: resourceSymbolicName
name: 'string'
properties: {
description: 'string'
schedule: {
enabled: bool
endTime: 'string'
interval: 'string'
startTime: 'string'
type: 'string'
}
}
}
Property Values
Microsoft.Sql/servers/jobAgents/jobs
| Name | Description | Value |
|---|---|---|
| name | The resource name | string (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: servers/jobAgents |
| properties | Resource properties. | JobProperties |
JobProperties
| Name | Description | Value |
|---|---|---|
| description | User-defined description of the job. | string |
| schedule | Schedule properties of the job. | JobSchedule |
JobSchedule
| Name | Description | Value |
|---|---|---|
| enabled | Whether or not the schedule is enabled. | bool |
| endTime | Schedule end time. | string |
| interval | Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format. | string |
| startTime | Schedule start time. | string |
| type | Schedule interval type | 'Once' 'Recurring' |
ARM template resource definition
The servers/jobAgents/jobs resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Sql/servers/jobAgents/jobs resource, add the following JSON to your template.
{
"type": "Microsoft.Sql/servers/jobAgents/jobs",
"apiVersion": "2022-05-01-preview",
"name": "string",
"properties": {
"description": "string",
"schedule": {
"enabled": "bool",
"endTime": "string",
"interval": "string",
"startTime": "string",
"type": "string"
}
}
}
Property Values
Microsoft.Sql/servers/jobAgents/jobs
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2022-05-01-preview' |
| name | The resource name | string (required) |
| properties | Resource properties. | JobProperties |
| type | The resource type | 'Microsoft.Sql/servers/jobAgents/jobs' |
JobProperties
| Name | Description | Value |
|---|---|---|
| description | User-defined description of the job. | string |
| schedule | Schedule properties of the job. | JobSchedule |
JobSchedule
| Name | Description | Value |
|---|---|---|
| enabled | Whether or not the schedule is enabled. | bool |
| endTime | Schedule end time. | string |
| interval | Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format. | string |
| startTime | Schedule start time. | string |
| type | Schedule interval type | 'Once' 'Recurring' |
Usage Examples
Terraform (AzAPI provider) resource definition
The servers/jobAgents/jobs resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Sql/servers/jobAgents/jobs resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Sql/servers/jobAgents/jobs@2022-05-01-preview"
name = "string"
parent_id = "string"
body = {
properties = {
description = "string"
schedule = {
enabled = bool
endTime = "string"
interval = "string"
startTime = "string"
type = "string"
}
}
}
}
Property Values
Microsoft.Sql/servers/jobAgents/jobs
| Name | Description | Value |
|---|---|---|
| name | The resource name | string (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: servers/jobAgents |
| properties | Resource properties. | JobProperties |
| type | The resource type | "Microsoft.Sql/servers/jobAgents/jobs@2022-05-01-preview" |
JobProperties
| Name | Description | Value |
|---|---|---|
| description | User-defined description of the job. | string |
| schedule | Schedule properties of the job. | JobSchedule |
JobSchedule
| Name | Description | Value |
|---|---|---|
| enabled | Whether or not the schedule is enabled. | bool |
| endTime | Schedule end time. | string |
| interval | Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format. | string |
| startTime | Schedule start time. | string |
| type | Schedule interval type | 'Once' 'Recurring' |
Usage Examples
Terraform Samples
A basic example of deploying Elastic Job.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
data "azapi_client_config" "current" {}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westus"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "server" {
type = "Microsoft.Sql/servers@2023-08-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = "${var.resource_name}-server"
location = var.location
body = {
properties = {
administratorLogin = "4dm1n157r470r"
administratorLoginPassword = "4-v3ry-53cr37-p455w0rd"
minimalTlsVersion = "1.2"
publicNetworkAccess = "Enabled"
restrictOutboundNetworkAccess = "Disabled"
version = "12.0"
}
}
}
resource "azapi_resource" "database" {
type = "Microsoft.Sql/servers/databases@2023-08-01-preview"
parent_id = azapi_resource.server.id
name = "${var.resource_name}-db"
location = var.location
body = {
properties = {
autoPauseDelay = 0
collation = "SQL_Latin1_General_CP1_CI_AS"
createMode = "Default"
elasticPoolId = ""
encryptionProtectorAutoRotation = false
highAvailabilityReplicaCount = 0
isLedgerOn = false
licenseType = ""
maintenanceConfigurationId = "/subscriptions/${data.azapi_client_config.current.subscription_id}/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"
minCapacity = 0
readScale = "Disabled"
requestedBackupStorageRedundancy = "Geo"
sampleName = ""
secondaryType = ""
zoneRedundant = false
}
sku = {
name = "S1"
}
}
}
resource "azapi_resource" "jobAgent" {
type = "Microsoft.Sql/servers/jobAgents@2023-08-01-preview"
parent_id = azapi_resource.server.id
name = "${var.resource_name}-job-agent"
location = var.location
body = {
properties = {
databaseId = azapi_resource.database.id
}
sku = {
name = "JA100"
}
}
}
resource "azapi_resource" "job" {
type = "Microsoft.Sql/servers/jobAgents/jobs@2023-08-01-preview"
parent_id = azapi_resource.jobAgent.id
name = "${var.resource_name}-job"
body = {
properties = {
description = ""
}
}
}