Reference documentation and code samples for the Google Cloud Network Management V1 Client class VpcFlowLogsConfig.
A configuration to generate VPC Flow Logs.
Generated from protobuf message google.cloud.networkmanagement.v1.VpcFlowLogsConfig
Namespace
Google \ Cloud \ NetworkManagement \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. Unique name of the configuration. The name can have one of the following forms: - For project-level configurations: projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}
- For organization-level configurations: organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}
↳ description
string
Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.
↳ state
int
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.
↳ aggregation_interval
int
Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
↳ flow_sampling
float
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
int
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.
↳ metadata_fields
array
Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if "metadata" was set to CUSTOM_METADATA.
↳ filter_expr
string
Optional. Export filter used to define which VPC Flow Logs should be logged.
↳ cross_project_metadata
int
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.
↳ target_resource_state
int
Output only. Describes the state of the configured target resource for diagnostic purposes.
↳ network
string
Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/global/networks/{name}
↳ subnet
string
Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/regions/{region}/subnetworks/{name}
↳ interconnect_attachment
string
Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
↳ vpn_tunnel
string
Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
↳ labels
array| Google\Protobuf\Internal\MapField
Optional. Resource labels to represent user-provided metadata.
↳ create_time
↳ update_time
getName
Identifier. Unique name of the configuration. The name can have one of the following forms:
- For project-level configurations:
projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id} - For organization-level configurations:
organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}
string
setName
Identifier. Unique name of the configuration. The name can have one of the following forms:
- For project-level configurations:
projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id} - For organization-level configurations:
organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}
var
string
$this
getDescription
Optional. The user-supplied description of the VPC Flow Logs configuration.
Maximum of 512 characters.
string
hasDescription
clearDescription
setDescription
Optional. The user-supplied description of the VPC Flow Logs configuration.
Maximum of 512 characters.
var
string
$this
getState
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.
int
hasState
clearState
setState
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.
var
int
$this
getAggregationInterval
Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
int
hasAggregationInterval
clearAggregationInterval
setAggregationInterval
Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
var
int
$this
getFlowSampling
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.
float
hasFlowSampling
clearFlowSampling
setFlowSampling
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.
var
float
$this
getMetadata
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.
int
hasMetadata
clearMetadata
setMetadata
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.
var
int
$this
getMetadataFields
Optional. Custom metadata fields to include in the reported VPC flow logs.
Can only be specified if "metadata" was set to CUSTOM_METADATA.
setMetadataFields
Optional. Custom metadata fields to include in the reported VPC flow logs.
Can only be specified if "metadata" was set to CUSTOM_METADATA.
var
string[]
$this
getFilterExpr
Optional. Export filter used to define which VPC Flow Logs should be logged.
string
hasFilterExpr
clearFilterExpr
setFilterExpr
Optional. Export filter used to define which VPC Flow Logs should be logged.
var
string
$this
getCrossProjectMetadata
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.
int
hasCrossProjectMetadata
clearCrossProjectMetadata
setCrossProjectMetadata
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.
var
int
$this
getTargetResourceState
Output only. Describes the state of the configured target resource for diagnostic purposes.
int
hasTargetResourceState
clearTargetResourceState
setTargetResourceState
Output only. Describes the state of the configured target resource for diagnostic purposes.
var
int
$this
getNetwork
Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network.
Format: projects/{project_id}/global/networks/{name}
string
hasNetwork
setNetwork
Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network.
Format: projects/{project_id}/global/networks/{name}
var
string
$this
getSubnet
Traffic will be logged from VMs within the subnetwork.
Format: projects/{project_id}/regions/{region}/subnetworks/{name}
string
hasSubnet
setSubnet
Traffic will be logged from VMs within the subnetwork.
Format: projects/{project_id}/regions/{region}/subnetworks/{name}
var
string
$this
getInterconnectAttachment
Traffic will be logged from the Interconnect Attachment.
Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
string
hasInterconnectAttachment
setInterconnectAttachment
Traffic will be logged from the Interconnect Attachment.
Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
var
string
$this
getVpnTunnel
Traffic will be logged from the VPN Tunnel.
Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
string
hasVpnTunnel
setVpnTunnel
Traffic will be logged from the VPN Tunnel.
Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
var
string
$this
getLabels
Optional. Resource labels to represent user-provided metadata.
setLabels
Optional. Resource labels to represent user-provided metadata.
$this
getCreateTime
Output only. The time the config was created.
hasCreateTime
clearCreateTime
setCreateTime
Output only. The time the config was created.
$this
getUpdateTime
Output only. The time the config was updated.
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The time the config was updated.
$this
getTargetResource
string

