Service Task Args
data class ServiceTaskArgs(val groupName: Output<String>? = null, val properties: Output<Any>? = null, val serviceName: Output<String>? = null, val taskName: Output<String>? = null) : ConvertibleToJava<ServiceTaskArgs>
A task resource Uses Azure REST API version 2023-07-15-preview. In version 2.x of the Azure Native provider, it used API version 2021-06-30. Other available API versions: 2021-06-30, 2021-10-30-preview, 2022-01-30-preview, 2022-03-30-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native datamigration [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Tasks_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var serviceTask = new AzureNative.DataMigration.ServiceTask("serviceTask", new()
{
GroupName = "DmsSdkRg",
Properties = new AzureNative.DataMigration.Inputs.ConnectToSourceMySqlTaskPropertiesArgs
{
Input = new AzureNative.DataMigration.Inputs.ConnectToSourceMySqlTaskInputArgs
{
SourceConnectionInfo = new AzureNative.DataMigration.Inputs.MySqlConnectionInfoArgs
{
Port = 3306,
ServerName = "localhost",
Type = "MySqlConnectionInfo",
},
},
TaskType = "ConnectToSource.MySql",
},
ServiceName = "DmsSdkService",
TaskName = "DmsSdkTask",
});
});
Content copied to clipboard
package main
import (
datamigration "github.com/pulumi/pulumi-azure-native-sdk/datamigration/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datamigration.NewServiceTask(ctx, "serviceTask", &datamigration.ServiceTaskArgs{
GroupName: pulumi.String("DmsSdkRg"),
Properties: &datamigration.ConnectToSourceMySqlTaskPropertiesArgs{
Input: &datamigration.ConnectToSourceMySqlTaskInputArgs{
SourceConnectionInfo: &datamigration.MySqlConnectionInfoArgs{
Port: pulumi.Int(3306),
ServerName: pulumi.String("localhost"),
Type: pulumi.String("MySqlConnectionInfo"),
},
},
TaskType: pulumi.String("ConnectToSource.MySql"),
},
ServiceName: pulumi.String("DmsSdkService"),
TaskName: pulumi.String("DmsSdkTask"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.datamigration.ServiceTask;
import com.pulumi.azurenative.datamigration.ServiceTaskArgs;
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 serviceTask = new ServiceTask("serviceTask", ServiceTaskArgs.builder()
.groupName("DmsSdkRg")
.properties(ConnectToMongoDbTaskPropertiesArgs.builder()
.input(MongoDbConnectionInfoArgs.builder()
.sourceConnectionInfo(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build())
.taskType("ConnectToSource.MySql")
.build())
.serviceName("DmsSdkService")
.taskName("DmsSdkTask")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:datamigration:ServiceTask DmsSdkTask /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}
Content copied to clipboard