Documentation ¶
Index ¶
- Variables
- func Delete(c *golangsdk.ServiceClient, id string) error
- func ModifyConfiguration(c *golangsdk.ServiceClient, instanceId string, opts ModifyRedisConfigOpts) (*golangsdk.Result, error)
- func Update(c *golangsdk.ServiceClient, id string, opts ModifyInstanceOpt) (*golangsdk.Result, error)
- func UpdatePassword(c *golangsdk.ServiceClient, id string, opts UpdatePasswordOpts) (*golangsdk.Result, error)
- func UpdateSsl(client *golangsdk.ServiceClient, id string, opts SslOpts) (*golangsdk.Result, error)
- type BackupPlan
- type BandWidthInfo
- type Configuration
- type CreateOpts
- type CreateResponse
- type DcsBackupPolicy
- type DcsBssParam
- type DcsBssParamOpts
- type DcsInstance
- type GetSslResponse
- type InstanceBackupPolicy
- type InstanceBackupPolicyOpts
- type ModifyInstanceOpt
- type ModifyRedisConfigOpts
- type RedisCommand
- type RedisConfig
- type RedisConfigOpt
- type ResizeInstanceOpts
- type ResizePrePaidInstanceOpts
- type ResizePrePaidResponse
- type ResizeResponse
- type RestartOrFlushInstanceOpts
- type RestartResponse
- type RestartResultResponse
- type SimpleInstance
- type SslOpts
- type UpdatePasswordOpts
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
func ModifyConfiguration ¶
func ModifyConfiguration(c *golangsdk.ServiceClient, instanceId string, opts ModifyRedisConfigOpts) (*golangsdk.Result, error)
func Update ¶
func Update(c *golangsdk.ServiceClient, id string, opts ModifyInstanceOpt) (*golangsdk.Result, error)
func UpdatePassword ¶
func UpdatePassword(c *golangsdk.ServiceClient, id string, opts UpdatePasswordOpts) (*golangsdk.Result, error)
Types ¶
type BackupPlan ¶
type BandWidthInfo ¶
type BandWidthInfo struct { BandWidth int `json:"bandwidth"` BeginTime int `json:"begin_time"` CurrentTime int `json:"current_time"` EndTime int `json:"end_time"` ExpandCount int `json:"expand_count"` ExpandEffectTime int `json:"expand_effect_time"` ExpandIntervalTime int `json:"expand_interval_time"` MaxExpandCount int `json:"max_expand_count"` NextExpandTime int `json:"next_expand_time"` TaskRunning bool `json:"task_running"` }
type Configuration ¶
type Configuration struct { ConfigTime string `json:"config_time"` InstanceId int `json:"instance_id"` RedisConfig []RedisConfig `json:"redis_config"` ConfigStatus string `json:"config_status"` Status string `json:"status"` }
func GetConfigurations ¶
func GetConfigurations(c *golangsdk.ServiceClient, instanceID string) (*Configuration, error)
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true"` Engine string `json:"engine" required:"true"` EngineVersion string `json:"engine_version,omitempty"` Capacity float64 `json:"capacity" required:"true"` SpecCode string `json:"spec_code" required:"true"` AzCodes []string `json:"az_codes" required:"true"` VpcId string `json:"vpc_id" required:"true"` SubnetId string `json:"subnet_id" required:"true"` SecurityGroupId string `json:"security_group_id,omitempty"` PublicIpId string `json:"publicip_id,omitempty"` EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` EnterpriseProjectName string `json:"enterprise_project_name,omitempty"` Description string `json:"description,omitempty"` EnableSsl *bool `json:"enable_ssl,omitempty"` PrivateIp string `json:"private_ip,omitempty"` // instance number, the value range is 1-100. InstanceNum int `json:"instance_num,omitempty"` MaintainBegin string `json:"maintain_begin,omitempty"` MaintainEnd string `json:"maintain_end,omitempty"` Password string `json:"password,omitempty"` NoPasswordAccess *bool `json:"no_password_access,omitempty"` BssParam DcsBssParam `json:"bss_param,omitempty"` BackupPolicy *InstanceBackupPolicyOpts `json:"instance_backup_policy,omitempty"` Tags []tags.ResourceTag `json:"tags,omitempty"` AccessUser string `json:"access_user,omitempty"` EnablePublicIp *bool `json:"enable_publicip,omitempty"` Port int `json:"port,omitempty"` RenameCommands RedisCommand `json:"rename_commands,omitempty"` TemplateId string `json:"template_id,omitempty"` }
type CreateResponse ¶
type CreateResponse struct { OrderId string `json:"order_id"` Instances []SimpleInstance `json:"instances"` }
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*CreateResponse, error)
type DcsBackupPolicy ¶
type DcsBackupPolicy struct { BackupType string `json:"backup_type"` SaveDays int `json:"save_days"` PeriodicalBackupPlan BackupPlan `json:"periodical_backup_plan"` }
type DcsBssParam ¶
type DcsBssParam struct { ChargingMode string `json:"charging_mode" required:"true"` PeriodType string `json:"period_type,omitempty"` // period number, the value range is 1-9. PeriodNum int `json:"period_num,omitempty"` IsAutoRenew string `json:"is_auto_renew,omitempty"` IsAutoPay string `json:"is_auto_pay,omitempty"` }
type DcsBssParamOpts ¶
type DcsBssParamOpts struct {
IsAutoPay string `json:"is_auto_pay,omitempty"`
}
type DcsInstance ¶
type DcsInstance struct { VpcName string `json:"vpc_name"` ChargingMode int `json:"charging_mode"` VpcId string `json:"vpc_id"` UserName string `json:"user_name"` CreatedAt string `json:"created_at"` LaunchedAt string `json:"launched_at"` Description string `json:"description"` SecurityGroupId string `json:"security_group_id"` SecurityGroupName string `json:"security_group_name"` MaxMemory int `json:"max_memory"` UsedMemory int `json:"used_memory"` Capacity float64 `json:"capacity"` CapacityMinor string `json:"capacity_minor"` MaintainBegin string `json:"maintain_begin"` MaintainEnd string `json:"maintain_end"` Engine string `json:"engine"` NoPasswordAccess string `json:"no_password_access"` Ip string `json:"ip"` BackupPolicy InstanceBackupPolicy `json:"instance_backup_policy"` AzCodes []string `json:"az_codes"` AccessUser string `json:"access_user"` InstanceId string `json:"instance_id"` Port int `json:"port"` UserId string `json:"user_id"` Name string `json:"name"` SpecCode string `json:"spec_code"` SubnetId string `json:"subnet_id"` SubnetName string `json:"subnet_name"` SubnetCidr string `json:"subnet_cidr"` EngineVersion string `json:"engine_version"` OrderId string `json:"order_id"` Status string `json:"status"` DomainName string `json:"domain_name"` EnablePublicIp bool `json:"enable_publicip"` PublicIpId string `json:"publicip_id"` PublicIpAddress string `json:"publicip_address"` EnableSsl bool `json:"enable_ssl"` ServiceUpgrade bool `json:"service_upgrade"` ServiceTaskId string `json:"service_task_id"` EnterpriseProjectId string `json:"enterprise_project_id"` BackendAddress string `json:"backend_addrs"` BandWidthDetail BandWidthInfo `json:"bandwidth_info"` CacheMode string `json:"cache_mode"` CpuType string `json:"cpu_type"` ReplicaCount int `json:"replica_count"` ReadOnlyDomainName string `json:"readonly_domain_name"` TransparentClientIpEnable bool `json:"transparent_client_ip_enable"` ShardingCount int `json:"sharding_count"` ProductType string `json:"product_type"` }
func Get ¶
func Get(c *golangsdk.ServiceClient, id string) (*DcsInstance, error)
type GetSslResponse ¶
type GetSslResponse struct { Enable bool `json:"enabled"` Ip string `json:"ip"` SslValidated bool `json:"ssl_validated"` Port string `json:"port"` DomainName string `json:"domain_name"` SslExpiredAt string `json:"ssl_expired_at"` }
func GetSsl ¶
func GetSsl(client *golangsdk.ServiceClient, id string) (*GetSslResponse, error)
type InstanceBackupPolicy ¶
type InstanceBackupPolicy struct { BackupPolicyId string `json:"backup_policy_id"` Policy DcsBackupPolicy `json:"policy"` }
type InstanceBackupPolicyOpts ¶
type InstanceBackupPolicyOpts struct { BackupType string `json:"backup_type" required:"true"` SaveDays int `json:"save_days,omitempty"` PeriodicalBackupPlan BackupPlan `json:"periodical_backup_plan,omitempty"` }
type ModifyInstanceOpt ¶
type ModifyInstanceOpt struct { Name string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Port int `json:"port,omitempty"` MaintainBegin string `json:"maintain_begin,omitempty"` MaintainEnd string `json:"maintain_end,omitempty"` SecurityGroupId *string `json:"security_group_id,omitempty"` BackupPolicy *InstanceBackupPolicyOpts `json:"instance_backup_policy,omitempty"` RenameCommands *RedisCommand `json:"rename_commands,omitempty"` }
type ModifyRedisConfigOpts ¶
type ModifyRedisConfigOpts struct {
RedisConfig []RedisConfigOpt `json:"redis_config"`
}
type RedisCommand ¶
type RedisConfig ¶
type RedisConfig struct { Proxy bool `json:"proxy"` ParamId string `json:"param_id"` ParamName string `json:"param_name"` DefaultValue string `json:"default_value"` ValueRange string `json:"value_range"` ValueType string `json:"value_type"` Description string `json:"description"` ParamValue string `json:"param_value"` NodeRole string `json:"node_role"` ParamType string `json:"param_type"` UserPermission string `json:"user_permission"` NeedRestart bool `json:"need_restart"` SupportedVersion string `json:"supported_version"` InternationalKey string `json:"international_key"` NewVersionOnly bool `json:"new_version_only"` SupportDataVersion string `json:"support_data_version"` Customized bool `json:"customized"` }
type RedisConfigOpt ¶
type ResizeInstanceOpts ¶
type ResizeInstanceOpts struct { SpecCode string `json:"spec_code" required:"true"` NewCapacity float64 `json:"new_capacity" required:"true"` BssParam DcsBssParamOpts `json:"bss_param,omitempty"` ReservedIp []string `json:"reserved_ip,omitempty"` ChangeType string `json:"change_type,omitempty"` AvailableZones []string `json:"available_zones,omitempty"` NodeList []string `json:"node_list,omitempty"` }
type ResizePrePaidInstanceOpts ¶
type ResizePrePaidInstanceOpts struct { AutoOpenSecurityGroupRule bool `json:"auto_open_security_group_rule,omitempty"` ExecuteImmediately bool `json:"execute_immediately,omitempty"` NewCapacity float64 `json:"new_capacity,omitempty"` Password string `json:"password,omitempty"` SpecCode string `json:"spec_code,omitempty"` }
type ResizePrePaidResponse ¶
type ResizePrePaidResponse struct {
OrderId string `json:"order_id"`
}
func ResizePrePaidInstance ¶
func ResizePrePaidInstance(c *golangsdk.ServiceClient, id string, opts ResizePrePaidInstanceOpts) (*ResizePrePaidResponse, error)
type ResizeResponse ¶
type ResizeResponse struct {
OrderId string `json:"order_id"`
}
func ResizeInstance ¶
func ResizeInstance(c *golangsdk.ServiceClient, id string, opts ResizeInstanceOpts) (*ResizeResponse, error)
type RestartResponse ¶
type RestartResponse struct {
Results []RestartResultResponse `json:"results"`
}
func RestartOrFlushInstance ¶
func RestartOrFlushInstance(c *golangsdk.ServiceClient, opts RestartOrFlushInstanceOpts) (*RestartResponse, error)
type RestartResultResponse ¶
type SimpleInstance ¶
type UpdatePasswordOpts ¶
Click to show internal directories.
Click to hide internal directories.