Documentation ¶
Index ¶
- func Delete(c *golangsdk.ServiceClient, id string) (err error)
- func Update(c *golangsdk.ServiceClient, opts UpdateOpts) (err error)
- type ApplyOpts
- type ApplyResponse
- type ApplyResult
- type Configuration
- func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*Configuration, error)
- func Get(client *golangsdk.ServiceClient, id string) (*Configuration, error)
- func GetForInstance(c *golangsdk.ServiceClient, instanceID string) (*Configuration, error)
- func List(client *golangsdk.ServiceClient) ([]Configuration, error)
- type CreateOpts
- type DataStore
- type Parameter
- type UpdateInstanceConfigurationOpts
- type UpdateInstanceConfigurationResponse
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Update ¶
func Update(c *golangsdk.ServiceClient, opts UpdateOpts) (err error)
Update accepts a UpdateOpts struct and uses the values to update a Configuration.The response code from api is 200
Types ¶
type ApplyOpts ¶ added in v0.2.1
type ApplyOpts struct { // Specifies the parameter template ID. ConfigId string // Specifies the DB instance ID list object. InstanceIDs []string `json:"instance_ids" required:"true"` }
ApplyOpts contains all the instances needed to apply another template.
type ApplyResponse ¶ added in v0.5.26
type ApplyResponse struct { // Specifies the parameter template ID. ConfigurationID string `json:"configuration_id"` // Specifies the parameter template name. ConfigurationName string `json:"configuration_name"` // Specifies the result of applying the parameter template. ApplyResults []ApplyResult `json:"apply_results"` // Specifies whether each parameter template is applied to DB instances successfully. Success bool `json:"success"` JobId string `json:"job_id"` }
func Apply ¶ added in v0.2.1
func Apply(client *golangsdk.ServiceClient, opts ApplyOpts) (*ApplyResponse, error)
Apply is used to apply a parameter template to one or more DB instances.
type ApplyResult ¶ added in v0.2.1
type ApplyResult struct { // Indicates the DB instance ID. InstanceID string `json:"instance_id"` // Indicates the DB instance name. InstanceName string `json:"instance_name"` // Indicates whether a reboot is required. RestartRequired bool `json:"restart_required"` // Indicates whether each parameter template is applied to DB instances successfully. Success bool `json:"success"` }
type Configuration ¶
type Configuration struct { // Specifies the parameter template ID. ID string `json:"id"` // Indicates the parameter template name. Name string `json:"name"` // Indicates the database version name. DatastoreVersionName string `json:"datastore_version_name"` // Indicates the database name. DatastoreName string `json:"datastore_name"` // Indicates the parameter template description. Description string `json:"description"` // Indicates the creation time in the following format: yyyy-MM-ddTHH:mm:ssZ. // T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. Created string `json:"created"` // Indicates the update time in the following format: yyyy-MM-ddTHH:mm:ssZ. // T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. Updated string `json:"updated"` // Specifies 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"` // Configuration Parameters Parameters []Parameter `json:"configuration_parameters"` }
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*Configuration, error)
Create will create a new Config based on the values in CreateOpts.
func Get ¶
func Get(client *golangsdk.ServiceClient, id string) (*Configuration, error)
Get retrieves a particular Configuration based on its unique ID.
func GetForInstance ¶ added in v0.2.7
func GetForInstance(c *golangsdk.ServiceClient, instanceID string) (*Configuration, error)
GetForInstance retrieves Configuration applied to particular RDS instance configuration ID and Name will be empty
func List ¶ added in v0.2.1
func List(client *golangsdk.ServiceClient) ([]Configuration, error)
List is used to obtain the parameter template list, including default parameter templates of all databases and those created by users.
type CreateOpts ¶
type CreateOpts struct { // Specifies the parameter template name. It contains a maximum of 64 characters and can contain only uppercase letters, lowercase letters, digits, hyphens (-), underscores (_), and periods (.). Name string `json:"name" required:"true"` // Specifies the parameter template description. It contains a maximum of 256 characters and cannot contain the following special characters: >!<"&'= Its value is left blank by default. Description string `json:"description,omitempty"` // Specifies the parameter values defined by users based on the default parameter template. By default, the parameter values cannot be changed. Values map[string]string `json:"values,omitempty"` // Specifies the database object. DataStore DataStore `json:"datastore" required:"true"` }
CreateOpts contains all the values needed to create a new configuration.
type DataStore ¶
type DataStore struct { // Specifies the DB engine. Its value can be any of the following and is case-insensitive: // MySQL // PostgreSQL // SQLServer Type string `json:"type" required:"true"` // Specifies the database version. // Example values: // MySQL: 8.0 // PostgreSQL: 13 // SQLServer: 2017_SE Version string `json:"version" required:"true"` }
type Parameter ¶
type Parameter struct { // Indicates the parameter name. Name string `json:"name"` // Indicates the parameter value. Value string `json:"value"` // Indicates whether a reboot is required. RestartRequired bool `json:"restart_required"` // Indicates whether the parameter is read-only. ReadOnly bool `json:"readonly"` // Indicates the parameter value range. If the type is Integer, the value is 0 or 1. If the type is Boolean, the value is true or false. ValueRange string `json:"value_range"` // Indicates the parameter type, which can be integer, string, boolean, list, or float. Type string `json:"type"` // Indicates the parameter description. Description string `json:"description"` }
type UpdateInstanceConfigurationOpts ¶ added in v0.5.26
type UpdateInstanceConfigurationResponse ¶ added in v0.5.26
type UpdateInstanceConfigurationResponse struct { // Indicates whether a reboot is required. RestartRequired bool `json:"restart_required"` JobId string `json:"job_id"` // List of ignored parameters. // If a parameter does not exist or is read-only, the parameter cannot be modified and the names of all ignored parameters are returned by ignored_params. IgnoredParams []string `json:"ignored_params"` }
func UpdateInstanceConfiguration ¶ added in v0.5.26
func UpdateInstanceConfiguration(client *golangsdk.ServiceClient, opts UpdateInstanceConfigurationOpts) (*UpdateInstanceConfigurationResponse, error)
type UpdateOpts ¶
type UpdateOpts struct { // Specifies the parameter template ID. ConfigId string // Specifies the parameter template name. It contains a maximum of 64 characters and can contain only uppercase letters, lowercase letters, digits, hyphens (-), underscores (_), and periods (.). Name string `json:"name,omitempty"` // Specifies the parameter template description. It contains a maximum of 256 characters and does not support the following special characters: !<>='&" Its value is left blank by default. Description string `json:"description,omitempty"` // Specifies the parameter values defined by users based on the default parameter template. If this parameter is left blank, the parameter value cannot be changed. Values map[string]string `json:"values,omitempty"` }
UpdateOpts contains all the values needed to update a Configuration.