Documentation
¶
Index ¶
- type ComputeFlavorGroupsInfo
- type ComputeFlavors
- type EngineGroupsInfo
- type EnginesPage
- type ModifyDbReadPolicyOpts
- type ModifyDbReadPolicyResponse
- type QueryEngineOpts
- type QueryEnginesResponse
- type QueryNodeClassesOpts
- type QueryNodeClassesResponse
- type ScaleInOpts
- type ScaleInResponse
- type ScaleOutOpts
- type ScaleOutResponse
- type SupportAzsInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputeFlavorGroupsInfo ¶
type ComputeFlavorGroupsInfo struct {
// Compute resource architecture type. The value can be x86 or ARM.
GroupType string `json:"groupType"`
// Compute flavors
ComputeFlavors []ComputeFlavors `json:"computeFlavors"`
// Which page the server starts returning items.
Offset int `json:"offset"`
// Number of records displayed on each page
Limit int `json:"limit"`
// Total number of compute flavors
Total int `json:"total"`
}
type ComputeFlavors ¶
type ComputeFlavors struct {
// Flavor ID
ID string `json:"id"`
// Resource type code
TypeCode string `json:"typeCode"`
// VM flavor types recorded in DDM
Code string `json:"code"`
// VM flavor types recorded by the IaaS layer
IaaSCode string `json:"iaasCode"`
// Number of CPUs
CPU string `json:"cpu"`
// Memory size, in GB
Mem string `json:"mem"`
// Maximum number of connections
MaxConnections string `json:"maxConnections"`
// Compute resource type
ServerType string `json:"serverType"`
// Compute resource architecture type. The value can be x86 or ARM.
Architecture string `json:"architecture"`
// Status of the AZ where node classes are available.
// The key is the AZ ID and the value is the AZ status.
// The value can be:
// - normal: indicates that the node classes in the AZ are available.
// - unsupported: indicates that the node classes are not supported by the AZ.
// - sellout: indicates that the node classes in the AZ are sold out.
AZStatus map[string]string `json:"azStatus"`
// Region status
RegionStatus string `json:"regionStatus"`
// Compute resource architecture type. The value can be x86 or ARM.
GroupType string `json:"groupType"`
// Engine type
DBType string `json:"dbType"`
// Extension field for storing AZ information
ExtendFields map[string]string `json:"extendFields"`
}
ComputeFlavors represents the details of a compute resource flavor.
type EngineGroupsInfo ¶
type EngineGroupsInfo struct {
// Engine ID
ID string `json:"id"`
// Engine name
Name string `json:"name"`
// Engine version
Version string `json:"version"`
// AZs (Array of SupportAzsInfo objects)
SupportAzs []SupportAzsInfo `json:"supportAzs"`
}
func ExtractEngineGroups ¶
func ExtractEngineGroups(r pagination.NewPage) ([]EngineGroupsInfo, error)
func QueryEngineInfo ¶
func QueryEngineInfo(client *golangsdk.ServiceClient, opts QueryEngineOpts) ([]EngineGroupsInfo, error)
QueryEngineInfo is used to query DDM instances.
type EnginesPage ¶
type EnginesPage struct {
pagination.NewSinglePageBase
}
type ModifyDbReadPolicyOpts ¶
type ModifyDbReadPolicyResponse ¶
type ModifyDbReadPolicyResponse struct {
// Specifies whether the operation is successful
Success bool `json:"success"`
// DDM instance ID
InstanceId string `json:"instance_id"`
}
func ModifyDbReadPolicy ¶
func ModifyDbReadPolicy(client *golangsdk.ServiceClient, instanceId string, opts ModifyDbReadPolicyOpts) (*ModifyDbReadPolicyResponse, error)
ModifyDbReadPolicy is used to modify the read policy of the DB instance associated with a DDM instance.
type QueryEngineOpts ¶
type QueryEngineOpts struct {
// Specifies the Index offset.
// The query starts from the next piece of data indexed by this parameter. The value is 0 by default.
// The value must be a positive integer.
Offset int `q:"offset"`
// A maximum of instances to be queried.
// Value range: 1 to 128.
// If the parameter value is not specified, 10 DDM instances are queried by default.
Limit int `q:"limit"`
}
type QueryEnginesResponse ¶
type QueryEnginesResponse struct {
// Information of available engines
EngineGroups []EngineGroupsInfo `json:"engineGroups"`
// Which page the server starts returning items
Offset int `json:"offset"`
// Number of records displayed on each page
Limit int `json:"limit"`
// Number of engine versions
Total int `json:"total"`
}
type QueryNodeClassesOpts ¶
type QueryNodeClassesOpts struct {
// Engine ID, which can be obtained by calling the API for querying DDM engine information.
EngineId string `q:"engine_id" required:"true"`
// Specifies the Index offset.
// The query starts from the next piece of data indexed by this parameter. The value is 0 by default.
// The value must be a positive integer.
Offset int `q:"offset"`
// A maximum of node classes to be queried.
// Value range: 1 to 128.
// If the parameter value is not specified, 10 node classes are queried by default.
Limit int `q:"limit"`
}
type QueryNodeClassesResponse ¶
type QueryNodeClassesResponse struct {
// Compute flavor information
ComputeFlavorGroups []ComputeFlavorGroupsInfo `json:"computeFlavorGroups"`
}
func QueryNodeClasses ¶
func QueryNodeClasses(client *golangsdk.ServiceClient, opts QueryNodeClassesOpts) (*QueryNodeClassesResponse, error)
QueryNodeClasses is used to query DDM node classes available in an AZ.
type ScaleInOpts ¶
type ScaleInOpts struct {
// Number of nodes to be removed. The maximum value is the instance nodes minus 1. (Mandatory)
NodeNumber int `json:"node_number" required:"true"`
// Group ID, which specifies the node group that is scaled out. This parameter must be specified if there is more than one node group (Optional)
GroupId string `json:"group_id,omitempty"`
}
type ScaleInResponse ¶
type ScaleInResponse struct {
// DDM instance ID
InstanceId string `json:"instanceId"`
// DDM instance name
InstanceName string `json:"instanceName"`
// Task ID
JobId string `json:"jobId"`
}
func ScaleIn ¶
func ScaleIn(client *golangsdk.ServiceClient, instanceId string, opts ScaleInOpts) (*ScaleInResponse, error)
ScaleIn is used to remove nodes from a specified DDM instance.
type ScaleOutOpts ¶
type ScaleOutOpts struct {
// Flavor ID of the VM for deploying the DDM instance that is to be scaled out (Mandatory)
FlavorId string `json:"flavor_id" required:"true"`
// Number of nodes to be added (Mandatory)
NodeNumber int `json:"node_number" required:"true"`
// Group ID, which specifies the node group that is scaled out. This parameter must be specified if there is more than one node group (Optional)
GroupId string `json:"group_id,omitempty"`
// The function has not been supported, and this field is reserved (Optional)
IsAutoPay bool `json:"is_auto_pay,omitempty"`
}
type ScaleOutResponse ¶
type ScaleOutResponse struct {
// DDM instance ID
InstanceId string `json:"instanceId"`
// DDM instance name
InstanceName string `json:"instanceName"`
// Task ID
JobId string `json:"jobId"`
}
func ScaleOut ¶
func ScaleOut(client *golangsdk.ServiceClient, instanceId string, opts ScaleOutOpts) (*ScaleOutResponse, error)
ScaleOut is used to scale out a specified DDM instance.
type SupportAzsInfo ¶
Click to show internal directories.
Click to hide internal directories.