Resource: VpcFlowLogsConfig
A configuration to generate VPC Flow Logs.
JSON representation |
---|
{ "name": string, "metadataFields": [ string ], "labels": { string: string, ... }, "createTime": string, "updateTime": string, "description": string, "state": enum ( |
Fields | |
---|---|
name |
Identifier. Unique name of the configuration using the form: |
metadata |
Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if "metadata" was set to CUSTOM_METADATA. |
labels |
Optional. Resource labels to represent user-provided metadata. An object containing a list of |
create |
Output only. The time the config was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
update |
Output only. The time the config was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
description |
Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters. |
state |
Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. |
aggregation |
Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC. |
flow |
Optional. The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0. |
metadata |
Optional. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA. |
filter |
Optional. Export filter used to define which VPC Flow Logs should be logged. |
target |
Output only. A diagnostic bit - describes the state of the configured target resource for diagnostic purposes. |
Union field target_resource . Reference to the resource of the config scope. That is, the scope from which traffic is logged. The target resource must belong to the same project as the configuration. target_resource can be only one of the following: |
|
interconnect |
Traffic will be logged from the Interconnect Attachment. Format: projects/{projectId}/regions/{region}/interconnectAttachments/{name} |
vpn |
Traffic will be logged from the VPN Tunnel. Format: projects/{projectId}/regions/{region}/vpnTunnels/{name} |
State
Determines whether this configuration will be generating logs. Setting state=DISABLED will pause the log generation for this config.
Enums | |
---|---|
STATE_UNSPECIFIED |
If not specified, will default to ENABLED. |
ENABLED |
When ENABLED, this configuration will generate logs. |
DISABLED |
When DISABLED, this configuration will not generate logs. |
AggregationInterval
Toggles the aggregation interval for collecting flow logs by 5-tuple.
Enums | |
---|---|
AGGREGATION_INTERVAL_UNSPECIFIED |
If not specified, will default to INTERVAL_5_SEC. |
INTERVAL_5_SEC |
Aggregate logs in 5s intervals. |
INTERVAL_30_SEC |
Aggregate logs in 30s intervals. |
INTERVAL_1_MIN |
Aggregate logs in 1m intervals. |
INTERVAL_5_MIN |
Aggregate logs in 5m intervals. |
INTERVAL_10_MIN |
Aggregate logs in 10m intervals. |
INTERVAL_15_MIN |
Aggregate logs in 15m intervals. |
Metadata
Configures which log fields would be included.
Enums | |
---|---|
METADATA_UNSPECIFIED |
If not specified, will default to INCLUDE_ALL_METADATA. |
INCLUDE_ALL_METADATA |
Include all metadata fields. |
EXCLUDE_ALL_METADATA |
Exclude all metadata fields. |
CUSTOM_METADATA |
Include only custom fields (specified in metadataFields). |
TargetResourceState
Optional states of the target resource that are used as part of the diagnostic bit.
Enums | |
---|---|
TARGET_RESOURCE_STATE_UNSPECIFIED |
Unspecified target resource state. |
TARGET_RESOURCE_EXISTS |
Indicates that the target resource exists. |
TARGET_RESOURCE_DOES_NOT_EXIST |
Indicates that the target resource does not exist. |
Methods |
|
---|---|
|
Creates a new VpcFlowLogsConfig . |
|
Deletes a specific VpcFlowLogsConfig . |
|
Gets the details of a specific VpcFlowLogsConfig . |
|
Lists all VpcFlowLogsConfigs in a given project. |
|
Updates an existing VpcFlowLogsConfig . |