Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApplyOpts ¶
type ApplyOpts struct {
// Instance IDs, group IDs, or node IDs. You can call the API used for querying instances and details to obtain the value.
// If you do not have an instance, you can call the API used for creating an instance.
// If the DB instance type is cluster and the shard or config parameter template is to be changed, the value is the group ID.
// If the parameter template of the mongos node is changed, the value is the node ID.
// If the DB instance to be changed is a replica set instance or a single node instance, the value is the instance ID.
EntityIDs []string `json:"entity_ids" required:"true"`
}
type ConfigOpts ¶
type ConfigOpts struct {
// Instance ID, group ID, or node ID. You can call the API used for querying instances and details to obtain the value.
// If you do not have an instance, you can call the API used for creating an instance.
// If the DB instance type is cluster and the shard or config parameter template is obtained, the value is the group ID.
// If the parameter template of the mongos node is obtained, the value is the node ID.
// If the DB instance type is a replica set instance or a single node instance, the value is the instance ID.
EntityId string `q:"entity_id"`
}
type ConfigurationsResponse ¶
type ConfigurationsResponse struct {
// Parameter template ID.
ID string `json:"id"`
// Parameter template name.
Name string `json:"name"`
// Parameter template description.
Description string `json:"description"`
// Database version.
DatastoreVersion string `json:"datastore_version"`
// Database type.
DatastoreName string `json:"datastore_name"`
// Node type of the parameter template.
NodeType string `json:"node_type"`
// Creation time in the "yyyy-MM-ddTHH:mm:ssZ" format.
CreatedAt string `json:"created"`
// Update time in the "yyyy-MM-ddTHH:mm:ssZ" format.
UpdatedAt string `json:"updated"`
// Indicates whether the parameter template is created by users.
// false: The parameter template is a default parameter template.
// true: The parameter template is a custom template.
UserDefined bool `json:"user_defined"`
}
type ListConfigOpts ¶
type ListConfigOpts struct {
// Index offset.
// If offset is set to N, the resource query starts from the N+1 piece of data. The default value is 0, indicating that the query starts from the first piece of data.
// The value must be a positive integer.
Offset int `q:"offset"`
// Maximum number of specifications that can be queried
// Value range: 1-100
// If this parameter is not transferred, the first 100 pieces of specification information can be queried by default.
Limit int `q:"limit"`
}
type ListResponse ¶
type ListResponse struct {
Configurations []ConfigurationsResponse `json:"configurations"`
Quota int `json:"quota"`
TotalCount int `json:"total_count"`
}
func List ¶
func List(client *golangsdk.ServiceClient, opts ListConfigOpts) (*ListResponse, error)
type Parameters ¶
type Parameters struct {
// The parameter name.
Name string `json:"name"`
// The parameter value.
Value string `json:"value"`
// The parameter description.
Description string `json:"description"`
// Parameter type.
// The value can be integer, string, boolean, float, or list.
Type string `json:"type"`
// Value range.
// For example, the value of integer is 0 or 1, and the value of boolean is true or false.
ValueRange string `json:"value_range"`
// Whether the instance needs to be restarted.
// If the value is true, restart is required.
// If the value is false, restart is not required.
RestartRequired bool `json:"restart_required"`
// Whether the parameter is read-only.
// If the value is true, the parameter is read-only.
// If the value false, the parameter is not read-only.
ReadOnly bool `json:"readonly"`
}
type Response ¶
type Response struct {
// Parameter template ID.
ID string `json:"id"`
// Parameter template name.
Name string `json:"name"`
// Parameter template description.
Description string `json:"description"`
// Node type of the parameter template.
NodeType string `json:"node_type"`
// Database version.
DatastoreVersion string `json:"datastore_version"`
// Database type.
DatastoreName string `json:"datastore_name"`
// Creation time in the "yyyy-MM-ddTHH:mm:ssZ" format.
CreatedAt string `json:"created"`
// Update time in the "yyyy-MM-ddTHH:mm:ssZ" format.
UpdatedAt string `json:"updated"`
// The parameters defined by users based on the default parameter templates.
Parameters []Parameters `json:"parameters"`
}
func GetInstanceConfig ¶
func GetInstanceConfig(client *golangsdk.ServiceClient, instanceId string, opts ConfigOpts) (*Response, error)
Click to show internal directories.
Click to hide internal directories.