Documentation
¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, routerID, flowLogID string) (err error)
- type CreateOpts
- type FlowLog
- type FlowLogPage
- type FlowLogResponse
- func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*FlowLogResponse, error)
- func Disable(client *golangsdk.ServiceClient, routerID, flowLogID string) (*FlowLogResponse, error)
- func Enable(client *golangsdk.ServiceClient, routerID, flowLogID string) (*FlowLogResponse, error)
- func ExtractFlowLogs(r pagination.NewPage) ([]FlowLogResponse, error)
- func Get(client *golangsdk.ServiceClient, routerID, flowLogID string) (*FlowLogResponse, error)
- func List(client *golangsdk.ServiceClient, routerID string, opts ListOpts) ([]FlowLogResponse, error)
- func Update(client *golangsdk.ServiceClient, flowLogID string, opts UpdateOpts) (*FlowLogResponse, error)
- type ListOpts
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOpts ¶
type FlowLog ¶
type FlowLog struct {
// Flow log name
Name string `json:"name" required:"true"`
// Flow log description
Description string `json:"description,omitempty"`
// Type of resource whose flow logs are collected.
// VPC attachments
// Virtual gateway attachments
ResourceType string `json:"resource_type" required:"true"`
// Resource ID
ResourceId string `json:"resource_id" required:"true"`
// Log group ID. Obtain the log group ID by referring to the Log Tank Service.
LogGroupId string `json:"log_group_id" required:"true"`
// Log stream ID. Obtain the log stream ID by referring to the Log Tank Service
LogStreamId string `json:"log_stream_id" required:"true"`
// Flow log storage type.
// LTS: Logs are stored on LTS servers.
LogStoreType string `json:"log_store_type" required:"true"`
// Flow log storage name. This parameter is not supported for now.
LogStoreName string `json:"log_store_name,omitempty"`
}
type FlowLogPage ¶
type FlowLogPage struct {
pagination.NewSinglePageBase
}
type FlowLogResponse ¶
type FlowLogResponse struct {
// Flow log ID
ID string `json:"id"`
// Flow log name
Name string `json:"name"`
// Flow log description
Description string `json:"description"`
// Project ID of the flow log task creator
ProjectId string `json:"project_id"`
// Type of resource whose flow logs are collected.
// VPC attachments
// Virtual gateway attachments
ResourceType string `json:"resource_type"`
// Resource ID
ResourceId string `json:"resource_id"`
// Log group ID. Obtain the log group ID by referring to the Log Tank Service.
LogGroupId string `json:"log_group_id"`
// Log stream ID. Obtain the log stream ID by referring to the Log Tank Service
LogStreamId string `json:"log_stream_id"`
// Flow log storage type.
// LTS: Logs are stored on LTS servers.
LogStoreType string `json:"log_store_type"`
// Flow log storage name. This parameter is not supported for now.
LogStoreName string `json:"log_store_name"`
// Log aggregation time, in seconds. The value ranges from 60 to 600.
LogAggregationInterval int `json:"log_aggregation_interval"`
// Creation time in the format YYYY-MM-DDTHH:mm:ss.sssZ
CreatedAt string `json:"created_at"`
// Update time in the format YYYY-MM-DDTHH:mm:ss.sssZ
UpdatedAt string `json:"updated_at"`
// Flow log status. Value options: pending, available, modifying, deleting, deleted, and failed
Status string `json:"state"`
// Whether to enable flow logs. The value can be true or false.
Enabled bool `json:"enabled"`
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*FlowLogResponse, error)
func Disable ¶
func Disable(client *golangsdk.ServiceClient, routerID, flowLogID string) (*FlowLogResponse, error)
func Enable ¶
func Enable(client *golangsdk.ServiceClient, routerID, flowLogID string) (*FlowLogResponse, error)
func ExtractFlowLogs ¶
func ExtractFlowLogs(r pagination.NewPage) ([]FlowLogResponse, error)
func Get ¶
func Get(client *golangsdk.ServiceClient, routerID, flowLogID string) (*FlowLogResponse, error)
func List ¶
func List(client *golangsdk.ServiceClient, routerID string, opts ListOpts) ([]FlowLogResponse, error)
func Update ¶
func Update(client *golangsdk.ServiceClient, flowLogID string, opts UpdateOpts) (*FlowLogResponse, error)
type ListOpts ¶
type ListOpts struct {
// ID of the last enterprise router on the previous page.
// If this parameter is left blank, the first page is queried.
// This parameter must be used together with limit.
Marker string `q:"marker"`
// Number of records on each page. Value range: 0 to 2000
Limit int `q:"limit"`
// Resource type
ResourceType string `q:"resource_type"`
// Attachment resource IDs
ResourceID []string `q:"resource_id"`
// Keyword for sorting. The keyword can be id, name, or state. By default, id is used.
SortKey []string `q:"sort_key"`
// Sorting order. There are two value options: asc (ascending order) and desc (descending order).
// The default value is asc.
SortDir []string `q:"sort_dir"`
}
type UpdateOpts ¶
Click to show internal directories.
Click to hide internal directories.