yandex.DatatransferTransfer
Manages a Data Transfer transfer. For more information, see the official documentation.
Example Usage
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var pgSource = new Yandex.DatatransferEndpoint("pgSource", new Yandex.DatatransferEndpointArgs
{
Settings = new Yandex.Inputs.DatatransferEndpointSettingsArgs
{
PostgresSource = new Yandex.Inputs.DatatransferEndpointSettingsPostgresSourceArgs
{
Connection = new Yandex.Inputs.DatatransferEndpointSettingsPostgresSourceConnectionArgs
{
OnPremise = new Yandex.Inputs.DatatransferEndpointSettingsPostgresSourceConnectionOnPremiseArgs
{
Hosts =
{
"example.org",
},
Port = 5432,
},
},
SlotGigabyteLagLimit = 100,
Database = "db1",
User = "user1",
Password = new Yandex.Inputs.DatatransferEndpointSettingsPostgresSourcePasswordArgs
{
Raw = "123",
},
},
},
});
var pgTarget = new Yandex.DatatransferEndpoint("pgTarget", new Yandex.DatatransferEndpointArgs
{
FolderId = "some_folder_id",
Settings = new Yandex.Inputs.DatatransferEndpointSettingsArgs
{
PostgresTarget = new Yandex.Inputs.DatatransferEndpointSettingsPostgresTargetArgs
{
Connection = new Yandex.Inputs.DatatransferEndpointSettingsPostgresTargetConnectionArgs
{
MdbClusterId = "some_cluster_id",
},
Database = "db2",
User = "user2",
Password = new Yandex.Inputs.DatatransferEndpointSettingsPostgresTargetPasswordArgs
{
Raw = "321",
},
},
},
});
var pgpgTransfer = new Yandex.DatatransferTransfer("pgpgTransfer", new Yandex.DatatransferTransferArgs
{
FolderId = "some_folder_id",
SourceId = pgSource.Id,
TargetId = pgTarget.Id,
Type = "SNAPSHOT_AND_INCREMENT",
});
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
pgSource, err := yandex.NewDatatransferEndpoint(ctx, "pgSource", &yandex.DatatransferEndpointArgs{
Settings: &DatatransferEndpointSettingsArgs{
PostgresSource: &DatatransferEndpointSettingsPostgresSourceArgs{
Connection: &DatatransferEndpointSettingsPostgresSourceConnectionArgs{
OnPremise: &DatatransferEndpointSettingsPostgresSourceConnectionOnPremiseArgs{
Hosts: pulumi.StringArray{
pulumi.String("example.org"),
},
Port: pulumi.Int(5432),
},
},
SlotGigabyteLagLimit: pulumi.Int(100),
Database: pulumi.String("db1"),
User: pulumi.String("user1"),
Password: &DatatransferEndpointSettingsPostgresSourcePasswordArgs{
Raw: pulumi.String("123"),
},
},
},
})
if err != nil {
return err
}
pgTarget, err := yandex.NewDatatransferEndpoint(ctx, "pgTarget", &yandex.DatatransferEndpointArgs{
FolderId: pulumi.String("some_folder_id"),
Settings: &DatatransferEndpointSettingsArgs{
PostgresTarget: &DatatransferEndpointSettingsPostgresTargetArgs{
Connection: &DatatransferEndpointSettingsPostgresTargetConnectionArgs{
MdbClusterId: pulumi.String("some_cluster_id"),
},
Database: pulumi.String("db2"),
User: pulumi.String("user2"),
Password: &DatatransferEndpointSettingsPostgresTargetPasswordArgs{
Raw: pulumi.String("321"),
},
},
},
})
if err != nil {
return err
}
_, err = yandex.NewDatatransferTransfer(ctx, "pgpgTransfer", &yandex.DatatransferTransferArgs{
FolderId: pulumi.String("some_folder_id"),
SourceId: pgSource.ID(),
TargetId: pgTarget.ID(),
Type: pulumi.String("SNAPSHOT_AND_INCREMENT"),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
pg_source = yandex.DatatransferEndpoint("pgSource", settings=yandex.DatatransferEndpointSettingsArgs(
postgres_source=yandex.DatatransferEndpointSettingsPostgresSourceArgs(
connection=yandex.DatatransferEndpointSettingsPostgresSourceConnectionArgs(
on_premise=yandex.DatatransferEndpointSettingsPostgresSourceConnectionOnPremiseArgs(
hosts=["example.org"],
port=5432,
),
),
slot_gigabyte_lag_limit=100,
database="db1",
user="user1",
password=yandex.DatatransferEndpointSettingsPostgresSourcePasswordArgs(
raw="123",
),
),
))
pg_target = yandex.DatatransferEndpoint("pgTarget",
folder_id="some_folder_id",
settings=yandex.DatatransferEndpointSettingsArgs(
postgres_target=yandex.DatatransferEndpointSettingsPostgresTargetArgs(
connection=yandex.DatatransferEndpointSettingsPostgresTargetConnectionArgs(
mdb_cluster_id="some_cluster_id",
),
database="db2",
user="user2",
password=yandex.DatatransferEndpointSettingsPostgresTargetPasswordArgs(
raw="321",
),
),
))
pgpg_transfer = yandex.DatatransferTransfer("pgpgTransfer",
folder_id="some_folder_id",
source_id=pg_source.id,
target_id=pg_target.id,
type="SNAPSHOT_AND_INCREMENT")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const pgSource = new yandex.DatatransferEndpoint("pgSource", {settings: {
postgresSource: {
connection: {
onPremise: {
hosts: ["example.org"],
port: 5432,
},
},
slotGigabyteLagLimit: 100,
database: "db1",
user: "user1",
password: {
raw: "123",
},
},
}});
const pgTarget = new yandex.DatatransferEndpoint("pgTarget", {
folderId: "some_folder_id",
settings: {
postgresTarget: {
connection: {
mdbClusterId: "some_cluster_id",
},
database: "db2",
user: "user2",
password: {
raw: "321",
},
},
},
});
const pgpgTransfer = new yandex.DatatransferTransfer("pgpgTransfer", {
folderId: "some_folder_id",
sourceId: pgSource.id,
targetId: pgTarget.id,
type: "SNAPSHOT_AND_INCREMENT",
});
Coming soon!
Create DatatransferTransfer Resource
new DatatransferTransfer(name: string, args?: DatatransferTransferArgs, opts?: CustomResourceOptions);
@overload
def DatatransferTransfer(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
source_id: Optional[str] = None,
target_id: Optional[str] = None,
type: Optional[str] = None)
@overload
def DatatransferTransfer(resource_name: str,
args: Optional[DatatransferTransferArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewDatatransferTransfer(ctx *Context, name string, args *DatatransferTransferArgs, opts ...ResourceOption) (*DatatransferTransfer, error)
public DatatransferTransfer(string name, DatatransferTransferArgs? args = null, CustomResourceOptions? opts = null)
public DatatransferTransfer(String name, DatatransferTransferArgs args)
public DatatransferTransfer(String name, DatatransferTransferArgs args, CustomResourceOptions options)
type: yandex:DatatransferTransfer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatatransferTransferArgs
- 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 DatatransferTransferArgs
- 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 DatatransferTransferArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatatransferTransferArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatatransferTransferArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DatatransferTransfer 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 DatatransferTransfer resource accepts the following input properties:
- Description string
Arbitrary description text for the transfer.
- Folder
Id string ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- Labels Dictionary<string, string>
A set of key/value label pairs to assign to the Data Transfer transfer.
- Name string
Name of the transfer.
- Source
Id string ID of the source endpoint for the transfer.
- Target
Id string ID of the target endpoint for the transfer.
- Type string
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- Description string
Arbitrary description text for the transfer.
- Folder
Id string ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- Labels map[string]string
A set of key/value label pairs to assign to the Data Transfer transfer.
- Name string
Name of the transfer.
- Source
Id string ID of the source endpoint for the transfer.
- Target
Id string ID of the target endpoint for the transfer.
- Type string
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- description String
Arbitrary description text for the transfer.
- folder
Id String ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- labels Map<String,String>
A set of key/value label pairs to assign to the Data Transfer transfer.
- name String
Name of the transfer.
- source
Id String ID of the source endpoint for the transfer.
- target
Id String ID of the target endpoint for the transfer.
- type String
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- description string
Arbitrary description text for the transfer.
- folder
Id string ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- labels {[key: string]: string}
A set of key/value label pairs to assign to the Data Transfer transfer.
- name string
Name of the transfer.
- source
Id string ID of the source endpoint for the transfer.
- target
Id string ID of the target endpoint for the transfer.
- type string
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- description str
Arbitrary description text for the transfer.
- folder_
id str ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- labels Mapping[str, str]
A set of key/value label pairs to assign to the Data Transfer transfer.
- name str
Name of the transfer.
- source_
id str ID of the source endpoint for the transfer.
- target_
id str ID of the target endpoint for the transfer.
- type str
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- description String
Arbitrary description text for the transfer.
- folder
Id String ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- labels Map<String>
A set of key/value label pairs to assign to the Data Transfer transfer.
- name String
Name of the transfer.
- source
Id String ID of the source endpoint for the transfer.
- target
Id String ID of the target endpoint for the transfer.
- type String
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
Outputs
All input properties are implicitly available as output properties. Additionally, the DatatransferTransfer resource produces the following output properties:
Look up Existing DatatransferTransfer Resource
Get an existing DatatransferTransfer 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?: DatatransferTransferState, opts?: CustomResourceOptions): DatatransferTransfer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
source_id: Optional[str] = None,
target_id: Optional[str] = None,
type: Optional[str] = None,
warning: Optional[str] = None) -> DatatransferTransfer
func GetDatatransferTransfer(ctx *Context, name string, id IDInput, state *DatatransferTransferState, opts ...ResourceOption) (*DatatransferTransfer, error)
public static DatatransferTransfer Get(string name, Input<string> id, DatatransferTransferState? state, CustomResourceOptions? opts = null)
public static DatatransferTransfer get(String name, Output<String> id, DatatransferTransferState 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.
- Description string
Arbitrary description text for the transfer.
- Folder
Id string ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- Labels Dictionary<string, string>
A set of key/value label pairs to assign to the Data Transfer transfer.
- Name string
Name of the transfer.
- Source
Id string ID of the source endpoint for the transfer.
- Target
Id string ID of the target endpoint for the transfer.
- Type string
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- Warning string
(Computed) Error description if transfer has any errors.
- Description string
Arbitrary description text for the transfer.
- Folder
Id string ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- Labels map[string]string
A set of key/value label pairs to assign to the Data Transfer transfer.
- Name string
Name of the transfer.
- Source
Id string ID of the source endpoint for the transfer.
- Target
Id string ID of the target endpoint for the transfer.
- Type string
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- Warning string
(Computed) Error description if transfer has any errors.
- description String
Arbitrary description text for the transfer.
- folder
Id String ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- labels Map<String,String>
A set of key/value label pairs to assign to the Data Transfer transfer.
- name String
Name of the transfer.
- source
Id String ID of the source endpoint for the transfer.
- target
Id String ID of the target endpoint for the transfer.
- type String
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- warning String
(Computed) Error description if transfer has any errors.
- description string
Arbitrary description text for the transfer.
- folder
Id string ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- labels {[key: string]: string}
A set of key/value label pairs to assign to the Data Transfer transfer.
- name string
Name of the transfer.
- source
Id string ID of the source endpoint for the transfer.
- target
Id string ID of the target endpoint for the transfer.
- type string
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- warning string
(Computed) Error description if transfer has any errors.
- description str
Arbitrary description text for the transfer.
- folder_
id str ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- labels Mapping[str, str]
A set of key/value label pairs to assign to the Data Transfer transfer.
- name str
Name of the transfer.
- source_
id str ID of the source endpoint for the transfer.
- target_
id str ID of the target endpoint for the transfer.
- type str
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- warning str
(Computed) Error description if transfer has any errors.
- description String
Arbitrary description text for the transfer.
- folder
Id String ID of the folder to create the transfer in. If it is not provided, the default provider folder is used.
- labels Map<String>
A set of key/value label pairs to assign to the Data Transfer transfer.
- name String
Name of the transfer.
- source
Id String ID of the source endpoint for the transfer.
- target
Id String ID of the target endpoint for the transfer.
- type String
Type of the transfer. One of "SNAPSHOT_ONLY", "INCREMENT_ONLY", "SNAPSHOT_AND_INCREMENT".
- warning String
(Computed) Error description if transfer has any errors.
Import
A transfer can be imported using the id
of the resource, e.g.
$ pulumi import yandex:index/datatransferTransfer:DatatransferTransfer foo transfer_id
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
yandex
Terraform Provider.