JobAgentArgs

data class JobAgentArgs(val databaseId: Output<String>? = null, val identity: Output<JobAgentIdentityArgs>? = null, val jobAgentName: Output<String>? = null, val location: Output<String>? = null, val resourceGroupName: Output<String>? = null, val serverName: Output<String>? = null, val sku: Output<SkuArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<JobAgentArgs>

An Azure SQL job agent. Uses Azure REST API version 2023-08-01. In version 2.x of the Azure Native provider, it used API version 2021-11-01. Other available API versions: 2017-03-01-preview, 2020-02-02-preview, 2020-08-01-preview, 2020-11-01-preview, 2021-02-01-preview, 2021-05-01-preview, 2021-08-01-preview, 2021-11-01, 2021-11-01-preview, 2022-02-01-preview, 2022-05-01-preview, 2022-08-01-preview, 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native sql [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

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",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v3"
"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
})
}
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());
}
}

Create or update a job agent with sku.

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",
Sku = new AzureNative.Sql.Inputs.SkuArgs
{
Name = "JA400",
},
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v3"
"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"),
Sku: &sql.SkuArgs{
Name: pulumi.String("JA400"),
},
})
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.azurenative.sql.JobAgent;
import com.pulumi.azurenative.sql.JobAgentArgs;
import com.pulumi.azurenative.sql.inputs.SkuArgs;
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")
.sku(SkuArgs.builder()
.name("JA400")
.build())
.build());
}
}

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}

Constructors

Link copied to clipboard
constructor(databaseId: Output<String>? = null, identity: Output<JobAgentIdentityArgs>? = null, jobAgentName: Output<String>? = null, location: Output<String>? = null, resourceGroupName: Output<String>? = null, serverName: Output<String>? = null, sku: Output<SkuArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val databaseId: Output<String>? = null

Resource ID of the database to store job metadata in.

Link copied to clipboard
val identity: Output<JobAgentIdentityArgs>? = null

The identity of the job agent.

Link copied to clipboard
val jobAgentName: Output<String>? = null

The name of the job agent to be created or updated.

Link copied to clipboard
val location: Output<String>? = null

Resource location.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

Link copied to clipboard
val serverName: Output<String>? = null

The name of the server.

Link copied to clipboard
val sku: Output<SkuArgs>? = null

The name and tier of the SKU.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Functions

Link copied to clipboard
open override fun toJava(): JobAgentArgs