Managing endpoints
The source endpoint describes the settings of the database from which the information will be transferred using Data Transfer, while the target endpoint, the database you are going to transfer the data to. You can create, edit, clone, or delete such endpoints.
Getting a list of endpoints
- Go to the folder page
and select Yandex Data Transfer. - In the left-hand panel, select
Endpoints.
If you do not 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 get a list of transfers in a folder, run the following command:
yc datatransfer endpoint list
Use the list API method.
Getting detailed information about an endpoint
- Go to the folder page
and select Yandex Data Transfer. - In the left-hand panel, select
Endpoints. - Click the required endpoint name.
If you do not 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 get information about an endpoint, run this command:
yc datatransfer endpoint get <endpoint_ID>
You can get the endpoint ID with a list of endpoints in the folder.
Use the get API method and provide the endpoint ID value in the endpointId
request parameter.
To find out the endpoint ID, get a list of endpoints in the folder.
Creating an endpoint
Warning
To create or edit an endpoint of a managed database, you need the service or primitive viewer
role assigned for the folder hosting a cluster of this managed database.
-
Go to the folder page
and select Yandex Data Transfer. -
In the left-hand panel, select
Endpoints. -
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.
-
Select the appropriate value in the Database type field. This will create an endpoint of the relevant type.
-
Set the endpoint parameters:
-
Sources:
-
Targets:
-
-
Click Create endpoint.
Note
You can create endpoints using the CLI commands only for sources and targets of the ClickHouse®, MongoDB, MySQL®, and PostgreSQL types.
If you do not 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.
-
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.
Note
You can create endpoints with Terraform only for ClickHouse®, MongoDB, MySQL®, and PostgreSQL sources and targets.
Terraform
For more information about the provider resources, see the documentation on the Terraform
If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.
If you don't have Terraform, install it and configure the Yandex Cloud provider.
-
Create a configuration file with a description of your endpoint.
Here is an example of the configuration file structure:
resource "ycp_datatransfer_endpoint" "<endpoint_name_in_Terraform>" { name = "<endpoint_name>" settings { <endpoint_type> { <endpoint_parameters> } } }
You can retrieve a complete resource schema by running terraform providers schema
.
-
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 updating the 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 ClickHouse®, Apache Kafka®, MongoDB, MySQL®, and PostgreSQL sources and targets.
Use the create API method and include the following information in the request:
- ID of the folder to contain the endpoint in the
folderId
parameter. - Endpoint name in the
name
parameter. - Endpoint description in the
description
parameter. - 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
Warning
To create or edit an endpoint of a managed database, you need the service or primitive viewer
role assigned for the folder hosting a cluster of this managed database.
Note
You cannot change the endpoint type and the database type. For some endpoints, you cannot change the connection type, either.
-
Go to the folder page
and select Yandex Data Transfer. -
In the left-hand panel, select
Endpoints. -
Select an endpoint and click
Edit in the top panel. -
Edit the endpoint parameters:
-
Sources:
-
Targets:
-
-
Click Apply.
Note
You can change endpoints using the CLI commands only for ClickHouse®, MongoDB, MySQL®, and PostgreSQL sources and targets.
If you do not 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 update the endpoint settings:
-
View a description of the update transfer CLI command:
yc datatransfer endpoint update --help
-
Run the following command by providing a list of the settings to change (the example below does not contain a full list of parameters):
yc datatransfer transfer update <endpoint_type> <endpoint_ID> \ --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 get the endpoint ID with a list of endpoints in the folder.
-
Open the current Terraform configuration file with the endpoint description.
To learn how to create such a file, see 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 updating the 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 ClickHouse®, Apache Kafka®, MongoDB, MySQL®, and PostgreSQL sources and targets.
Use the update API method and include the following in the request:
- Endpoint ID in the
endpointId
parameter. - Endpoint name in the
name
parameter. - Endpoint description in the
description
parameter. - Endpoint parameters in the
settings
parameter.
You can get the endpoint ID with a list of endpoints in the folder.
Editing the endpoint settings of a transfer with the Replication type and the Replicating status will result in restarting the transfer.
Cloning an endpoint
Note
When cloning, you cannot change the endpoint type and the database type.
-
Go to the folder page
and select Yandex Data Transfer. -
In the left-hand panel, select
Endpoints. -
Select the endpoint to clone.
-
Click Clone in the top panel.
-
Specify a new endpoint name and edit other parameters, if required:
-
Sources:
-
Targets:
-
-
Click Create endpoint.
Deleting an endpoint
Warning
Before deleting an endpoint, delete all the transfers it is included in.
To delete an endpoint:
- Go to the folder page
and select Yandex Data Transfer. - In the left-hand panel, select
Endpoints. - Select the endpoint to delete.
- Click Delete in the top panel.
- In the window that opens, click Delete.
If you do not 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>
You can get the endpoint ID with a list of endpoints in the folder.
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 provide the ID of the required endpoint in the endpointID
request parameter.
You can get the endpoint ID with a list of endpoints in the folder.
Greenplum® and Greenplum Database® are registered trademarks or trademarks of VMware, Inc. in the United States and/or other countries.
ClickHouse® is a registered trademark of ClickHouse, Inc