Documentation
¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, clusterId, linkName string) error
- type Config
- type ConfigValues
- type CreateOpts
- type CreateQuery
- type CreateResp
- type ExtendedConfigs
- type GetQueryResp
- type Input
- type JobId
- type Link
- type LinkValidationResult
- type UpdateOpts
- type UpdateResp
- type ValidationLinkConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Inputs is a list of Input. Each element in the list is in name,value format. For details, see the descriptions of inputs parameters.
// In the from-config-values data structure, the value of this parameter varies with the source link type.
// For details, see section "Source Job Parameters" in the Cloud Data Migration User Guide.
// In the to-cofig-values data structure, the value of this parameter varies with the destination link type.
// For details, see section "Destination Job Parameters" in the Cloud Data Migration User Guide.
// For details about the inputs parameter in the driver-config-values data structure, see the job parameter descriptions.
Inputs []*Input `json:"inputs" required:"true"`
// Name is a configuration name. The value is fromJobConfig for a source job, toJobConfig for a destination job, and linkConfig for a link.
Name string `json:"name" required:"true"`
// Configuration ID (might not be returned)
ID int `json:"id,omitempty"`
// Configuration type (might not be returned)
Type string `json:"type,omitempty"`
}
type ConfigValues ¶
type ConfigValues struct {
// Array of configuration objects
Configs []Config `json:"configs" required:"true"`
// Extended configurations (optional)
ExtendedConfigs *ExtendedConfigs `json:"extended-configs,omitempty"`
// Validators (optional)
Validators []string `json:"validators,omitempty"`
}
type CreateOpts ¶
type CreateOpts struct {
Links []Link `json:"links" required:"true"`
}
type CreateQuery ¶
type CreateQuery struct {
// When the parameter is set to true, the API only validates whether the parameters are correctly configured, but does not create any link.
Validate bool `json:"validate,omitempty"`
}
type CreateResp ¶
type CreateResp struct {
// Name is a link name.
Name string `json:"name"`
// ValidationResult is an array of ValidationResult objects. If a link fails to be created, the failure cause is returned.
// If a link is successfully created, an empty list is returned.
ValidationResult []LinkValidationResult `json:"validation-result"`
}
CreateResp holds job running information
func Create ¶
func Create(client *golangsdk.ServiceClient, clusterId string, opts CreateOpts, q *CreateQuery) (*CreateResp, error)
Create is used to create a link. Send request POST /v1.1/{project_id}/clusters/{cluster_id}/cdm/link
type ExtendedConfigs ¶
type GetQueryResp ¶
type GetQueryResp struct {
// Links is a list of Link.
Links []Link `json:"links"`
// FromToUnMapping is a Source and destination data sources not supported by table/file migration.
FromToUnMapping string `json:"fromTo-unMapping"`
// PageSize is a source and destination data sources supported by entire DB migration.
BatchFromToMapping string `json:"batchFromTo-mapping,"`
}
func Get ¶
func Get(client *golangsdk.ServiceClient, clusterId, linkName string) (*GetQueryResp, error)
Get is used to query a link. Send request GET /v1.1/{project_id}/clusters/{cluster_id}/cdm/link/{link_name}
type Link ¶
type Link struct {
// User who created the link
LinkConfigValues *ConfigValues `json:"link-config-values" required:"true"`
// User who created the link.
CreationUser string `json:"creation-user,omitempty"`
// Link name.
Name string `json:"name" required:"true"`
// Link ID.
ID int `json:"id,omitempty"`
// Time when the link was created.
CreationDate int64 `json:"creation-date,omitempty"`
// Connector name associated with the link.
ConnectorName string `json:"connector-name" required:"true"`
// Time when the link was updated.
UpdateDate int64 `json:"update-date,omitempty"`
// Whether to activate the link.
Enabled bool `json:"enabled"`
// Update user who updated the link.
UpdateUser string `json:"update_user,omitempty"`
}
type LinkValidationResult ¶
type LinkValidationResult struct {
// LinkConfig is a validation result of link creation or update.
LinkConfig []*ValidationLinkConfig `json:"linkConfig,omitempty"`
}
type UpdateOpts ¶
type UpdateOpts struct {
Links []Link `json:"links" required:"true"`
}
type UpdateResp ¶
type UpdateResp struct {
// Submissions is an array of LinkValidationResult objects.
ValidationResult []LinkValidationResult `json:"validation-result"`
}
func Update ¶
func Update(client *golangsdk.ServiceClient, clusterId, linkName string, opts *UpdateOpts) (*UpdateResp, error)
Update is used to modify a link. Send request PUT /v1.1/{project_id}/clusters/{cluster_id}/cdm/link/{link_name}
type ValidationLinkConfig ¶
Click to show internal directories.
Click to hide internal directories.