Google Cloud Network Management V1 Client - Class VpcFlowLogsConfig (2.3.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 using the form: projects/{project_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.

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

↳ target_resource_state int

Output only. A diagnostic bit - describes the state of the configured target resource for diagnostic purposes.

↳ 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 using the form: projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}

Returns
Type Description
string

setName

Identifier. Unique name of the configuration using the form: projects/{project_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.

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.

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

getTargetResourceState

Output only. A diagnostic bit - describes the state of the configured target resource for diagnostic purposes.

Returns
Type Description
int

hasTargetResourceState

clearTargetResourceState

setTargetResourceState

Output only. A diagnostic bit - describes the state of the configured target resource for diagnostic purposes.

Parameter
Name Description
var int
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