Documentation ¶
Index ¶
- func CreateURL(c *golangsdk.ServiceClient) string
- func DeleteURL(c *golangsdk.ServiceClient, id string) string
- func GetURL(c *golangsdk.ServiceClient, id string) string
- func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func UpdateURL(c *golangsdk.ServiceClient, id string) string
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type FlowLog
- type FlowLogPage
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of VPC flow logs. It accepts a ListOpts struct, which allows you to filter
and sort the returned collection for greater efficiency.
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Specifies the VPC flow log name. The value is a string of no more than 64 // characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.). Name string `json:"name,omitempty"` // Provides supplementary information about the VPC flow log. // The value is a string of no more than 255 characters and cannot contain angle brackets (< or >). Description string `json:"description,omitempty"` // Specifies the type of resource on which to create the VPC flow log. // The value can be Port, VPC, and Network. ResourceType string `json:"resource_type" required:"true"` // Specifies the unique resource ID. ResourceID string `json:"resource_id" required:"true"` // Specifies the type of traffic to log. The value can be all, accept and reject. TrafficType string `json:"traffic_type" required:"true"` // Specifies the log group ID. LogGroupID string `json:"log_group_id" required:"true"` // Specifies the log topic ID. LogTopicID string `json:"log_topic_id" required:"true"` }
func (CreateOpts) ToCreateMap ¶
func (opts CreateOpts) ToCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*FlowLog, error)
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
func Delete ¶
func Delete(client *golangsdk.ServiceClient, flId string) (r DeleteResult)
type FlowLog ¶
type FlowLog struct { // Specifies the VPC flow log UUID. ID string `json:"id"` // Specifies the VPC flow log name. Name string `json:"name"` // Provides supplementary information about the VPC flow log. Description string `json:"description"` // Specifies the type of resource on which to create the VPC flow log. ResourceType string `json:"resource_type"` // Specifies the unique resource ID. ResourceID string `json:"resource_id"` // Specifies the type of traffic to log. TrafficType string `json:"traffic_type"` // Specifies the log group ID.. LogGroupID string `json:"log_group_id"` // Specifies the log topic ID. LogTopicID string `json:"log_topic_id"` // Specifies the VPC flow log status, the value can be ACTIVE, DOWN or ERROR. Status string `json:"status"` // Specifies the project ID. TenantID string `json:"tenant_id"` // Specifies whether to enable the VPC flow log function. AdminState bool `json:"admin_state"` // Specifies the time when the VPC flow log was created. CreatedAt string `json:"created_at"` // Specifies the time when the VPC flow log was updated. UpdatedAt string `json:"updated_at"` }
VPC flow log struct
func ExtractFlowLogs ¶
func ExtractFlowLogs(r pagination.Page) ([]FlowLog, error)
ExtractFlowLogs accepts a Page struct, specifically a FlowLogPage struct, and extracts the elements into a slice of FlowLog structs. In other words, a generic collection is mapped into a relevant slice.
type FlowLogPage ¶
type FlowLogPage struct {
pagination.LinkedPageBase
}
FlowLogPage is the page returned by a pager when traversing over a collection of flow logs.
func (FlowLogPage) IsEmpty ¶
func (r FlowLogPage) IsEmpty() (bool, error)
IsEmpty checks whether a FlowLogPage struct is empty.
func (FlowLogPage) NextPageURL ¶
func (r FlowLogPage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of flow logs has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.
type ListOpts ¶
type ListOpts struct { // Specifies the VPC flow log UUID. ID string `q:"id"` // Specifies the VPC flow log name. Name string `q:"name"` // Specifies the type of resource on which to create the VPC flow log.. ResourceType string `q:"resource_type"` // Specifies the unique resource ID. ResourceID string `q:"resource_id"` // Specifies the type of traffic to log. TrafficType string `q:"traffic_type"` // Specifies the log group ID.. LogGroupID string `q:"log_group_id"` // Specifies the log topic ID. LogTopicID string `q:"log_topic_id"` // Specifies the VPC flow log status, the value can be ACTIVE, DOWN or ERROR. Status string `q:"status"` // Specifies the number of records returned on each page. // The value ranges from 0 to intmax. Limit int `q:"limit"` // Specifies the resource ID of pagination query. // If the parameter is left blank, only resources on the first page are queried. Marker string `q:"marker"` }
ListOpts allows the filtering and sorting of paginated collections through the API. Filtering is achieved by passing in struct field values that map to the subnet attributes you want to see returned.
func (ListOpts) ToFlowLogsListQuery ¶
ToFlowLogsListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type UpdateOpts ¶
type UpdateOpts struct { // Specifies the VPC flow log name. The value is a string of no more than 64 // characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.). Name string `json:"name,omitempty"` // Provides supplementary information about the VPC flow log. // The value is a string of no more than 255 characters and cannot contain angle brackets (< or >). Description string `json:"description,omitempty"` // Specifies whether to enable the VPC flow log function. AdminState bool `json:"admin_state"` }
func (UpdateOpts) ToUpdateMap ¶
func (opts UpdateOpts) ToUpdateMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(client *golangsdk.ServiceClient, flId string, opts UpdateOptsBuilder) (r UpdateResult)
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (*FlowLog, error)