Class: Google::Apis::NetworkmanagementV1::VpcFlowLogsConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/networkmanagement_v1/classes.rb,
lib/google/apis/networkmanagement_v1/representations.rb,
lib/google/apis/networkmanagement_v1/representations.rb

Overview

A configuration to generate VPC Flow Logs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VpcFlowLogsConfig

Returns a new instance of VpcFlowLogsConfig.



3655
3656
3657
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3655

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#aggregation_intervalString

Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC. Corresponds to the JSON property aggregationInterval

Returns:

  • (String)


3554
3555
3556
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3554

def aggregation_interval
  @aggregation_interval
end

#create_timeString

Output only. The time the config was created. Corresponds to the JSON property createTime

Returns:

  • (String)


3559
3560
3561
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3559

def create_time
  @create_time
end

#cross_project_metadataString

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. Corresponds to the JSON property crossProjectMetadata

Returns:

  • (String)


3566
3567
3568
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3566

def 
  @cross_project_metadata
end

#descriptionString

Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters. Corresponds to the JSON property description

Returns:

  • (String)


3572
3573
3574
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3572

def description
  @description
end

#filter_exprString

Optional. Export filter used to define which VPC Flow Logs should be logged. Corresponds to the JSON property filterExpr

Returns:

  • (String)


3577
3578
3579
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3577

def filter_expr
  @filter_expr
end

#flow_samplingFloat

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. Corresponds to the JSON property flowSampling

Returns:

  • (Float)


3585
3586
3587
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3585

def flow_sampling
  @flow_sampling
end

#interconnect_attachmentString

Traffic will be logged from the Interconnect Attachment. Format: projects/ project_id/regions/region/interconnectAttachments/name Corresponds to the JSON property interconnectAttachment

Returns:

  • (String)


3591
3592
3593
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3591

def interconnect_attachment
  @interconnect_attachment
end

#labelsHash<String,String>

Optional. Resource labels to represent user-provided metadata. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


3596
3597
3598
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3596

def labels
  @labels
end

#metadataString

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. Corresponds to the JSON property metadata

Returns:

  • (String)


3602
3603
3604
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3602

def 
  @metadata
end

#metadata_fieldsArray<String>

Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if "metadata" was set to CUSTOM_METADATA. Corresponds to the JSON property metadataFields

Returns:

  • (Array<String>)


3608
3609
3610
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3608

def 
  @metadata_fields
end

#nameString

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 Corresponds to the JSON property name

Returns:

  • (String)


3617
3618
3619
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3617

def name
  @name
end

#networkString

Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/project_id/global/networks/name Corresponds to the JSON property network

Returns:

  • (String)


3623
3624
3625
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3623

def network
  @network
end

#stateString

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. Corresponds to the JSON property state

Returns:

  • (String)


3630
3631
3632
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3630

def state
  @state
end

#subnetString

Traffic will be logged from VMs within the subnetwork. Format: projects/ project_id/regions/region/subnetworks/name Corresponds to the JSON property subnet

Returns:

  • (String)


3636
3637
3638
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3636

def subnet
  @subnet
end

#target_resource_stateString

Output only. Describes the state of the configured target resource for diagnostic purposes. Corresponds to the JSON property targetResourceState

Returns:

  • (String)


3642
3643
3644
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3642

def target_resource_state
  @target_resource_state
end

#update_timeString

Output only. The time the config was updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


3647
3648
3649
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3647

def update_time
  @update_time
end

#vpn_tunnelString

Traffic will be logged from the VPN Tunnel. Format: projects/project_id/ regions/region/vpnTunnels/name Corresponds to the JSON property vpnTunnel

Returns:

  • (String)


3653
3654
3655
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3653

def vpn_tunnel
  @vpn_tunnel
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 3660

def update!(**args)
  @aggregation_interval = args[:aggregation_interval] if args.key?(:aggregation_interval)
  @create_time = args[:create_time] if args.key?(:create_time)
  @cross_project_metadata = args[:cross_project_metadata] if args.key?(:cross_project_metadata)
  @description = args[:description] if args.key?(:description)
  @filter_expr = args[:filter_expr] if args.key?(:filter_expr)
  @flow_sampling = args[:flow_sampling] if args.key?(:flow_sampling)
  @interconnect_attachment = args[:interconnect_attachment] if args.key?(:interconnect_attachment)
  @labels = args[:labels] if args.key?(:labels)
  @metadata = args[:metadata] if args.key?(:metadata)
  @metadata_fields = args[:metadata_fields] if args.key?(:metadata_fields)
  @name = args[:name] if args.key?(:name)
  @network = args[:network] if args.key?(:network)
  @state = args[:state] if args.key?(:state)
  @subnet = args[:subnet] if args.key?(:subnet)
  @target_resource_state = args[:target_resource_state] if args.key?(:target_resource_state)
  @update_time = args[:update_time] if args.key?(:update_time)
  @vpn_tunnel = args[:vpn_tunnel] if args.key?(:vpn_tunnel)
end