havip

package
v0.9.181 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URI_PREFIX = bce.URI_PREFIX + "v1"

	DEFAULT_HAVIP = "bcc." + bce.DEFAULT_REGION + ".baidubce.com"

	REQUEST_HAVIP_URL = "/havip"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bce.BceClient
}

Client of ESG service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endPoint string) (*Client, error)

func (*Client) CreateHaVip

func (c *Client) CreateHaVip(args *CreateHaVipArgs) (*CreateHavipResult, error)

CreateHaVip - create an havip with the specific parameters

PARAMS:

  • args: the arguments to create an havip

RETURNS:

  • *CreateHavipResult: the result of create havip
  • error: nil if success otherwise the specific error

func (*Client) DeleteHaVip

func (c *Client) DeleteHaVip(args *DeleteHaVipArgs) error

DeleteHaVip - delete an havip

PARAMS:

  • DeleteHaVipArgs: the arguments to delete an havip

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) GetHaVipDetail

func (c *Client) GetHaVipDetail(haVipId string) (*HaVip, error)

GetHaVipDetail - get the havip detail

PARAMS:

  • haVipId: the specific haVipId

RETURNS:

  • *HaVip: the havip
  • error: nil if success otherwise the specific error

func (*Client) HaVipAttachInstance

func (c *Client) HaVipAttachInstance(args *HaVipInstanceArgs) error

HaVipAttachInstance - havip attach instance

PARAMS:

  • args: the arguments to attach instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) HaVipBindPublicIp

func (c *Client) HaVipBindPublicIp(args *HaVipBindPublicIpArgs) error

HaVipBindPublicIp - havip bind public ip

PARAMS:

  • args: the arguments to bind public ip

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) HaVipDetachInstance

func (c *Client) HaVipDetachInstance(args *HaVipInstanceArgs) error

HaVipDetachInstance - havip detach instance

PARAMS:

  • args: the arguments to detach instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) HaVipUnbindPublicIp

func (c *Client) HaVipUnbindPublicIp(args *HaVipUnbindPublicIpArgs) error

HaVipUnbindPublicIp - havip unbind public ip

PARAMS:

  • args: the arguments to unbind public ip

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ListHaVip

func (c *Client) ListHaVip(args *ListHaVipArgs) (*ListHaVipResult, error)

ListHaVip - list all havip with the specific parameters

PARAMS:

  • args: the arguments to list all havip

RETURNS:

  • *ListHaVipResult: the result of list all havip
  • error: nil if success otherwise the specific error

func (*Client) UpdateHaVip

func (c *Client) UpdateHaVip(args *UpdateHaVipArgs) error

UpdateHaVip - update an havip

PARAMS:

  • UpdateHaVipArgs: the arguments to update an havip

RETURNS:

  • error: nil if success otherwise the specific error

type CreateHaVipArgs

type CreateHaVipArgs struct {
	ClientToken      string `json:"-"`
	SubnetId         string `json:"subnetId"`
	Name             string `json:"name"`
	PrivateIpAddress string `json:"privateIpAddress"`
	Description      string `json:"description"`
}

type CreateHavipResult

type CreateHavipResult struct {
	HaVipId string `json:"haVipId"`
}

type DeleteHaVipArgs

type DeleteHaVipArgs struct {
	HaVipId     string
	ClientToken string
}

type HaVip

type HaVip struct {
	HaVipId          string                `json:"haVipId"`
	Name             string                `json:"name"`
	Description      string                `json:"description"`
	VpcId            string                `json:"vpcId"`
	SubnetId         string                `json:"subnetId"`
	Status           string                `json:"status"`
	PrivateIpAddress string                `json:"privateIpAddress"`
	PublicIpAddress  string                `json:"publicIpAddress,omitempty"`
	BindedInstances  []HaVipBindedInstance `json:"bindedInstances,omitempty"`
	CreatedTime      string                `json:"createdTime"`
}

type HaVipBindPublicIpArgs

type HaVipBindPublicIpArgs struct {
	HaVipId         string `json:"-"`
	ClientToken     string `json:"-"`
	PublicIpAddress string `json:"publicIpAddress"`
}

type HaVipBindedInstance

type HaVipBindedInstance struct {
	InstanceId   string `json:"instanceId"`
	InstanceType string `json:"instanceType"`
	Master       bool   `json:"master"`
}

type HaVipInstanceArgs

type HaVipInstanceArgs struct {
	HaVipId      string   `json:"-"`
	InstanceIds  []string `json:"instanceIds"`
	InstanceType string   `json:"instanceType"`
	ClientToken  string   `json:"-"`
}

type HaVipUnbindPublicIpArgs

type HaVipUnbindPublicIpArgs struct {
	HaVipId     string
	ClientToken string
}

type ListHaVipArgs

type ListHaVipArgs struct {
	VpcId   string
	Marker  string
	MaxKeys int
}

type ListHaVipResult

type ListHaVipResult struct {
	HaVips      []HaVip `json:"haVips"`
	Marker      string  `json:"marker"`
	IsTruncated bool    `json:"isTruncated"`
	NextMarker  string  `json:"nextMarker"`
	MaxKeys     int     `json:"maxKeys"`
}

type UpdateHaVipArgs

type UpdateHaVipArgs struct {
	HaVipId     string `json:"-"`
	ClientToken string `json:"-"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL