public

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlarmNotifyInfo

type AlarmNotifyInfo struct {
	// Subscription delay, in seconds.
	// Minimum value: 1
	// Maximum value: 3600
	// Default value: 0
	DelayTime int `json:"delay_time,omitempty"`
	// RTO delay.
	// Minimum value: 1
	// Maximum value: 3600
	// Default value: 0
	RtoDelay int `json:"rto_delay,omitempty"`
	// RPO delay.
	// Minimum value: 1
	// Maximum value: 3600
	// Default value: 0
	RpoDelay int `json:"rpo_delay,omitempty"`
	// Whether to notify users of alarms. The default value is false.
	AlarmToUser *bool `json:"alarm_to_user,omitempty"`
	// Receiving method and message body. Up to two receiving modes and message bodies are supported.
	Subscriptions []SubscriptionInfo `json:"subscriptions,omitempty"`
}

type BatchCheckResultsResponse

type BatchCheckResultsResponse struct {
	Results []QueryPreCheckResp `json:"results,omitempty"`
	Count   int                 `json:"count,omitempty"`
}

type BatchCheckTasksResponse

type BatchCheckTasksResponse struct {
	Results []PreCheckDetail `json:"results"`
	Count   int              `json:"count"`
}

type BatchCreateTaskOpts

type BatchCreateTaskOpts struct {
	Jobs []CreateJobOpts `json:"jobs"`
}

type BatchCreateTasksResponse

type BatchCreateTasksResponse struct {
	Results []CreateTaskResp `json:"results,omitempty"`
	Count   int              `json:"count,omitempty"`
}

type BatchDeleteJobsResponse

type BatchDeleteJobsResponse struct {
	Results []IdJobResp `json:"results,omitempty"`
	Count   int         `json:"count,omitempty"`
}

type BatchDeleteTasksOpts

type BatchDeleteTasksOpts struct {
	Jobs []DeleteJobReq `json:"jobs"`
}

type BatchJobsResponse

type BatchJobsResponse struct {
	Results []IdJobResp `json:"results,omitempty"`
	Count   int         `json:"count,omitempty"`
}

type BatchLimitSpeedOpts

type BatchLimitSpeedOpts struct {
	SpeedLimits []LimitSpeedReq `json:"speed_limits"`
}

type BatchListTaskDetailsResponse

type BatchListTaskDetailsResponse struct {
	Count   int            `json:"count,omitempty"`
	Results []QueryJobResp `json:"results,omitempty"`
}

type BatchListTaskStatusResponse

type BatchListTaskStatusResponse struct {
	Results []QueryJobStatusResp `json:"results,omitempty"`
	Count   int                  `json:"count,omitempty"`
}

type BatchModifyJobOpts

type BatchModifyJobOpts struct {
	Jobs []ModifyJobReq `json:"jobs"`
}

type BatchPreCheckReq

type BatchPreCheckReq struct {
	Jobs []PreCheckInfo `json:"jobs" required:"true"`
}

type BatchQueryPrecheckResultReq

type BatchQueryPrecheckResultReq struct {
	// Request for querying pre-check results in batches. The value cannot be empty.
	// The values must comply with the UUID rule. The task ID must be unique.
	Jobs []string `json:"jobs"`
}

type BatchQueryTaskOpts

type BatchQueryTaskOpts struct {
	Jobs    []string `json:"jobs"`
	PageReq PageReq  `json:"page_req,omitempty"`
}

type BatchStartJobOpts

type BatchStartJobOpts struct {
	// Request list for starting tasks in batches.
	Jobs []StartInfo `json:"jobs"`
}

type BatchTasksResponse

type BatchTasksResponse struct {
	Results []IdJobResp `json:"results,omitempty"`
	Count   int         `json:"count,omitempty"`
}

func BatchStartTasks

func BatchStartTasks(client *golangsdk.ServiceClient, opts BatchStartJobOpts) (*BatchTasksResponse, error)

type BatchTestConnectionOpts

type BatchTestConnectionOpts struct {
	Jobs []TestEndPoint `json:"jobs"`
}

type BatchUpdateDatabaseObjectOpts

type BatchUpdateDatabaseObjectOpts struct {
	Jobs []UpdateDatabaseObjectReq `json:"jobs"`
}

type BatchValidateConnectionsResponse

type BatchValidateConnectionsResponse struct {
	Results []CheckJobResp `json:"results,omitempty"`
	Count   int            `json:"count,omitempty"`
}

type CheckJobResp

type CheckJobResp struct {
	// Task ID.
	Id string `json:"id"`
	// Test result. Value:
	// success: indicates that the connection test is successful.
	// failed: indicates that the connection test fails.
	Status string `json:"status"`
	// Error code, which is optional and indicates the returned information about the failure status.
	ErrorCode string `json:"error_code,omitempty"`
	// Error message, which is optional and indicates the returned information about the failure status.
	ErrorMsg string `json:"error_msg,omitempty"`
	// Whether the request is successful.
	Success bool `json:"success,omitempty"`
}

type CreateJobOpts

type CreateJobOpts struct {
	// Whether to bind an EIP. This parameter is mandatory and set to true when the network type is EIP.
	BindEip *bool `json:"bind_eip,omitempty"`
	// The migration scenario. The value can be migration (real-time migration), sync (real-time synchronization),
	// or cloudDataGuard (real-time disaster recovery).
	// Values: migration sync cloudDataGuard
	DbUseType string `json:"db_use_type" required:"true"`
	// The task name. The task name can be 4 to 50 characters in length.
	// It is case-insensitive and can contain only letters, digits, hyphens (-), and underscores (_).
	// Minimum length: 4 characters
	// Maximum length: 50 characters
	Name string `json:"name" required:"true"`
	// Task description. The task description can contain a maximum of 256 characters
	// and cannot contain the following special characters: !<>'&"\
	Description string `json:"description,omitempty"`
	// The engine type. The options are as follows: mysql (MySQL migration and MySQL synchronization),
	// mongodb (used for migration), mysql-to-taurus (used for MySQL to GaussDB(for MySQL) primary/standby synchronization),
	// cloudDataGuard-mysql (used for DR), postgresql (used for PostgreSQL synchronization).
	// Values: mysql mongodb cloudDataGuard-mysql mysql-to-taurus postgresql
	EngineType string `json:"engine_type" required:"true"`
	// Whether the destination DB instance can be read-only. This parameter is valid only when the destination
	// DB instance is a MySQL DB instance and the job_direction value is up.
	// In the DR scenario, this parameter is mandatory and set to true if the current cloud is a standby cloud.
	// If this parameter is not specified, the default value is true.
	IsTargetReadonly *bool `json:"is_target_readonly,omitempty"`
	// l The migration direction. The value can be up (to the cloud and current cloud as standby in disaster recovery),
	// down (out of cloud and current cloud as active in disaster recovery), or non-dbs (for self-built databases).
	// Values: − up − down − non-dbs
	JobDirection string `json:"job_direction" required:"true"`
	// This parameter is mandatory when db_use_type is set to cloudDataGuard.
	// If the DR type is dual-active, the value of multi_write is true. Otherwise, the value is false.
	// If db_use_type is set to other values, multi_write is optional.
	// Default value: false
	MultiWrite *bool `json:"multi_write,omitempty"`
	// Network type.
	// Value: vpn vpc eip
	// The VPC network cannot be selected in the DR scenario.
	NetType string `json:"net_type" required:"true"`
	// The number of nodes. For a MongoDB database, this parameter indicates the number of source shards.
	// This parameter is mandatory when the source database is a cluster.
	// The value ranges from 1 to 32. The default value is 2 for MySQL dual-active DR.
	NodeNum int `json:"node_num,omitempty"`
	// The flavor type. Value: high
	NodeType string `json:"node_type" required:"true"`
	// The source database information.
	SourceEndpoint Endpoint `json:"source_endpoint" required:"true"`
	// The destination database information.
	TargetEndpoint Endpoint `json:"target_endpoint" required:"true"`
	// Tag information. Up to 20 tags can be added.
	Tags []tags.ResourceTag `json:"tags,omitempty"`
	// The migration type. FULL_TRANS indicates full migration.
	// FULL_INCR_TRANS: indicates full+incremental migration.
	// INCR_TRANS: indicates incremental migration.
	// In single-active DR scenarios, only full plus incremental migration (FULL_INCR_TRANS) is supported.
	// Default value: FULL_INCR_TRANS
	// Values: FULL_TRANS FULL_INCR_TRANS INCR_TRANS
	TaskType string `json:"task_type" required:"true"`
	// ID of the subnet associated with the DRS instance.
	CustomizeSubnetId string `json:"customize_sutnet_id" required:"true"`
	// After a task is in the abnormal status for a period of time, the task is automatically stopped.
	// The unit is day. The value ranges from 14 to 100. If this parameter is not transferred, the default value is 14.
	ExpiredDays string `json:"expired_days,omitempty"`
	// AzCode of the active node. This parameter is mandatory for cross-AZ node tasks.
	MasterAz string `json:"master_az,omitempty"`
	// AzCode of the standby node. This parameter is mandatory for cross-AZ node tasks.
	SlaveAz string `json:"slave_az,omitempty"`
}

type CreateTaskResp

type CreateTaskResp struct {
	// Task ID.
	Id string `json:"id"`
	// Task name.
	Name string `json:"name,omitempty"`
	// Task status.
	Status string `json:"status,omitempty"`
	// Creation time (timestamp).
	CreateTime string `json:"create_time,omitempty"`
	// Error code, which is optional and indicates the returned information about the failure status.
	ErrorCode string `json:"error_code,omitempty"`
	// Error message, which is optional and indicates the returned information about the failure status.
	ErrorMsg string `json:"error_msg,omitempty"`
	// Subtask ID set.
	ChildIds []string `json:"child_ids,omitempty"`
}

type DatabaseInfo

type DatabaseInfo struct {
	// When object_type is set to database, this parameter indicates the database name.
	// If object_type is set to table or view, set the field value by referring to the example.
	Id string `json:"id,omitempty"`
	// Database name. This parameter is mandatory when object_type is set to table or view.
	ParentId string `json:"parent_id,omitempty"`
	// Type. Values:
	// ⦁	database
	// ⦁	table
	// ⦁	schema
	// ⦁	view
	ObjectType string `json:"object_type,omitempty"`
	// Database object name, database name, table name, and view name.
	ObjectName string `json:"object_name,omitempty"`
	// Alias, which is the new mapped name.
	ObjectAliasName string `json:"object_alias_name,omitempty"`
	// Whether to migrate the database objects. true indicates that the database objects will be migrated.
	// false indicates that the database objects will not be migrated.
	// partial indicates some tables in the database will be migrated.
	// If this parameter is not specified, the default value is false.
	Select string `json:"select,omitempty"`
}

type DefaultRootDb

type DefaultRootDb struct {
	// Database name.
	DbName string `json:"db_name,omitempty"`
	// Encoding format
	DbEncoding string `json:"db_encoding,omitempty"`
}

type DeleteJobReq

type DeleteJobReq struct {
	// The value can be terminated, force_terminate, or delete. terminate indicates that the migration task is stopped,
	// force_terminate indicates that the migration task is forcibly stopped, and delete indicates that the migration task is deleted.
	// Values: terminate force_terminate delete
	DeleteType string `json:"delete_type"`
	// Task ID.
	JobId string `json:"job_id"`
}

type Endpoint

type Endpoint struct {
	// Database type.
	// Values: mysql mongodb taurus postgresql
	DbType string `json:"db_type,omitempty"`
	// azCode of the AZ where the database is located.
	AzCode string `json:"az_code,omitempty"`
	// Region where the RDS or GaussDB(for MySQL) instance is located.
	// This parameter is mandatory when an RDS or GaussDB(for MySQL) instance is used.
	// In DR scenarios, this parameter is mandatory in source_endpoint when job_direction is down
	// and is mandatory in target_endpoint when job_direction is up.
	Region string `json:"region,omitempty"`
	// RDS or GaussDB(for MySQL) instance ID.
	// This parameter is mandatory when an RDS or GaussDB(for MySQL) instance is used.
	// In DR scenarios, this parameter is mandatory in source_endpoint
	// when job_direction is down and is mandatory in target_endpoint when job_direction is up.
	InstId string `json:"inst_id,omitempty"`
	// ID of the VPC where the database is located.
	VpcId string `json:"vpc_id,omitempty"`
	// ID of the subnet where the database is located.
	SubnetId string `json:"subnet_id,omitempty"`
	// ID of the security group to which the database belongs.
	SecurityGroupId string `json:"security_group_id,omitempty"`
	// The project ID of an RDS or GaussDB(for MySQL) instance.
	ProjectId string `json:"project_id,omitempty"`
	// Database password.
	DbPassword string `json:"db_password,omitempty"`
	// Database port. The value is an integer ranging from 1 to 65535.
	DbPort int `json:"db_port,omitempty"`
	// Database user.
	DbUser string `json:"db_user,omitempty"`
	// The name of an RDS or GaussDB(for MySQL) instance.
	InstName string `json:"inst_name,omitempty"`
	// Database IP address.
	Ip string `json:"ip,omitempty"`
	// Mongo HA mode.
	MongoHaMode string `json:"mongo_ha_mode,omitempty"`
	// SSL certificate password. The certificate file name extension is .p12.
	SslCertPassword string `json:"ssl_cert_password,omitempty"`
	// The checksum value of the SSL certificate, which is used for backend verification.
	// This parameter is mandatory for secure connection to the source database.
	SslCertCheckSum string `json:"ssl_cert_check_sum,omitempty"`
	// SSL certificate content, which is encrypted using Base64.
	SslCertKey string `json:"ssl_cert_key,omitempty"`
	// SSL certificate name.
	SslCertName string `json:"ssl_cert_name,omitempty"`
	// Whether SSL is enabled.
	SslLink bool `json:"ssl_link,omitempty"`
	// For MongoDB 4.0 or later, if the cluster instance cannot obtain the IP address of the sharded node,
	// set source_endpoint to Sharding4.0+. Default value: Sharding4.0+
	// Values: Sharding4.0+
	ClusterMode string `json:"cluster_mode,omitempty"`
}

type IdJobResp

type IdJobResp struct {
	// Task ID.
	Id     string `json:"id"`
	Status string `json:"status,omitempty"`
	// Error code, which is optional and indicates the returned information about the failure status.
	ErrorCode string `json:"error_code,omitempty"`
	// Error message, which is optional and indicates the returned information about the failure status.
	ErrorMsg string `json:"error_msg,omitempty"`
}

type InstInfo

type InstInfo struct {
	// Engine type. Values:
	// mysql
	// mongodb
	// cloudDataGuard-mysql
	// mysql-to-taurus
	// postgresql
	EngineType string `json:"engine_type,omitempty"`
	// DB instance type. Values:
	// high
	InstType string `json:"inst_type,omitempty"`
	// Private IP address of the replication instance.
	Ip string `json:"ip,omitempty"`
	// EIP of the replication instance.
	PublicIp string `json:"public_ip,omitempty"`
	// Scheduled start time of a replication instance task.
	StartTime string `json:"start_time,omitempty"`
	// Replication instance status. Values:
	// active
	// deleted
	Status string `json:"status,omitempty"`
	// Storage space of a replication instance.
	VolumeSize int `json:"volume_size,omitempty"`
}

type LimitSpeedReq

type LimitSpeedReq struct {
	// Task ID.
	JobId string `json:"job_id"`
	// Request body of flow control information.
	SpeedLimit []SpeedLimitInfo `json:"speed_limit"`
}

type ModifyJobReq

type ModifyJobReq struct {
	// Task ID.
	JobId string `json:"job_id" required:"true"`
	// Task description. This parameter is mandatory when you modify the task description.
	// Minimum length: 0 character
	// Maximum length: 256
	Description string `json:"description,omitempty"`
	// Task name.
	Name string `json:"name,omitempty"`
	// Set exception notification.
	AlarmNotify *AlarmNotifyInfo `json:"alarm_notify,omitempty"`
	// Task mode. FULL_TRANS: full. FULL_INCR_TRANS: full + incremental. INCR_TRANS: incremental.
	// Values:
	// FULL_TRANS
	// INCR_TRANS
	// FULL_INCR_TRANS
	TaskType string `json:"task_type,omitempty"`
	// Source database information. This parameter is mandatory for calling the API after the connection test.
	SourceEndpoint *Endpoint `json:"source_endpoint,omitempty"`
	// Destination database information. This parameter is mandatory for calling the API after the connection test.
	TargetEndpoint *Endpoint `json:"target_endpoint,omitempty"`
	// Node specification type. This parameter is mandatory when this API is invoked to modify a task after the connection test.
	// Default value: high
	// Values: high
	NodeType string `json:"node_type,omitempty"`
	// Engine type. This parameter is mandatory when this API is invoked to modify a task after the connection test.
	// mysql: used for migration and synchronization of MySQL databases
	// mongodb: used for migration.
	// cloudDataGuard-mysql: used for disaster recovery
	// mysql-to-taurus: used for synchronization from MySQL to GaussDB(for MySQL) primary/standby.
	// postgresql: used for PostgreSQL synchronization.
	// Values:
	// mysql
	// mongodb
	// cloudDataGuard-mysql
	// mysql-to-taurus
	// postgresql
	EngineType string `json:"engine_type,omitempty"`
	// Network type. This parameter is mandatory after the connection test. Values:
	// vpn
	// vpc
	// eip
	NetType string `json:"net_type,omitempty"`
	// Whether to save the database information. This parameter is mandatory when the API is called after the connection test.
	StoreDbInfo *bool `json:"store_db_info,omitempty"`
	// Whether the task is a rebuilding task.。
	IsRecreate *bool `json:"is_recreate,omitempty"`
	// The migration direction. The value can be up (to the cloud and current cloud as standby in disaster recovery),
	// down (out of cloud and current cloud as active in disaster recovery), or non-dbs (for self-built databases).
	// Values:
	// up
	// down
	// non-dbs
	JobDirection string `json:"job_direction,omitempty"`
	// Whether the destination DB instance can be read-only.
	IsTargetReadonly *bool `json:"is_target_readonly,omitempty"`
	// Whether to migrate all Definers to the user. MySQL databases support this setting.
	// This parameter is mandatory when this API is invoked to modify a task after the connection test. Values:
	// true: The Definers of all source database objects will be migrated to the user.
	// Other users do not have permissions on database objects unless they are authorized.
	// false: The Definers of all source database objects will not be changed.
	// You need to migrate all accounts and permissions of the source database in the next step.
	ReplaceDefiner *bool `json:"replace_definer,omitempty"`
	// Specifies the tag information.
	Tags []tags.ResourceTag `json:"tags,omitempty"`
	// Migration type. The options are migration (real-time migration),
	// sync (real-time synchronization), and cloudDataGuard (real-time DR).
	// Values:
	// migration
	// sync
	// cloudDataGuard
	DbUseType string `json:"db_use_type,omitempty"`
}

type PageReq

type PageReq struct {
	// Current page number, which cannot exceed the maximum number of pages.
	// (Number of pages = Number of transferred job IDs/Number of tasks on each page)
	// Minimum value: 1.
	// Default value: 1
	CurPage int `json:"cur_page,omitempty"`
	// Number of items on each page. If this parameter is set to 0, all items are obtained.
	// Minimum value: 0
	// Maximum value: 100
	// Default value: 5
	PerPage int `json:"per_page,omitempty"`
}

type PreCheckDetail

type PreCheckDetail struct {
	Id         string `json:"id"`
	PreCheckId string `json:"precheck_id"`
	Status     string `json:"status"`
	ErrorCode  string `json:"error_code"`
	ErrorMsg   string `json:"error_msg"`
}

type PreCheckInfo

type PreCheckInfo struct {
	JobId        string `json:"job_id" required:"true"`
	PreCheckMode string `json:"precheck_mode" required:"true"`
}

type PrecheckFailSubJobVo

type PrecheckFailSubJobVo struct {
	// ID of the subtask that fails to pass the pre-check.
	Id string `json:"id,omitempty"`
	// The name of the subtask that fails to pass the pre-check.
	Name string `json:"name,omitempty"`
	// Check results.
	CheckResult string `json:"check_result,omitempty"`
}

type PrecheckResult

type PrecheckResult struct {
	// Check item.
	Item string `json:"item,omitempty"`
	// Check results. Values:
	// PASSED ALARM FAILED
	Result string `json:"result,omitempty"`
	// Failure cause.
	FailedReason string `json:"failed_reason,omitempty"`
	// Encrypted data.
	Data string `json:"data,omitempty"`
	// Row error message.
	RawErrorMsg string `json:"raw_error_msg,omitempty"`
	// Check item group.
	Group string `json:"group,omitempty"`
	// Information about failed subtasks.
	FailedSubJobs []PrecheckFailSubJobVo `json:"failed_sub_jobs,omitempty"`
}

type QueryJobResp

type QueryJobResp struct {
	// Task ID.
	Id string `json:"id,omitempty"`
	// Parent task ID.
	ParentId string `json:"parent_id,omitempty"`
	// Task name.
	Name string `json:"name,omitempty"`
	// Task status. Values:
	// CREATING: The task is being created.
	// CREATE_FAILED: The task fails to be created.
	// CONFIGURATION: The task is being configured.
	// STARTJOBING: The task is being started.
	// WAITING_FOR_START: The task is waiting to be started.
	// START_JOB_FAILED: The task fails to be started.
	// FULL_TRANSFER_STARTED: Full migration is in progress, and the DR scenario is initialized.
	// FULL_TRANSFER_FAILED: Full migration failed. Initialization failed in the DR scenario.
	// FULL_TRANSFER_COMPLETE: Full migration is complete, and the initialization is complete in the DR scenario.
	// INCRE_TRANSFER_STARTED: Incremental migration is being performed, and the DR task is in progress.
	// INCRE_TRANSFER_FAILED: Incremental migration fails and a DR exception occurs.
	// RELEASE_RESOURCE_STARTED: The task is being stopped.
	// RELEASE_RESOURCE_FAILED: Stop task failed.
	// RELEASE_RESOURCE_COMPLETE: The task is stopped.
	// CHANGE_JOB_STARTED: The task is being changed.
	// CHANGE_JOB_FAILED: Change task failed.
	// CHILD_TRANSFER_STARTING: The subtask is being started.
	// CHILD_TRANSFER_STARTED: The subtask is being migrated.
	// CHILD_TRANSFER_COMPLETE: The subtask migration is complete.
	// CHILD_TRANSFER_FAILED: Migrate subtask failed.
	// RELEASE_CHILD_TRANSFER_STARTED: The subtask is being stopped.
	// RELEASE_CHILD_TRANSFER_COMPLETE: The subtask is complete.
	Status string `json:"status,omitempty"`
	// Description.
	Description string `json:"description,omitempty"`
	// Creation time, in timestamp format.
	CreateTime string `json:"create_time,omitempty"`
	// Migration type. Values:
	// FULL_TRANS: full migration
	// INCR_TRANS: incremental migration
	// FULL_INCR_TRANS: full+incremental migration
	TaskType string `json:"task_type,omitempty"`
	// Source database information.
	SourceEndpoint Endpoint `json:"source_endpoint,omitempty"`
	// DMQ information body.
	DmqEndpoint Endpoint `json:"dmq_endpoint,omitempty"`
	// Information about the physical source database.
	SourceSharding []Endpoint `json:"source_sharding,omitempty"`
	// Information body of the destination database.
	TargetEndpoint Endpoint `json:"target_endpoint,omitempty"`
	// Network type. Values:
	// vpn
	// vpc
	// eip
	NetType string `json:"net_type,omitempty"`
	// Failure cause.
	FailedReason string `json:"failed_reason,omitempty"`
	// Replication instance information.
	InstInfo InstInfo `json:"inst_info,omitempty"`
	// Start time, in timestamp format.
	ActualStartTime string `json:"actual_start_time,omitempty"`
	// Full migration completion time, in timestamp format.
	FullTransferCompleteTime string `json:"full_transfer_complete_time,omitempty"`
	// Update time, in timestamp format.
	UpdateTime string `json:"update_time,omitempty"`
	// Task direction. Values:
	// up: The current cloud is the standby cloud in the DR and to-the-cloud scenarios.
	// down: The current cloud is the active cloud in the DR and out-of-cloud scenarios.
	// non-dbs: self-built databases.
	JobDirection string `json:"job_direction,omitempty"`
	// Migration scenario Values:
	// migration: real-time migration.
	// sync: real-time synchronization.
	// cloudDataGuard: real-time disaster recovery.
	DbUseType string `json:"db_use_type,omitempty"`
	// Whether the instance needs to be restarted.
	NeedRestart *bool `json:"need_restart,omitempty"`
	// Whether the destination instance is restricted to read-only.
	IsTargetReadonly *bool `json:"is_target_readonly,omitempty"`
	// Conflict policy. Values:
	// stop: The conflict fails.
	// overwrite: Conflicting data is overwritten.
	// ignore: The conflict is ignored.
	ConflictPolicy string `json:"conflict_policy,omitempty"`
	// DDL filtering policy. Values:
	// drop_database: Filters DDLs.
	// drop_databasefilter_all: Filters out all DLLs.
	// "": No filter.
	FilterDdlPolicy string `json:"filter_ddl_policy,omitempty"`
	// Migration speed limit.
	SpeedLimit []SpeedLimitInfo `json:"speed_limit,omitempty"`
	// Migration schemes. Values:
	// Replication: primary/standby replication.
	// Tungsten: parses logs.
	// PGBaseBackup: PostgreSQL backup.
	SchemaType string `json:"schema_type,omitempty"`
	// The number of nodes.
	NodeNum string `json:"node_num,omitempty"`
	// Whether to select objects.
	ObjectSwitch bool `json:"object_switch,omitempty"`
	// Main task ID
	MasterJobId string `json:"master_job_id,omitempty"`
	// Full snapshot mode.
	FullMode string `json:"full_mode,omitempty"`
	// Whether to migrate the structure.
	StructTrans *bool `json:"struct_trans,omitempty"`
	// Whether to migrate indexes.
	IndexTrans *bool `json:"index_trans,omitempty"`
	// Whether to replace the definer with the user of the destination database.
	ReplaceDefiner *bool `json:"replace_definer,omitempty"`
	// Whether to migrate users.
	MigrateUser *bool `json:"migrate_user,omitempty"`
	// Whether to perform database-level synchronization.
	SyncDatabase *bool `json:"sync_database,omitempty"`

	ErrorCode    string `json:"error_code,omitempty"`
	ErrorMessage string `json:"error_message,omitempty"`

	// Information about the root node database of the destination instance.
	TargetRootDb *DefaultRootDb `json:"target_root_db,omitempty"`
	// AZ where the node is located.
	AzCode string `json:"az_code,omitempty"`
	// VPC to which the node belongs.
	VpcId string `json:"vpc_id,omitempty"`
	// Subnet where the node is located.
	SubnetId string `json:"subnet_id,omitempty"`
	// Security group to which the node belongs.
	SecurityGroupId string `json:"security_group_id,omitempty"`
	// Whether the task is a multi-active DR task. The value is true when the task is a dual-active DR task.
	MultiWrite *bool `json:"multi_write,omitempty"`
	// Whether IPv6 is supported
	SupportIpV6 *bool `json:"support_ip_v6,omitempty"`
	// Inherited task ID, which is used for the Oracle_Mrskafka link.
	InheritId string `json:"inherit_id,omitempty"`
	// GTID set of breakpoints.
	Gtid string `json:"gtid,omitempty"`
	// Exception notification settings.
	AlarmNotify *QuerySmnInfoResp `json:"alarm_notify,omitempty"`
	// Whether the task is a cross-AZ synchronization task.
	IsMultiAz *bool `json:"is_multi_az"`
	// AZ name of the node.
	AzName string `json:"az_name"`
	// Primary AZ of the cross-AZ task.
	MasterAz string `json:"master_az"`
	// Standby AZ of the cross-AZ task.
	SlaveAz string `json:"slave_az"`
	// Primary/Standby role of a task.
	NodeRole string `json:"node_role"`
	// Start point of an incremental task.
	IncreStartPosition string `json:"incre_start_position,omitempty"`
}

type QueryJobStatusResp

type QueryJobStatusResp struct {
	// Task ID.
	Id string `json:"id,omitempty"`
	// Task status. Values:
	// CREATING: The task is being created.
	// CREATE_FAILED: The task fails to be created.
	// CONFIGURATION: The task is being configured.
	// STARTJOBING: The task is being started.
	// WAITING_FOR_START: The task is waiting to be started.
	// START_JOB_FAILED: The task fails to be started.
	// PAUSEING: The task is being paused.
	// FULL_TRANSFER_STARTED: Full migration is in progress, and the DR scenario is initialized.
	// FULL_TRANSFER_FAILED: Full migration failed. Initialization failed in the DR scenario.
	// FULL_TRANSFER_COMPLETE: Full migration is complete, and the initialization is complete in the DR scenario.
	// INCRE_TRANSFER_STARTED: Incremental migration is being performed, and the DR task is in progress.
	// INCRE_TRANSFER_FAILED: Incremental migration fails and a DR exception occurs.
	// RELEASE_RESOURCE_STARTED: The task is being stopped.
	// RELEASE_RESOURCE_FAILED: Stop task failed.
	// RELEASE_RESOURCE_COMPLETE: The task is stopped.
	// CHANGE_JOB_STARTED: The task is being changed.
	// CHANGE_JOB_FAILED: Change task failed.
	// CHILD_TRANSFER_STARTING: The subtask is being started.
	// CHILD_TRANSFER_STARTED: The subtask is being migrated.
	// CHILD_TRANSFER_COMPLETE: The subtask migration is complete.
	// CHILD_TRANSFER_FAILED: Migrate subtask failed.
	// RELEASE_CHILD_TRANSFER_STARTED: The subtask is being stopped.
	// RELEASE_CHILD_TRANSFER_COMPLETE: The subtask is complete.
	Status string `json:"status,omitempty"`

	ErrorCode    string `json:"error_code,omitempty"`
	ErrorMessage string `json:"error_message,omitempty"`
}

type QueryPreCheckResp

type QueryPreCheckResp struct {
	// Pre-check ID.
	PrecheckId string `json:"precheck_id,omitempty"`
	// Whether the pre-check items are passed. true: indicates that the pre-check is passed.
	// The task can be started only after the pre-check is passed.
	Result bool `json:"result,omitempty"`
	// Pre-check progress, in percentage.
	Process string `json:"process,omitempty"`
	// Percentage of passed pre-checks.
	TotalPassedRate string `json:"total_passed_rate,omitempty"`
	// RDS DB instance ID.
	RdsInstanceId string `json:"rds_instance_id,omitempty"`
	// Migration direction. Values:
	// up: The current cloud is the standby cloud in the cloud DR and backup scenario.
	// down: The current cloud is the active cloud in the cloud DR scenario.
	// non-dbs: self-built databases.
	JobDirection string `json:"job_direction,omitempty"`
	// Pre-check results.
	PrecheckResult []PrecheckResult `json:"precheck_result,omitempty"`
	// Error message, which is optional and indicates the returned information about the failure status.
	ErrorMsg string `json:"error_msg,omitempty"`
	// Error code, which is optional and indicates the returned information about the failure status.
	ErrorCode string `json:"error_code,omitempty"`
}

type QueryPreCheckResultReq

type QueryPreCheckResultReq struct {
	Jobs []string `json:"jobs" required:"true"`
}

type QuerySmnInfoResp

type QuerySmnInfoResp struct {
	TopicName     string          `json:"topic_name"`
	DelayTime     int             `json:"delay_time"`
	RtoDisplay    int             `json:"rto_delay"`
	RpoDisplay    int             `json:"rpo_delay"`
	AlarmToUser   *bool           `json:"alarm_to_user"`
	Subscriptions []Subscriptions `json:"subscriptions"`
}

type SpeedLimitInfo

type SpeedLimitInfo struct {
	// Start time (UTC) of flow control. The start time is an integer in hh:mm format and the minutes part is ignored.
	// hh indicates the hour, for example, 01:00.
	Begin string `json:"begin" required:"true"`
	// End time (UTC) in the format of hh:mm, for example, 15:59. The value must end with 59.
	End string `json:"end" required:"true"`
	// Speed. The value ranges from 1 to 9,999, in MB/s.
	Speed string `json:"speed" required:"true"`
	// Whether the UTC time is used.
	IsUtc *bool `json:"is_utc,omitempty"`
}

type StartInfo

type StartInfo struct {
	// Task ID.
	JobId string `json:"job_id"`
	// Task start time. The timestamp is accurate to milliseconds, for example, 1608188903063.
	// If the value is empty, the task is started immediately.
	StartTime string `json:"start_time,omitempty"`
}

type SubscriptionInfo

type SubscriptionInfo struct {
	// List of mobile numbers or email addresses.
	// Use commas (,) to separate multiple mobile numbers or email addresses.
	// Up to 10 mobile numbers or email addresses are supported.
	Endpoints []string `json:"endpoints,omitempty"`
	// Receiving method. Values:
	// sms: SMS message
	// email: email.
	Protocol string `json:"protocol,omitempty"`
}

type Subscriptions

type Subscriptions struct {
	Endpoints []string `json:"endpoints"`
	Protocol  string   `json:"protocol"`
}

type TestEndPoint

type TestEndPoint struct {
	// Task ID.
	Id string `json:"id" required:"true"`
	// Network type.
	// Value: vpn vpc eip
	NetType string `json:"net_type" required:"true"`
	// Database type.
	// Value: mysql mongodb taurus postgresql
	DbType string `json:"db_type" required:"true"`
	// Database IP address.
	Ip string `json:"ip" required:"true"`
	// Database port number. This parameter must be set to 0 for the Mongo and DDS databases.
	DbPort int `json:"db_port,omitempty"`
	// The RDS or GaussDB(for MySQL) instance ID. This parameter is mandatory for RDS or GaussDB(for MySQL) instances.
	InstId string `json:"inst_id,omitempty"`
	// Database account.
	DbUser string `json:"db_user" required:"true"`
	// Database password.
	DbPassword string `json:"db_password"`
	// Whether SSL is enabled.
	SslLink *bool `json:"ssl_link,omitempty"`
	// The SSL certificate content, which is encrypted using Base64.
	// This parameter is mandatory for secure connection to the source database.
	SslCertKey string `json:"ssl_cert_key,omitempty"`
	// The SSL certificate name. This parameter is mandatory for secure connection to the source database.
	SslCertName string `json:"ssl_cert_name,omitempty"`
	// The checksum value of the SSL certificate, which is used for backend verification.
	// This parameter is mandatory for secure connection to the source database.
	SslCertCheckSum string `json:"ssl_cert_check_sum,omitempty"`
	// The SSL certificate password. The certificate file name extension is .p12 and requires a password.
	SslCertPassword string `json:"ssl_cert_password,omitempty"`
	// ID of the VPC where the instance is located.
	VpcId string `json:"vpc_id,omitempty"`
	// ID of the subnet where the instance is located.
	SubnetId string `json:"subnet_id,omitempty"`
	// Source database: so. Destination database: ta. Default value: so
	// Values: so ta
	EndPointType string `json:"end_point_type" required:"true"`
	// Region of the RDS DB instance. This parameter is mandatory when the RDS DB instance is used.
	Region string `json:"region,omitempty"`
	// Project ID of the region where the user is located. This parameter is mandatory when the RDS DB instance is used.
	ProjectId string `json:"project_id,omitempty"`
	// Database username, which is the DDS authentication database or the service name of the Oracle database.
	DbName string `json:"db_name,omitempty"`
}

type UpdateDatabaseObjectReq

type UpdateDatabaseObjectReq struct {
	// Task ID.
	JobId string `json:"job_id"`
	// Whether to select an object. If this parameter is not set, the default value is No.
	// Yes: Customize the objects to be migrated.
	// No: Migrate all VMs.
	Selected bool `json:"selected,omitempty"`
	// Whether to perform database-level synchronization.
	SyncDatabase bool `json:"sync_database,omitempty"`
	// Data object selection information. This parameter is mandatory when selected is set to true.
	Job []DatabaseInfo `json:"job,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL