Documentation ¶
Overview ¶
Package load_balancer_actions contains functionality for working with ECL Load Balancer/Actions resources.
Example to reboot a Load Balancer
loadBalancerID := "9ab7ab3c-38a6-417c-926b-93772c4eb2f9" rebootOpts := load_balancer_actions.RebootOpts{ Type: "HARD", } err := load_balancer_actions.Reboot(networkClient, loadBalancerID, rebootOpts).ExtractErr() if err != nil { panic(err) }
Example to reset password of Load Balancer
loadBalancerID := "9ab7ab3c-38a6-417c-926b-93772c4eb2f9" resetPasswordOpts := load_balancer_actions.ResetPasswordOpts{ Username: "user-read", } resetPasswordResult, err := load_balancer_actions.ResetPassword(networkClient, loadBalancerID, resetPasswordOpts).ExtractResetPassword() if err != nil { panic(err) } fmt.Printf("%+v\n", resetPasswordResult)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Password ¶
type Password struct { // new password NewPassword string `json:"new_password"` // username Username string `json:"username"` }
Password represents a detail of a Reset Password operation.
type RebootOpts ¶
type RebootOpts struct { // should syslog record acl info Type string `json:"type" required:"true"` }
RebootOpts represents the attributes used when rebooting a Load Balancer.
func (RebootOpts) ToLoadBalancerActionRebootMap ¶
func (opts RebootOpts) ToLoadBalancerActionRebootMap() (map[string]interface{}, error)
ToLoadBalancerActionRebootMap builds a request body from RebootOpts.
type RebootResult ¶
RebootResult represents the result of a reboot operation. Call its ExtractErr method to determine if the request succeeded or failed.
func Reboot ¶
func Reboot(c *eclcloud.ServiceClient, id string, opts RebootOpts) (r RebootResult)
Reboot accepts a RebootOpts struct and reboots an existing Load Balancer using the values provided.
type ResetPasswordOpts ¶
type ResetPasswordOpts struct { // should syslog record acl info Username string `json:"username" required:"true"` }
ResetPasswordOpts represents the attributes used when resetting password of load_balancer instance.
func (ResetPasswordOpts) ToLoadBalancerActionResetPasswordMap ¶
func (opts ResetPasswordOpts) ToLoadBalancerActionResetPasswordMap() (map[string]interface{}, error)
ToLoadBalancerActionResetPasswordMap builds a request body from ResetPasswordOpts.
type ResetPasswordResult ¶
type ResetPasswordResult struct {
// contains filtered or unexported fields
}
ResetPasswordResult represents the result of a Reset Password operation. Call its ExtractResetPassword method to interpret it as an action's result.
func ResetPassword ¶
func ResetPassword(c *eclcloud.ServiceClient, id string, opts ResetPasswordOpts) (r ResetPasswordResult)
ResetPassword accepts a ResetPasswordOpts struct and resets an existing Load Balancer password using the values provided.
func (ResetPasswordResult) ExtractResetPassword ¶
ExtractResetPassword is a function that accepts a result and extracts a result of reset_password.