JobStepArgs

data class JobStepArgs(val action: Output<JobStepActionArgs>? = null, val credential: Output<String>? = null, val executionOptions: Output<JobStepExecutionOptionsArgs>? = null, val jobAgentName: Output<String>? = null, val jobName: Output<String>? = null, val output: Output<JobStepOutputArgs>? = null, val resourceGroupName: Output<String>? = null, val serverName: Output<String>? = null, val stepId: Output<Int>? = null, val stepName: Output<String>? = null, val targetGroup: Output<String>? = null) : ConvertibleToJava<JobStepArgs>

A job step. 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 step with all properties specified.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var jobStep = new AzureNative.Sql.JobStep("jobStep", new()
{
Action = new AzureNative.Sql.Inputs.JobStepActionArgs
{
Source = AzureNative.Sql.JobStepActionSource.Inline,
Type = AzureNative.Sql.JobStepActionType.TSql,
Value = "select 2",
},
Credential = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1",
ExecutionOptions = new AzureNative.Sql.Inputs.JobStepExecutionOptionsArgs
{
InitialRetryIntervalSeconds = 11,
MaximumRetryIntervalSeconds = 222,
RetryAttempts = 42,
RetryIntervalBackoffMultiplier = 3,
TimeoutSeconds = 1234,
},
JobAgentName = "agent1",
JobName = "job1",
Output = new AzureNative.Sql.Inputs.JobStepOutputArgs
{
Credential = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0",
DatabaseName = "database3",
ResourceGroupName = "group3",
SchemaName = "myschema1234",
ServerName = "server3",
SubscriptionId = "3501b905-a848-4b5d-96e8-b253f62d735a",
TableName = "mytable5678",
Type = AzureNative.Sql.JobStepOutputType.SqlDatabase,
},
ResourceGroupName = "group1",
ServerName = "server1",
StepId = 1,
StepName = "step1",
TargetGroup = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1",
});
});
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.NewJobStep(ctx, "jobStep", &sql.JobStepArgs{
Action: &sql.JobStepActionArgs{
Source: pulumi.String(sql.JobStepActionSourceInline),
Type: pulumi.String(sql.JobStepActionTypeTSql),
Value: pulumi.String("select 2"),
},
Credential: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"),
ExecutionOptions: &sql.JobStepExecutionOptionsArgs{
InitialRetryIntervalSeconds: pulumi.Int(11),
MaximumRetryIntervalSeconds: pulumi.Int(222),
RetryAttempts: pulumi.Int(42),
RetryIntervalBackoffMultiplier: pulumi.Float64(3),
TimeoutSeconds: pulumi.Int(1234),
},
JobAgentName: pulumi.String("agent1"),
JobName: pulumi.String("job1"),
Output: &sql.JobStepOutputTypeArgs{
Credential: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0"),
DatabaseName: pulumi.String("database3"),
ResourceGroupName: pulumi.String("group3"),
SchemaName: pulumi.String("myschema1234"),
ServerName: pulumi.String("server3"),
SubscriptionId: pulumi.String("3501b905-a848-4b5d-96e8-b253f62d735a"),
TableName: pulumi.String("mytable5678"),
Type: pulumi.String(sql.JobStepOutputTypeSqlDatabase),
},
ResourceGroupName: pulumi.String("group1"),
ServerName: pulumi.String("server1"),
StepId: pulumi.Int(1),
StepName: pulumi.String("step1"),
TargetGroup: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1"),
})
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.JobStep;
import com.pulumi.azurenative.sql.JobStepArgs;
import com.pulumi.azurenative.sql.inputs.JobStepActionArgs;
import com.pulumi.azurenative.sql.inputs.JobStepExecutionOptionsArgs;
import com.pulumi.azurenative.sql.inputs.JobStepOutputArgs;
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 jobStep = new JobStep("jobStep", JobStepArgs.builder()
.action(JobStepActionArgs.builder()
.source("Inline")
.type("TSql")
.value("select 2")
.build())
.credential("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1")
.executionOptions(JobStepExecutionOptionsArgs.builder()
.initialRetryIntervalSeconds(11)
.maximumRetryIntervalSeconds(222)
.retryAttempts(42)
.retryIntervalBackoffMultiplier(3)
.timeoutSeconds(1234)
.build())
.jobAgentName("agent1")
.jobName("job1")
.output(JobStepOutputArgs.builder()
.credential("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0")
.databaseName("database3")
.resourceGroupName("group3")
.schemaName("myschema1234")
.serverName("server3")
.subscriptionId("3501b905-a848-4b5d-96e8-b253f62d735a")
.tableName("mytable5678")
.type("SqlDatabase")
.build())
.resourceGroupName("group1")
.serverName("server1")
.stepId(1)
.stepName("step1")
.targetGroup("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1")
.build());
}
}

Create or update a job step with minimal properties specified.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var jobStep = new AzureNative.Sql.JobStep("jobStep", new()
{
Action = new AzureNative.Sql.Inputs.JobStepActionArgs
{
Value = "select 1",
},
JobAgentName = "agent1",
JobName = "job1",
ResourceGroupName = "group1",
ServerName = "server1",
StepName = "step1",
TargetGroup = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0",
});
});
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.NewJobStep(ctx, "jobStep", &sql.JobStepArgs{
Action: &sql.JobStepActionArgs{
Value: pulumi.String("select 1"),
},
JobAgentName: pulumi.String("agent1"),
JobName: pulumi.String("job1"),
ResourceGroupName: pulumi.String("group1"),
ServerName: pulumi.String("server1"),
StepName: pulumi.String("step1"),
TargetGroup: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0"),
})
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.JobStep;
import com.pulumi.azurenative.sql.JobStepArgs;
import com.pulumi.azurenative.sql.inputs.JobStepActionArgs;
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 jobStep = new JobStep("jobStep", JobStepArgs.builder()
.action(JobStepActionArgs.builder()
.value("select 1")
.build())
.jobAgentName("agent1")
.jobName("job1")
.resourceGroupName("group1")
.serverName("server1")
.stepName("step1")
.targetGroup("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0")
.build());
}
}

Import

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

$ pulumi import azure-native:sql:JobStep step1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}

Constructors

Link copied to clipboard
constructor(action: Output<JobStepActionArgs>? = null, credential: Output<String>? = null, executionOptions: Output<JobStepExecutionOptionsArgs>? = null, jobAgentName: Output<String>? = null, jobName: Output<String>? = null, output: Output<JobStepOutputArgs>? = null, resourceGroupName: Output<String>? = null, serverName: Output<String>? = null, stepId: Output<Int>? = null, stepName: Output<String>? = null, targetGroup: Output<String>? = null)

Properties

Link copied to clipboard
val action: Output<JobStepActionArgs>? = null

The action payload of the job step.

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

The resource ID of the job credential that will be used to connect to the targets.

Link copied to clipboard

Execution options for the job step.

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

The name of the job agent.

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

The name of the job.

Link copied to clipboard
val output: Output<JobStepOutputArgs>? = null

Output destination properties of the job step.

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 stepId: Output<Int>? = null

The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified.

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

The name of the job step.

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

The resource ID of the target group that the job step will be executed on.

Functions

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