InstanceArgs

data class InstanceArgs(val autoPay: Output<Boolean>? = null, val autoStart: Output<Boolean>? = null, val computeUnit: Output<Int>? = null, val databaseCount: Output<Int>? = null, val destinationEndpointEngineName: Output<String>? = null, val destinationRegion: Output<String>? = null, val du: Output<Int>? = null, val feeType: Output<String>? = null, val instanceClass: Output<String>? = null, val jobId: Output<String>? = null, val paymentType: Output<String>? = null, val period: Output<String>? = null, val resourceGroupId: Output<String>? = null, val sourceEndpointEngineName: Output<String>? = null, val sourceRegion: Output<String>? = null, val syncArchitecture: Output<String>? = null, val synchronizationDirection: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val type: Output<String>? = null, val usedTime: Output<Int>? = null) : ConvertibleToJava<InstanceArgs>

Provides a Dts Instance resource. For information about Dts Instance and how to use it, see What is Instance.

NOTE: Available since v1.198.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.resourcemanager.getResourceGroups({
status: "OK",
});
const defaultGetRegions = alicloud.getRegions({
current: true,
});
const defaultInstance = new alicloud.dts.Instance("default", {
type: "sync",
resourceGroupId: _default.then(_default => _default.ids?.[0]),
paymentType: "Subscription",
instanceClass: "large",
sourceEndpointEngineName: "MySQL",
sourceRegion: defaultGetRegions.then(defaultGetRegions => defaultGetRegions.regions?.[0]?.id),
destinationEndpointEngineName: "MySQL",
destinationRegion: defaultGetRegions.then(defaultGetRegions => defaultGetRegions.regions?.[0]?.id),
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.resourcemanager.get_resource_groups(status="OK")
default_get_regions = alicloud.get_regions(current=True)
default_instance = alicloud.dts.Instance("default",
type="sync",
resource_group_id=default.ids[0],
payment_type="Subscription",
instance_class="large",
source_endpoint_engine_name="MySQL",
source_region=default_get_regions.regions[0].id,
destination_endpoint_engine_name="MySQL",
destination_region=default_get_regions.regions[0].id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
{
Status = "OK",
});
var defaultGetRegions = AliCloud.GetRegions.Invoke(new()
{
Current = true,
});
var defaultInstance = new AliCloud.Dts.Instance("default", new()
{
Type = "sync",
ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0])),
PaymentType = "Subscription",
InstanceClass = "large",
SourceEndpointEngineName = "MySQL",
SourceRegion = defaultGetRegions.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id),
DestinationEndpointEngineName = "MySQL",
DestinationRegion = defaultGetRegions.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id),
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dts"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
Status: pulumi.StringRef("OK"),
}, nil)
if err != nil {
return err
}
defaultGetRegions, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
Current: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
_, err = dts.NewInstance(ctx, "default", &dts.InstanceArgs{
Type: pulumi.String("sync"),
ResourceGroupId: pulumi.String(_default.Ids[0]),
PaymentType: pulumi.String("Subscription"),
InstanceClass: pulumi.String("large"),
SourceEndpointEngineName: pulumi.String("MySQL"),
SourceRegion: pulumi.String(defaultGetRegions.Regions[0].Id),
DestinationEndpointEngineName: pulumi.String("MySQL"),
DestinationRegion: pulumi.String(defaultGetRegions.Regions[0].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.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetRegionsArgs;
import com.pulumi.alicloud.dts.Instance;
import com.pulumi.alicloud.dts.InstanceArgs;
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) {
final var default = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
.status("OK")
.build());
final var defaultGetRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
.current(true)
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.type("sync")
.resourceGroupId(default_.ids()[0])
.paymentType("Subscription")
.instanceClass("large")
.sourceEndpointEngineName("MySQL")
.sourceRegion(defaultGetRegions.regions()[0].id())
.destinationEndpointEngineName("MySQL")
.destinationRegion(defaultGetRegions.regions()[0].id())
.build());
}
}
resources:
defaultInstance:
type: alicloud:dts:Instance
name: default
properties:
type: sync
resourceGroupId: ${default.ids[0]}
paymentType: Subscription
instanceClass: large
sourceEndpointEngineName: MySQL
sourceRegion: ${defaultGetRegions.regions[0].id}
destinationEndpointEngineName: MySQL
destinationRegion: ${defaultGetRegions.regions[0].id}
variables:
default:
fn::invoke:
function: alicloud:resourcemanager:getResourceGroups
arguments:
status: OK
defaultGetRegions:
fn::invoke:
function: alicloud:getRegions
arguments:
current: true

Import

Dts Instance can be imported using the id, e.g.

$ pulumi import alicloud:dts/instance:Instance example <id>

Constructors

Link copied to clipboard
constructor(autoPay: Output<Boolean>? = null, autoStart: Output<Boolean>? = null, computeUnit: Output<Int>? = null, databaseCount: Output<Int>? = null, destinationEndpointEngineName: Output<String>? = null, destinationRegion: Output<String>? = null, du: Output<Int>? = null, feeType: Output<String>? = null, instanceClass: Output<String>? = null, jobId: Output<String>? = null, paymentType: Output<String>? = null, period: Output<String>? = null, resourceGroupId: Output<String>? = null, sourceEndpointEngineName: Output<String>? = null, sourceRegion: Output<String>? = null, syncArchitecture: Output<String>? = null, synchronizationDirection: Output<String>? = null, tags: Output<Map<String, String>>? = null, type: Output<String>? = null, usedTime: Output<Int>? = null)

Properties

Link copied to clipboard
val autoPay: Output<Boolean>? = null

Whether to automatically renew the fee when it expires. Valid values:

Link copied to clipboard
val autoStart: Output<Boolean>? = null

Whether to start the task automatically after the purchase is completed. Value:

Link copied to clipboard
val computeUnit: Output<Int>? = null

Specifications of ETL. The unit is compute unit (CU),1CU = 1vCPU +4GB of memory. The value range is an integer greater than or equal to 2. NOTE: Enter this parameter and enable ETL to clean and convert data.

Link copied to clipboard
val databaseCount: Output<Int>? = null

The number of private custom RDS instances in the PolarDB-X. The default value is 1. NOTE: This parameter is required only when source_endpoint_engine_name is DRDS.

Link copied to clipboard

The target database engine type.

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

The target instance region. For more information, see List of supported regions. NOTE: This parameter or job_id must be passed in.

Link copied to clipboard
val du: Output<Int>? = null

Assign a specified number of DU resources to DTS tasks in the DTS exclusive cluster. Valid values: 1 ~ 100. NOTE: The value of this parameter must be within the range of the number of DUs available for the DTS dedicated cluster.

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

Subscription billing type, Valid values: ONLY_CONFIGURATION_FEE: charges only configuration fees; CONFIGURATION_FEE_AND_DATA_FEE: charges configuration fees and data traffic fees.

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

The type of the migration or synchronization instance.

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

The ID of the task obtained by calling the ConfigureDtsJob operation (DtsJobId).> After you pass in this parameter, you do not need to pass the source_region, destination_region, type, source_endpoint_engine_name, or destination_endpoint_engine_name parameters. Even if the input is passed in, the configuration in job_id shall prevail.

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

The payment type of the resource. Valid values: Subscription, PayAsYouGo.

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

The billing method of the subscription instance. Value: Year, Month. NOTE: This parameter is valid and must be passed in only when payment_type is Subscription.

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

Resource Group ID.

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

Source instance database engine type.

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

The source instance region. For more information, see List of supported regions. NOTE: This parameter or job_id must be passed in.

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

Synchronization topology, value:

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

The synchronization direction. Default value: Forward. Valid values:

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

The tag value corresponding to the tag key.See the following Block Tags.

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

The instance type. Valid values:

Link copied to clipboard
val usedTime: Output<Int>? = null

Prepaid instance purchase duration.

Functions

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