Reference documentation and code samples for the Google Cloud Network Management V1 Client class EffectiveVpcFlowLogsConfig.
A configuration to generate a response for GetEffectiveVpcFlowLogsConfig request.
Generated from protobuf message google.cloud.networkmanagement.v1.EffectiveVpcFlowLogsConfig
Namespace
Google \ Cloud \ NetworkManagement \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Unique name of the configuration. The name can have one of the following forms: - For project-level configurations: |
↳ state |
int
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
The aggregation interval for the logs. Default value is INTERVAL_5_SEC. |
↳ flow_sampling |
float
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
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
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
Export filter used to define which VPC Flow Logs should be logged. |
↳ cross_project_metadata |
int
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. |
↳ 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} |
↳ scope |
int
Specifies the scope of the config (e.g., SUBNET, NETWORK, ORGANIZATION..). |
getName
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} - For a Compute config, the name will be the path of the subnet:
projects/{project_id}/regions/{region}/subnetworks/{subnet_id}
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
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} - For a Compute config, the name will be the path of the subnet:
projects/{project_id}/regions/{region}/subnetworks/{subnet_id}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getState
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.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasState
clearState
setState
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.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAggregationInterval
The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasAggregationInterval
clearAggregationInterval
setAggregationInterval
The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getFlowSampling
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.
| Returns | |
|---|---|
| Type | Description |
float |
|
hasFlowSampling
clearFlowSampling
setFlowSampling
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.
| Parameter | |
|---|---|
| Name | Description |
var |
float
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMetadata
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.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasMetadata
clearMetadata
setMetadata
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.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMetadataFields
Custom metadata fields to include in the reported VPC flow logs.
Can only be specified if "metadata" was set to CUSTOM_METADATA.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setMetadataFields
Custom metadata fields to include in the reported VPC flow logs.
Can only be specified if "metadata" was set to CUSTOM_METADATA.
| Parameter | |
|---|---|
| Name | Description |
var |
string[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getFilterExpr
Export filter used to define which VPC Flow Logs should be logged.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasFilterExpr
clearFilterExpr
setFilterExpr
Export filter used to define which VPC Flow Logs should be logged.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCrossProjectMetadata
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.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasCrossProjectMetadata
clearCrossProjectMetadata
setCrossProjectMetadata
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.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getNetwork
Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network.
Format: projects/{project_id}/global/networks/{name}
| Returns | |
|---|---|
| Type | Description |
string |
|
hasNetwork
setNetwork
Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network.
Format: projects/{project_id}/global/networks/{name}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSubnet
Traffic will be logged from VMs within the subnetwork.
Format: projects/{project_id}/regions/{region}/subnetworks/{name}
| Returns | |
|---|---|
| Type | Description |
string |
|
hasSubnet
setSubnet
Traffic will be logged from VMs within the subnetwork.
Format: projects/{project_id}/regions/{region}/subnetworks/{name}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getInterconnectAttachment
Traffic will be logged from the Interconnect Attachment.
Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
| Returns | |
|---|---|
| Type | Description |
string |
|
hasInterconnectAttachment
setInterconnectAttachment
Traffic will be logged from the Interconnect Attachment.
Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getVpnTunnel
Traffic will be logged from the VPN Tunnel.
Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
| Returns | |
|---|---|
| Type | Description |
string |
|
hasVpnTunnel
setVpnTunnel
Traffic will be logged from the VPN Tunnel.
Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getScope
Specifies the scope of the config (e.g., SUBNET, NETWORK, ORGANIZATION..).
| Returns | |
|---|---|
| Type | Description |
int |
|
hasScope
clearScope
setScope
Specifies the scope of the config (e.g., SUBNET, NETWORK, ORGANIZATION..).
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTargetResource
| Returns | |
|---|---|
| Type | Description |
string |
|