Documentation
¶
Index ¶
- func Create(client *golangsdk.ServiceClient, opts CreateOpts) (err error)
- func Delete(client *golangsdk.ServiceClient, opts DeleteOpts) (err error)
- type Configs
- type CreateOpts
- type Datastore
- type DeleteOpts
- type Instance
- type InstanceLtsConfigs
- type ListConfigs
- type ListOpts
- type LtsConfig
- type LtsConfigs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (err error)
func Delete ¶
func Delete(client *golangsdk.ServiceClient, opts DeleteOpts) (err error)
Types ¶
type Configs ¶
type Configs struct {
// DDS Instance ID, which can be obtained by calling the API for querying instances and details.
// If there are no instances available, create one by calling the API used for creating an instance.
InstanceID string `json:"instance_id" required:"true"`
// LTS log type. This parameter cannot be left empty.
// The only supported option is audit_log.
LogType string `json:"log_type" required:"true"`
// LTS log group ID.
// You can obtain the value using the LTS API for querying all log groups under an account.
LtsGroupId string `json:"lts_group_id" required:"true"`
// LTS log stream ID.
// You can obtain the value using the LTS API for querying all log streams in a specified log group.
LtsStreamId string `json:"lts_stream_id" required:"true"`
}
type CreateOpts ¶
type CreateOpts struct {
// Each item indicates an LTS configuration for the instance.
LtsConfigs []Configs `json:"lts_configs" required:"true"`
}
type DeleteOpts ¶
type DeleteOpts struct {
// List of LTS configurations to be disabled.
// To disable multiple log configurations for an instance, you need to specify multiple items.
LtsConfigs []LtsConfig `json:"lts_configs" required:"true"`
}
type Instance ¶
type Instance struct {
// DDS Instance ID, which can be obtained by calling the API for querying instances and details.
// If there are no instances available, create one by calling the API used for creating an instance.
ID string `json:"id"`
// DDS Instance name.
Name string `json:"name"`
// Instance type, which can be single node, replica set, or cluster.
// Enumerated values:
// ReplicaSingle
// ReplicaSet
// Sharding
Mode string `json:"mode"`
// DB engine and version of the DB instance.
Datastore *Datastore `json:"datastore"`
// Instance status.
Status string `json:"status"`
// ID of the enterprise project to which the instance belongs.
// For the default enterprise project, the value is 0.
// For other enterprise projects, see Enterprise Management User Guide.
EnterpriseProjectId string `json:"enterprise_project_id"`
// All actions that are being executed on an instance.
Actions []string `json:"actions"`
}
type InstanceLtsConfigs ¶
type InstanceLtsConfigs struct {
// Brief information about an instance.
Instance *Instance `json:"instance"`
// LTS log configuration details. If no LTS log stream is configured, no response is returned for this field.
LtsConfigs []LtsConfigs `json:"lts_configs"`
}
type ListConfigs ¶
type ListConfigs struct {
// LTS log configuration and brief information about each instance.
InstanceLtsConfigs []InstanceLtsConfigs `json:"instance_lts_configs"`
// Total number of cloud service log configurations that can be queried,
// which is equal to the total number of DDS instances.
TotalCount int `json:"total_count"`
}
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOpts) (*ListConfigs, error)
type ListOpts ¶
type ListOpts 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"`
// Number of records to be queried. The value ranges from 0 to 50.
// If this parameter is not transferred,
// the log configurations of the first 50 DB instances are queried by default.
Limit *int `q:"limit"`
}
type LtsConfig ¶
type LtsConfig struct {
// DDS Instance ID, which can be obtained by calling the API for querying instances and details.
// If there are no instances available, create one by calling the API used for creating an instance.
InstanceID string `json:"instance_id" required:"true"`
// LTS log type. This parameter cannot be left empty.
// The only supported option is audit_log.
LogType string `json:"log_type" required:"true"`
}
type LtsConfigs ¶
type LtsConfigs struct {
// LTS log type. This parameter cannot be left empty.
// The only supported option is audit_log.
LogType string `json:"log_type"`
// LTS log group ID.
LtsGroupId string `json:"lts_group_id"`
// LTS log stream ID.
LtsStreamId string `json:"lts_stream_id"`
// Indicates whether to upload logs to LTS.
Enabled bool `json:"enabled"`
}
Click to show internal directories.
Click to hide internal directories.