Endpoint management
The source endpoint describes the settings of the database that information will be transferred from using Data Transfer and the target endpoint the database you are going to transfer the data to. You can create, edit, or delete such endpoints.
Creating an endpoint
- Go to the folder page and select Yandex Data Transfer.
- Click Create endpoint.
- In the Direction field, select Source or Target.
- Enter a name for the endpoint. Use lowercase Latin letters and numbers.
- (optional) Enter a description of the endpoint.
- In the Database type field, select the appropriate value. An endpoint of the corresponding type will be created.
- Set the endpoint parameters:
- Click Create.
Note
You can create endpoints using the CLI commands only for MySQL and PostgreSQL sources and targets.
If you don't have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To create an endpoint:
-
View a description of the CLI create endpoint command:
yc datatransfer endpoint create --help
-
Specify the endpoint parameters in the create command (only some of the supported parameters are given in the example):
yc datatransfer endpoint create <endpoint type> \ --name <endpoint name> \ --description <endpoint description> \ <endpoint parameters>
You can view the endpoint type and parameters in the settings section for the appropriate data source or target.
You can create endpoints with Terraform only for MySQL, PostgreSQL, MongoDB, and ClickHouse sources and targets.
With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it by configuration files. They store the infrastructure description in HashiCorp Configuration Language (HCL). Terraform and its providers are distributed under the Mozilla Public License.
For more information about the provider resources, see the documentation on the Terraform site or mirror site.
If you change the configuration files, Terraform automatically determines which part of your configuration is already deployed and what should be added or removed.
To create an endpoint:
-
Using the command line, navigate to the folder that will contain the Terraform configuration files with an infrastructure plan. Create the directory if it doesn't exist.
- If you don't have Terraform yet, install it and create a configuration file with provider settings.
-
Create a configuration file with a description of your endpoint.
Example of the configuration file structure:
resource "yandex_datatransfer_endpoint" "<endpoint name in Terraform>" { name = "<endpoint name>" settings { <endpoint type> { <endpoint parameters> } } }
-
You can view the endpoint type and parameters in the settings section for the appropriate data source or target.
-
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm the update of resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
-
For more information, see the Terraform provider documentation.
Note
You can create endpoints with the API only for MySQL and PostgreSQL sources and targets.
Use the create API method and pass the following information in the request:
- ID of the folder to host the endpoint, in the
folderId
parameter. - The endpoint name in the
name
parameter. - The endpoint description in the
description
parameter. - The endpoint parameters in the
settings
parameter.
You can view the endpoint parameters in the settings section for the appropriate data source or target.
Updating the endpoint
- Go to the folder page and select Yandex Data Transfer.
- Select an endpoint and click
Edit on the top panel. - Edit the endpoint parameters:
- Click Apply.
-
Open the current Terraform configuration file with the endpoint description.
For more detail on creating a file like that, please review Create endpoint.
-
Edit the value in the
name
field (endpoint name) and the endpoint parameters undersettings
. -
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm the update of resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
For more information, see the Terraform provider documentation.
Note
You can edit endpoints using the API only for MySQL and PostgreSQL sources and targets.
Use the update API method and pass the following in the request:
- The endpoint ID in the
endpointId
parameters. - The endpoint name in the
name
parameter. - The endpoint description in the
description
parameter. - The endpoint parameters in the
settings
parameter.
To get the endpoint ID:
- Go to the folder page in the management console and select Yandex Data Transfer.
- Click the desired endpoint.
You can view the endpoint parameters in the settings section for the appropriate data source or target.
Editing the endpoint settings of a transfer with the Increment type and the Replicating status will result in restarting the transfer.
Deleting an endpoint
Warning
Before you delete an endpoint, delete all the transfers it's included in.
To delete an endpoint:
- Go to the folder page and select Yandex Data Transfer.
- Select the endpoint to delete.
- Click Delete on the panel above.
- In the window that opens, click Delete.
If you don't have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To delete an endpoint, run the command:
yc datatransfer endpoint delete <endpoint ID>
To get the endpoint ID:
- Go to the folder page in the management console and select Yandex Data Transfer.
- Click the desired endpoint.
To delete an endpoint created using Terraform:
-
Open the current Terraform configuration file with an infrastructure plan.
For more information about creating this file, see Creating an endpoint.
-
Make sure that the endpoint being deleted is not bound to a transfer.
-
Delete the endpoint description.
-
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Type the word
yes
, then press Enter.-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
For more information, see the Terraform provider documentation.
Use the delete API method and pass the ID of the required endpoint in the endpointID
request parameter:
To get the endpoint ID:
- Go to the folder page in the management console and select Yandex Data Transfer.
- Click the desired endpoint.
Greenplum® and Greenplum Database® are registered trademarks or trademarks of VMware, Inc in the United States and/or other countries.