Google Cloud Network Management V1 Client - Class VpcFlowLogsConfig (2.7.0)

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 \ V1

Methods

__construct

Constructor.

Parameters
Name Description
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 Google\Protobuf\Timestamp

Output only. The time the config was created.

↳ update_time Google\Protobuf\Timestamp

Output only. The time the config was updated.

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}
Returns
Type Description
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}
Parameter
Name Description
var string
Returns
Type Description
$this

getDescription

Optional. The user-supplied description of the VPC Flow Logs configuration.

Maximum of 512 characters.

Returns
Type Description
string

hasDescription

clearDescription

setDescription

Optional. The user-supplied description of the VPC Flow Logs configuration.

Maximum of 512 characters.

Parameter
Name Description
var string
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var int
Returns
Type Description
$this

getAggregationInterval

Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.

Returns
Type Description
int

hasAggregationInterval

clearAggregationInterval

setAggregationInterval

Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.

Parameter
Name Description
var int
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var float
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var int
Returns
Type Description
$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.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setMetadataFields

Optional. 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

Optional. Export filter used to define which VPC Flow Logs should be logged.

Returns
Type Description
string

hasFilterExpr

clearFilterExpr

setFilterExpr

Optional. Export filter used to define which VPC Flow Logs should be logged.

Parameter
Name Description
var string
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var int
Returns
Type Description
$this

getTargetResourceState

Output only. Describes the state of the configured target resource for diagnostic purposes.

Returns
Type Description
int

hasTargetResourceState

clearTargetResourceState

setTargetResourceState

Output only. Describes the state of the configured target resource for diagnostic purposes.

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

getLabels

Optional. Resource labels to represent user-provided metadata.

Returns
Type Description
Google\Protobuf\Internal\MapField

setLabels

Optional. Resource labels to represent user-provided metadata.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getCreateTime

Output only. The time the config was created.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time the config was created.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. The time the config was updated.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The time the config was updated.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getTargetResource

Returns
Type Description
string