Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateEsg(args *CreateEsgArgs) (*CreateEsgResult, error)
- func (c *Client) CreateEsgRules(args *CreateEsgRuleArgs) error
- func (c *Client) DeleteEsg(args *DeleteEsgArgs) error
- func (c *Client) DeleteEsgRule(args *DeleteEsgRuleArgs) error
- func (c *Client) ListEsg(args *ListEsgArgs) (*ListEsgResult, error)
- func (c *Client) UpdateEsgRule(args *UpdateEsgRuleArgs) error
- type CreateEsgArgs
- type CreateEsgResult
- type CreateEsgRuleArgs
- type DeleteEsgArgs
- type DeleteEsgRuleArgs
- type EnterpriseSecurityGroup
- type EnterpriseSecurityGroupRule
- type ListEsgArgs
- type ListEsgResult
- type UpdateEsgRuleArgs
Constants ¶
View Source
const ( URI_PREFIX = bce.URI_PREFIX + "v1" DEFAULT_ENI = "bcc." + bce.DEFAULT_REGION + ".baidubce.com" REQUEST_ENI_URL = "/enterprise/security" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client of ESG service is a kind of BceClient, so derived from BceClient
func (*Client) CreateEsg ¶
func (c *Client) CreateEsg(args *CreateEsgArgs) (*CreateEsgResult, error)
CreateEsg - create an esg with the specific parameters
PARAMS:
- args: the arguments to create an esg
RETURNS:
- *CreateEsgResult: the result of create esg
- error: nil if success otherwise the specific error
func (*Client) CreateEsgRules ¶
func (c *Client) CreateEsgRules(args *CreateEsgRuleArgs) error
CreateEsgRules - create esg rules
PARAMS:
- CreateEsgRuleArgs: the arguments to create esg rules
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteEsg ¶
func (c *Client) DeleteEsg(args *DeleteEsgArgs) error
DeleteEsg - delete an esg
PARAMS:
- DeleteEsgArgs: the arguments to delete an esg
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteEsgRule ¶
func (c *Client) DeleteEsgRule(args *DeleteEsgRuleArgs) error
DeleteEsgRule - delete an esg rule
PARAMS:
- DeleteEsgArgs: the arguments to delete an esg rule
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ListEsg ¶
func (c *Client) ListEsg(args *ListEsgArgs) (*ListEsgResult, error)
ListEsg - list all esg with the specific parameters
PARAMS:
- args: the arguments to list all esg
RETURNS:
- *ListEsgResult: the result of list all esg
- error: nil if success otherwise the specific error
func (*Client) UpdateEsgRule ¶
func (c *Client) UpdateEsgRule(args *UpdateEsgRuleArgs) error
UpdateEsgRule - update esg rule
PARAMS:
- CreateEsgRuleArgs: the arguments to update esg rule
RETURNS:
- error: nil if success otherwise the specific error
type CreateEsgArgs ¶
type CreateEsgResult ¶
type CreateEsgResult struct {
EnterpriseSecurityGroupId string `json:"enterpriseSecurityGroupId"`
}
type CreateEsgRuleArgs ¶
type CreateEsgRuleArgs struct { ClientToken string `json:"-"` EnterpriseSecurityGroupId string `json:"enterpriseSecurityGroupId"` Rules []EnterpriseSecurityGroupRule `json:"rules"` }
type DeleteEsgArgs ¶
type DeleteEsgRuleArgs ¶
type DeleteEsgRuleArgs struct {
EnterpriseSecurityGroupRuleId string
}
type EnterpriseSecurityGroup ¶
type EnterpriseSecurityGroupRule ¶
type EnterpriseSecurityGroupRule struct { EnterpriseSecurityGroupRuleId string `json:"enterpriseSecurityGroupRuleId"` Remark string `json:"remark"` Direction string `json:"direction"` Ethertype string `json:"ethertype"` PortRange string `json:"portRange"` Protocol string `json:"protocol"` SourceIp string `json:"sourceIp"` DestIp string `json:"destIp"` Action string `json:"action"` Priority int `json:"priority"` CreatedTime string `json:"createdTime"` UpdatedTime string `json:"updatedTime"` }
type ListEsgArgs ¶
type ListEsgResult ¶
type ListEsgResult struct { EnterpriseSecurityGroups []EnterpriseSecurityGroup `json:"enterpriseSecurityGroups"` Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` }
type UpdateEsgRuleArgs ¶
type UpdateEsgRuleArgs struct { ClientToken string EnterpriseSecurityGroupRuleId string `json:"-"` Remark string `json:"remark"` PortRange string `json:"portRange"` Protocol string `json:"protocol"` SourceIp string `json:"sourceIp"` DestIp string `json:"destIp"` Action string `json:"action"` Priority int `json:"priority"` }
Click to show internal directories.
Click to hide internal directories.