Documentation ¶
Overview ¶
eni.go - the eni APIs definition supported by the eni service
Index ¶
- Constants
- type AddPrivateIpResult
- type BatchAddPrivateIpResult
- type BindEniPublicIpArgs
- type Client
- func (c *Client) AddPrivateIp(args *EniPrivateIpArgs) (*AddPrivateIpResult, error)
- func (c *Client) AttachEniInstance(args *EniInstance) error
- func (c *Client) BatchAddPrivateIp(args *EniBatchPrivateIpArgs) (*BatchAddPrivateIpResult, error)
- func (c *Client) BatchAddPrivateIpCrossSubnet(args *EniBatchAddPrivateIpCrossSubnetArgs) (*BatchAddPrivateIpResult, error)
- func (c *Client) BatchDeletePrivateIp(args *EniBatchPrivateIpArgs) error
- func (c *Client) BindEniPublicIp(args *BindEniPublicIpArgs) error
- func (c *Client) CreateEni(args *CreateEniArgs) (*CreateEniResult, error)
- func (c *Client) DeleteEni(args *DeleteEniArgs) error
- func (c *Client) DeletePrivateIp(args *EniPrivateIpArgs) error
- func (c *Client) DetachEniInstance(args *EniInstance) error
- func (c *Client) GetEniDetail(eniId string) (*Eni, error)
- func (c *Client) GetEniQuota(args *EniQuoteArgs) (*EniQuoteInfo, error)
- func (c *Client) GetEniStatus(eniId string) (*EniStatusInfo, error)
- func (c *Client) ListEni(args *ListEniArgs) (*ListEniResult, error)
- func (c *Client) UnBindEniPublicIp(args *UnBindEniPublicIpArgs) error
- func (c *Client) UpdateEni(args *UpdateEniArgs) error
- func (c *Client) UpdateEniEnterpriseSecurityGroup(args *UpdateEniEnterpriseSecurityGroupArgs) error
- func (c *Client) UpdateEniSecurityGroup(args *UpdateEniSecurityGroupArgs) error
- type CreateEniArgs
- type CreateEniResult
- type DeleteEniArgs
- type Eni
- type EniBatchAddPrivateIpCrossSubnetArgs
- type EniBatchPrivateIpArgs
- type EniInstance
- type EniPrivateIpArgs
- type EniQuoteArgs
- type EniQuoteInfo
- type EniStatusInfo
- type ListEniArgs
- type ListEniResult
- type PrivateIp
- type PrivateIpArgs
- type UnBindEniPublicIpArgs
- type UpdateEniArgs
- type UpdateEniEnterpriseSecurityGroupArgs
- type UpdateEniSecurityGroupArgs
Constants ¶
const ( URI_PREFIX = bce.URI_PREFIX + "v1" DEFAULT_ENI = "bcc." + bce.DEFAULT_REGION + ".baidubce.com" REQUEST_ENI_URL = "/eni" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddPrivateIpResult ¶ added in v0.9.49
type AddPrivateIpResult struct {
PrivateIpAddress string `json:"privateIpAddress"`
}
type BatchAddPrivateIpResult ¶ added in v0.9.113
type BatchAddPrivateIpResult struct {
PrivateIpAddresses []string `json:"privateIpAddresses"`
}
type BindEniPublicIpArgs ¶
type Client ¶
Client of ENI service is a kind of BceClient, so derived from BceClient
func (*Client) AddPrivateIp ¶ added in v0.9.49
func (c *Client) AddPrivateIp(args *EniPrivateIpArgs) (*AddPrivateIpResult, error)
AddPrivateIp - add private ip
PARAMS:
- args: the arguments to add private ip
RETURNS:
- *AddPrivateIpResult: the private ip
- error: nil if success otherwise the specific error
func (*Client) AttachEniInstance ¶
func (c *Client) AttachEniInstance(args *EniInstance) error
AttachEniInstance - eni attach instance
PARAMS:
- args: the arguments to attach instance
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) BatchAddPrivateIp ¶ added in v0.9.113
func (c *Client) BatchAddPrivateIp(args *EniBatchPrivateIpArgs) (*BatchAddPrivateIpResult, error)
BatchAddPrivateIp - batch add private ips
PARAMS:
- args: the arguments to batch add private ips, property PrivateIpAddresses or PrivateIpAddressCount is required; when PrivateIpAddressCount is set, private ips will be auto allocated, and if you want assign private ips, please just set PrivateIpAddresses;
RETURNS:
- *BatchAddPrivateIpResult: the private ips
- error: nil if success otherwise the specific error
func (*Client) BatchAddPrivateIpCrossSubnet ¶ added in v0.9.113
func (c *Client) BatchAddPrivateIpCrossSubnet(args *EniBatchAddPrivateIpCrossSubnetArgs) (*BatchAddPrivateIpResult, error)
BatchAddPrivateIpCrossSubnet - batch add private ips that support cross subnet, white list function
PARAMS:
- args: the arguments to batch add private ips, property PrivateIps or PrivateIpAddressCount is required; when PrivateIpAddressCount is set, private ips in subnet assigned by 'SubnetId' property will be auto allocated; if you want assign private ips, please just set PrivateIps, and you can also assgin subnet with property 'PrivateIpArgs.SubnetId';
RETURNS:
- *BatchAddPrivateIpResult: the private ips
- error: nil if success otherwise the specific error
func (*Client) BatchDeletePrivateIp ¶ added in v0.9.113
func (c *Client) BatchDeletePrivateIp(args *EniBatchPrivateIpArgs) error
BatchDeletePrivateIp - batch delete private ip
PARAMS:
- args: the arguments to batch delete private ipa
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) BindEniPublicIp ¶
func (c *Client) BindEniPublicIp(args *BindEniPublicIpArgs) error
BindEniPublicIp - eni bind public ip
PARAMS:
- args: the arguments to bind public ip
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CreateEni ¶
func (c *Client) CreateEni(args *CreateEniArgs) (*CreateEniResult, error)
CreateEni - create an eni with the specific parameters
PARAMS:
- args: the arguments to create an eni
RETURNS:
- *CreateEniResult: the result of create eni
- error: nil if success otherwise the specific error
func (*Client) DeleteEni ¶
func (c *Client) DeleteEni(args *DeleteEniArgs) error
DeleteEni - delete an eni
PARAMS:
- DeleteEniArgs: the arguments to delete an eni
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeletePrivateIp ¶ added in v0.9.49
func (c *Client) DeletePrivateIp(args *EniPrivateIpArgs) error
DeletePrivateIp - delete private ip
PARAMS:
- args: the arguments to delete private ip
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DetachEniInstance ¶
func (c *Client) DetachEniInstance(args *EniInstance) error
DetachEniInstance - eni detach instance
PARAMS:
- args: the arguments to detach instance
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetEniDetail ¶
GetEniDetail - get the eni detail
PARAMS:
- eniId: the specific eniId
RETURNS:
- *Eni: the eni
- error: nil if success otherwise the specific error
func (*Client) GetEniQuota ¶ added in v0.9.95
func (c *Client) GetEniQuota(args *EniQuoteArgs) (*EniQuoteInfo, error)
func (*Client) GetEniStatus ¶ added in v0.9.162
func (c *Client) GetEniStatus(eniId string) (*EniStatusInfo, error)
GetEniStatus - get an eni status
PARAMS:
- eniId: the arguments to get an eni status
RETURNS:
- *EniStatusInfo: the result of get an eni status
- error: nil if success otherwise the specific error
func (*Client) ListEni ¶
func (c *Client) ListEni(args *ListEniArgs) (*ListEniResult, error)
ListEnis - list all eni with the specific parameters
PARAMS:
- args: the arguments to list all eni
RETURNS:
- *ListEniResult: the result of list all eni
- error: nil if success otherwise the specific error
func (*Client) UnBindEniPublicIp ¶
func (c *Client) UnBindEniPublicIp(args *UnBindEniPublicIpArgs) error
UnBindEniPublicIp - eni unbind public ip
PARAMS:
- args: the arguments to unbind public ip
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateEni ¶
func (c *Client) UpdateEni(args *UpdateEniArgs) error
UpdateEni - update an eni
PARAMS:
- UpdateEniArgs: the arguments to update an eni
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateEniEnterpriseSecurityGroup ¶ added in v0.9.117
func (c *Client) UpdateEniEnterpriseSecurityGroup(args *UpdateEniEnterpriseSecurityGroupArgs) error
UpdateEniEnterpriseSecurityGroup - update eni enterprise security group
PARAMS:
- args: the arguments to update eni enterprise security group
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateEniSecurityGroup ¶
func (c *Client) UpdateEniSecurityGroup(args *UpdateEniSecurityGroupArgs) error
UpdateEniSecurityGroup - update eni sg
PARAMS:
- args: the arguments to update eni sg
RETURNS:
- error: nil if success otherwise the specific error
type CreateEniArgs ¶
type CreateEniArgs struct { ClientToken string `json:"-"` Name string `json:"name"` SubnetId string `json:"subnetId"` InstanceId string `json:"instanceId,omitempty"` SecurityGroupIds []string `json:"securityGroupIds"` EnterpriseSecurityGroupIds []string `json:"enterpriseSecurityGroupIds"` PrivateIpSet []PrivateIp `json:"privateIpSet"` Ipv6PrivateIpSet []PrivateIp `json:"ipv6PrivateIpSet,omitempty"` Description string `json:"description,omitempty"` Tags []model.TagModel `json:"tags,omitempty"` }
type CreateEniResult ¶
type CreateEniResult struct {
EniId string `json:"eniId"`
}
type DeleteEniArgs ¶
type Eni ¶
type Eni struct { EniId string `json:"eniId"` Name string `json:"name"` ZoneName string `json:"zoneName"` Description string `json:"description"` InstanceId string `json:"instanceId"` MacAddress string `json:"macAddress"` VpcId string `json:"vpcId"` SubnetId string `json:"subnetId"` Status string `json:"status"` PrivateIpSet []PrivateIp `json:"privateIpSet"` Ipv6PrivateIpSet []PrivateIp `json:"ipv6PrivateIpSet"` SecurityGroupIds []string `json:"securityGroupIds"` EnterpriseSecurityGroupIds []string `json:"enterpriseSecurityGroupIds"` CreatedTime string `json:"createdTime"` Tags []model.TagModel `json:"tags,omitempty"` }
type EniBatchAddPrivateIpCrossSubnetArgs ¶ added in v0.9.113
type EniBatchPrivateIpArgs ¶ added in v0.9.113
type EniInstance ¶
type EniPrivateIpArgs ¶ added in v0.9.49
type EniQuoteArgs ¶ added in v0.9.95
type EniQuoteInfo ¶ added in v0.9.95
type EniStatusInfo ¶ added in v0.9.162
type EniStatusInfo struct {
Status string `json:"status"`
}