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. The name can have one of the following forms:
|
metadataFields[] |
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 |
createTime |
Output only. The time the config was created. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. The time the config was updated. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. 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. Setting state=DISABLED will pause the log generation for this config. |
aggregationInterval |
Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC. |
flowSampling |
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. |
filterExpr |
Optional. Export filter used to define which VPC Flow Logs should be logged. |
crossProjectMetadata |
Optional. Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED. |
targetResourceState |
Output only. 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. This field is not supported for organization level configurations. target_resource can be only one of the following: |
|
network |
Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{projectId}/global/networks/{name} |
subnet |
Traffic will be logged from VMs within the subnetwork. Format: projects/{projectId}/regions/{region}/subnetworks/{name} |
interconnectAttachment |
Traffic will be logged from the Interconnect Attachment. Format: projects/{projectId}/regions/{region}/interconnectAttachments/{name} |
vpnTunnel |
Traffic will be logged from the VPN Tunnel. Format: projects/{projectId}/regions/{region}/vpnTunnels/{name} |
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 . |
|
QueryOrgVpcFlowLogsConfigs returns a list of all organization-level VPC Flow Logs configurations applicable to the specified project. |