1. Packages
  2. Azure Native v2
  3. API Docs
  4. sql
  5. JobAgent
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.sql.JobAgent

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

An Azure SQL job agent. Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.

Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.

Example Usage

Create or update a job agent

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var jobAgent = new AzureNative.Sql.JobAgent("jobAgent", new()
    {
        DatabaseId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1",
        JobAgentName = "agent1",
        Location = "southeastasia",
        ResourceGroupName = "group1",
        ServerName = "server1",
    });

});
Copy
package main

import (
	sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sql.NewJobAgent(ctx, "jobAgent", &sql.JobAgentArgs{
			DatabaseId:        pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"),
			JobAgentName:      pulumi.String("agent1"),
			Location:          pulumi.String("southeastasia"),
			ResourceGroupName: pulumi.String("group1"),
			ServerName:        pulumi.String("server1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.JobAgent;
import com.pulumi.azurenative.sql.JobAgentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var jobAgent = new JobAgent("jobAgent", JobAgentArgs.builder()
            .databaseId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1")
            .jobAgentName("agent1")
            .location("southeastasia")
            .resourceGroupName("group1")
            .serverName("server1")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const jobAgent = new azure_native.sql.JobAgent("jobAgent", {
    databaseId: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1",
    jobAgentName: "agent1",
    location: "southeastasia",
    resourceGroupName: "group1",
    serverName: "server1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

job_agent = azure_native.sql.JobAgent("jobAgent",
    database_id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1",
    job_agent_name="agent1",
    location="southeastasia",
    resource_group_name="group1",
    server_name="server1")
Copy
resources:
  jobAgent:
    type: azure-native:sql:JobAgent
    properties:
      databaseId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1
      jobAgentName: agent1
      location: southeastasia
      resourceGroupName: group1
      serverName: server1
Copy

Create JobAgent Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new JobAgent(name: string, args: JobAgentArgs, opts?: CustomResourceOptions);
@overload
def JobAgent(resource_name: str,
             args: JobAgentArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def JobAgent(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             database_id: Optional[str] = None,
             resource_group_name: Optional[str] = None,
             server_name: Optional[str] = None,
             job_agent_name: Optional[str] = None,
             location: Optional[str] = None,
             sku: Optional[SkuArgs] = None,
             tags: Optional[Mapping[str, str]] = None)
func NewJobAgent(ctx *Context, name string, args JobAgentArgs, opts ...ResourceOption) (*JobAgent, error)
public JobAgent(string name, JobAgentArgs args, CustomResourceOptions? opts = null)
public JobAgent(String name, JobAgentArgs args)
public JobAgent(String name, JobAgentArgs args, CustomResourceOptions options)
type: azure-native:sql:JobAgent
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. JobAgentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. JobAgentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. JobAgentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. JobAgentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. JobAgentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var jobAgentResource = new AzureNative.Sql.JobAgent("jobAgentResource", new()
{
    DatabaseId = "string",
    ResourceGroupName = "string",
    ServerName = "string",
    JobAgentName = "string",
    Location = "string",
    Sku = 
    {
        { "name", "string" },
        { "capacity", 0 },
        { "family", "string" },
        { "size", "string" },
        { "tier", "string" },
    },
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := sql.NewJobAgent(ctx, "jobAgentResource", &sql.JobAgentArgs{
	DatabaseId:        "string",
	ResourceGroupName: "string",
	ServerName:        "string",
	JobAgentName:      "string",
	Location:          "string",
	Sku: map[string]interface{}{
		"name":     "string",
		"capacity": 0,
		"family":   "string",
		"size":     "string",
		"tier":     "string",
	},
	Tags: map[string]interface{}{
		"string": "string",
	},
})
Copy
var jobAgentResource = new JobAgent("jobAgentResource", JobAgentArgs.builder()
    .databaseId("string")
    .resourceGroupName("string")
    .serverName("string")
    .jobAgentName("string")
    .location("string")
    .sku(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .build());
Copy
job_agent_resource = azure_native.sql.JobAgent("jobAgentResource",
    database_id=string,
    resource_group_name=string,
    server_name=string,
    job_agent_name=string,
    location=string,
    sku={
        name: string,
        capacity: 0,
        family: string,
        size: string,
        tier: string,
    },
    tags={
        string: string,
    })
Copy
const jobAgentResource = new azure_native.sql.JobAgent("jobAgentResource", {
    databaseId: "string",
    resourceGroupName: "string",
    serverName: "string",
    jobAgentName: "string",
    location: "string",
    sku: {
        name: "string",
        capacity: 0,
        family: "string",
        size: "string",
        tier: "string",
    },
    tags: {
        string: "string",
    },
});
Copy
type: azure-native:sql:JobAgent
properties:
    databaseId: string
    jobAgentName: string
    location: string
    resourceGroupName: string
    serverName: string
    sku:
        capacity: 0
        family: string
        name: string
        size: string
        tier: string
    tags:
        string: string
Copy

JobAgent Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The JobAgent resource accepts the following input properties:

DatabaseId
This property is required.
Changes to this property will trigger replacement.
string
Resource ID of the database to store job metadata in.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
JobAgentName Changes to this property will trigger replacement. string
The name of the job agent to be created or updated.
Location Changes to this property will trigger replacement. string
Resource location.
Sku Pulumi.AzureNative.Sql.Inputs.Sku
The name and tier of the SKU.
Tags Dictionary<string, string>
Resource tags.
DatabaseId
This property is required.
Changes to this property will trigger replacement.
string
Resource ID of the database to store job metadata in.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
JobAgentName Changes to this property will trigger replacement. string
The name of the job agent to be created or updated.
Location Changes to this property will trigger replacement. string
Resource location.
Sku SkuArgs
The name and tier of the SKU.
Tags map[string]string
Resource tags.
databaseId
This property is required.
Changes to this property will trigger replacement.
String
Resource ID of the database to store job metadata in.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the server.
jobAgentName Changes to this property will trigger replacement. String
The name of the job agent to be created or updated.
location Changes to this property will trigger replacement. String
Resource location.
sku Sku
The name and tier of the SKU.
tags Map<String,String>
Resource tags.
databaseId
This property is required.
Changes to this property will trigger replacement.
string
Resource ID of the database to store job metadata in.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
jobAgentName Changes to this property will trigger replacement. string
The name of the job agent to be created or updated.
location Changes to this property will trigger replacement. string
Resource location.
sku Sku
The name and tier of the SKU.
tags {[key: string]: string}
Resource tags.
database_id
This property is required.
Changes to this property will trigger replacement.
str
Resource ID of the database to store job metadata in.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
server_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the server.
job_agent_name Changes to this property will trigger replacement. str
The name of the job agent to be created or updated.
location Changes to this property will trigger replacement. str
Resource location.
sku SkuArgs
The name and tier of the SKU.
tags Mapping[str, str]
Resource tags.
databaseId
This property is required.
Changes to this property will trigger replacement.
String
Resource ID of the database to store job metadata in.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the server.
jobAgentName Changes to this property will trigger replacement. String
The name of the job agent to be created or updated.
location Changes to this property will trigger replacement. String
Resource location.
sku Property Map
The name and tier of the SKU.
tags Map<String>
Resource tags.

Outputs

All input properties are implicitly available as output properties. Additionally, the JobAgent resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
State string
The state of the job agent.
Type string
Resource type.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
State string
The state of the job agent.
Type string
Resource type.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
state String
The state of the job agent.
type String
Resource type.
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name.
state string
The state of the job agent.
type string
Resource type.
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name.
state str
The state of the job agent.
type str
Resource type.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
state String
The state of the job agent.
type String
Resource type.

Supporting Types

Sku
, SkuArgs

Name This property is required. string
The name of the SKU, typically, a letter + Number code, e.g. P3.
Capacity int
Capacity of the particular SKU.
Family string
If the service has different generations of hardware, for the same SKU, then that can be captured here.
Size string
Size of the particular SKU
Tier string
The tier or edition of the particular SKU, e.g. Basic, Premium.
Name This property is required. string
The name of the SKU, typically, a letter + Number code, e.g. P3.
Capacity int
Capacity of the particular SKU.
Family string
If the service has different generations of hardware, for the same SKU, then that can be captured here.
Size string
Size of the particular SKU
Tier string
The tier or edition of the particular SKU, e.g. Basic, Premium.
name This property is required. String
The name of the SKU, typically, a letter + Number code, e.g. P3.
capacity Integer
Capacity of the particular SKU.
family String
If the service has different generations of hardware, for the same SKU, then that can be captured here.
size String
Size of the particular SKU
tier String
The tier or edition of the particular SKU, e.g. Basic, Premium.
name This property is required. string
The name of the SKU, typically, a letter + Number code, e.g. P3.
capacity number
Capacity of the particular SKU.
family string
If the service has different generations of hardware, for the same SKU, then that can be captured here.
size string
Size of the particular SKU
tier string
The tier or edition of the particular SKU, e.g. Basic, Premium.
name This property is required. str
The name of the SKU, typically, a letter + Number code, e.g. P3.
capacity int
Capacity of the particular SKU.
family str
If the service has different generations of hardware, for the same SKU, then that can be captured here.
size str
Size of the particular SKU
tier str
The tier or edition of the particular SKU, e.g. Basic, Premium.
name This property is required. String
The name of the SKU, typically, a letter + Number code, e.g. P3.
capacity Number
Capacity of the particular SKU.
family String
If the service has different generations of hardware, for the same SKU, then that can be captured here.
size String
Size of the particular SKU
tier String
The tier or edition of the particular SKU, e.g. Basic, Premium.

SkuResponse
, SkuResponseArgs

Name This property is required. string
The name of the SKU, typically, a letter + Number code, e.g. P3.
Capacity int
Capacity of the particular SKU.
Family string
If the service has different generations of hardware, for the same SKU, then that can be captured here.
Size string
Size of the particular SKU
Tier string
The tier or edition of the particular SKU, e.g. Basic, Premium.
Name This property is required. string
The name of the SKU, typically, a letter + Number code, e.g. P3.
Capacity int
Capacity of the particular SKU.
Family string
If the service has different generations of hardware, for the same SKU, then that can be captured here.
Size string
Size of the particular SKU
Tier string
The tier or edition of the particular SKU, e.g. Basic, Premium.
name This property is required. String
The name of the SKU, typically, a letter + Number code, e.g. P3.
capacity Integer
Capacity of the particular SKU.
family String
If the service has different generations of hardware, for the same SKU, then that can be captured here.
size String
Size of the particular SKU
tier String
The tier or edition of the particular SKU, e.g. Basic, Premium.
name This property is required. string
The name of the SKU, typically, a letter + Number code, e.g. P3.
capacity number
Capacity of the particular SKU.
family string
If the service has different generations of hardware, for the same SKU, then that can be captured here.
size string
Size of the particular SKU
tier string
The tier or edition of the particular SKU, e.g. Basic, Premium.
name This property is required. str
The name of the SKU, typically, a letter + Number code, e.g. P3.
capacity int
Capacity of the particular SKU.
family str
If the service has different generations of hardware, for the same SKU, then that can be captured here.
size str
Size of the particular SKU
tier str
The tier or edition of the particular SKU, e.g. Basic, Premium.
name This property is required. String
The name of the SKU, typically, a letter + Number code, e.g. P3.
capacity Number
Capacity of the particular SKU.
family String
If the service has different generations of hardware, for the same SKU, then that can be captured here.
size String
Size of the particular SKU
tier String
The tier or edition of the particular SKU, e.g. Basic, Premium.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:sql:JobAgent agent1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi