1. Packages
  2. Azure Classic
  3. API Docs
  4. mssql
  5. JobAgent

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

azure.mssql.JobAgent

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

    Manages an Elastic Job Agent.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "northeurope",
        });
    
        var exampleServer = new Azure.MSSql.Server("exampleServer", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            Version = "12.0",
            AdministratorLogin = "4dm1n157r470r",
            AdministratorLoginPassword = "4-v3ry-53cr37-p455w0rd",
        });
    
        var exampleDatabase = new Azure.MSSql.Database("exampleDatabase", new()
        {
            ServerId = exampleServer.Id,
            Collation = "SQL_Latin1_General_CP1_CI_AS",
            SkuName = "S1",
        });
    
        var exampleJobAgent = new Azure.MSSql.JobAgent("exampleJobAgent", new()
        {
            Location = exampleResourceGroup.Location,
            DatabaseId = exampleDatabase.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mssql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("northeurope"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleServer, err := mssql.NewServer(ctx, "exampleServer", &mssql.ServerArgs{
    			ResourceGroupName:          exampleResourceGroup.Name,
    			Location:                   exampleResourceGroup.Location,
    			Version:                    pulumi.String("12.0"),
    			AdministratorLogin:         pulumi.String("4dm1n157r470r"),
    			AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleDatabase, err := mssql.NewDatabase(ctx, "exampleDatabase", &mssql.DatabaseArgs{
    			ServerId:  exampleServer.ID(),
    			Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
    			SkuName:   pulumi.String("S1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mssql.NewJobAgent(ctx, "exampleJobAgent", &mssql.JobAgentArgs{
    			Location:   exampleResourceGroup.Location,
    			DatabaseId: exampleDatabase.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.mssql.Server;
    import com.pulumi.azure.mssql.ServerArgs;
    import com.pulumi.azure.mssql.Database;
    import com.pulumi.azure.mssql.DatabaseArgs;
    import com.pulumi.azure.mssql.JobAgent;
    import com.pulumi.azure.mssql.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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("northeurope")
                .build());
    
            var exampleServer = new Server("exampleServer", ServerArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .version("12.0")
                .administratorLogin("4dm1n157r470r")
                .administratorLoginPassword("4-v3ry-53cr37-p455w0rd")
                .build());
    
            var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()        
                .serverId(exampleServer.id())
                .collation("SQL_Latin1_General_CP1_CI_AS")
                .skuName("S1")
                .build());
    
            var exampleJobAgent = new JobAgent("exampleJobAgent", JobAgentArgs.builder()        
                .location(exampleResourceGroup.location())
                .databaseId(exampleDatabase.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="northeurope")
    example_server = azure.mssql.Server("exampleServer",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        version="12.0",
        administrator_login="4dm1n157r470r",
        administrator_login_password="4-v3ry-53cr37-p455w0rd")
    example_database = azure.mssql.Database("exampleDatabase",
        server_id=example_server.id,
        collation="SQL_Latin1_General_CP1_CI_AS",
        sku_name="S1")
    example_job_agent = azure.mssql.JobAgent("exampleJobAgent",
        location=example_resource_group.location,
        database_id=example_database.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "northeurope"});
    const exampleServer = new azure.mssql.Server("exampleServer", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        version: "12.0",
        administratorLogin: "4dm1n157r470r",
        administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
    });
    const exampleDatabase = new azure.mssql.Database("exampleDatabase", {
        serverId: exampleServer.id,
        collation: "SQL_Latin1_General_CP1_CI_AS",
        skuName: "S1",
    });
    const exampleJobAgent = new azure.mssql.JobAgent("exampleJobAgent", {
        location: exampleResourceGroup.location,
        databaseId: exampleDatabase.id,
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: northeurope
      exampleServer:
        type: azure:mssql:Server
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          version: '12.0'
          administratorLogin: 4dm1n157r470r
          administratorLoginPassword: 4-v3ry-53cr37-p455w0rd
      exampleDatabase:
        type: azure:mssql:Database
        properties:
          serverId: ${exampleServer.id}
          collation: SQL_Latin1_General_CP1_CI_AS
          skuName: S1
      exampleJobAgent:
        type: azure:mssql:JobAgent
        properties:
          location: ${exampleResourceGroup.location}
          databaseId: ${exampleDatabase.id}
    

    Create JobAgent Resource

    new JobAgent(name: string, args: JobAgentArgs, opts?: CustomResourceOptions);
    @overload
    def JobAgent(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 database_id: Optional[str] = None,
                 location: Optional[str] = None,
                 name: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None)
    @overload
    def JobAgent(resource_name: str,
                 args: JobAgentArgs,
                 opts: Optional[ResourceOptions] = 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:mssql:JobAgent
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args JobAgentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args JobAgentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args JobAgentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args JobAgentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    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

    The JobAgent resource accepts the following input properties:

    DatabaseId string

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    Location string

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    Name string

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    Tags Dictionary<string, string>

    A mapping of tags which should be assigned to the Database.

    DatabaseId string

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    Location string

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    Name string

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    Tags map[string]string

    A mapping of tags which should be assigned to the Database.

    databaseId String

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    location String

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    name String

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    tags Map<String,String>

    A mapping of tags which should be assigned to the Database.

    databaseId string

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    location string

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    name string

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    tags {[key: string]: string}

    A mapping of tags which should be assigned to the Database.

    database_id str

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    location str

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    name str

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    tags Mapping[str, str]

    A mapping of tags which should be assigned to the Database.

    databaseId String

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    location String

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    name String

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    tags Map<String>

    A mapping of tags which should be assigned to the Database.

    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.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing JobAgent Resource

    Get an existing JobAgent resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: JobAgentState, opts?: CustomResourceOptions): JobAgent
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            database_id: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> JobAgent
    func GetJobAgent(ctx *Context, name string, id IDInput, state *JobAgentState, opts ...ResourceOption) (*JobAgent, error)
    public static JobAgent Get(string name, Input<string> id, JobAgentState? state, CustomResourceOptions? opts = null)
    public static JobAgent get(String name, Output<String> id, JobAgentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DatabaseId string

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    Location string

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    Name string

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    Tags Dictionary<string, string>

    A mapping of tags which should be assigned to the Database.

    DatabaseId string

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    Location string

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    Name string

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    Tags map[string]string

    A mapping of tags which should be assigned to the Database.

    databaseId String

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    location String

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    name String

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    tags Map<String,String>

    A mapping of tags which should be assigned to the Database.

    databaseId string

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    location string

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    name string

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    tags {[key: string]: string}

    A mapping of tags which should be assigned to the Database.

    database_id str

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    location str

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    name str

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    tags Mapping[str, str]

    A mapping of tags which should be assigned to the Database.

    databaseId String

    The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    location String

    The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.

    name String

    The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.

    tags Map<String>

    A mapping of tags which should be assigned to the Database.

    Import

    Elastic Job Agents can be imported using the id, e.g.

     $ pulumi import azure:mssql/jobAgent:JobAgent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Sql/servers/myserver1/jobAgents/myjobagent1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi