Class: Google::Apis::NetworkmanagementV1beta1::EffectiveVpcFlowLogsConfig

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

Overview

A configuration to generate a response for GetEffectiveVpcFlowLogsConfig request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EffectiveVpcFlowLogsConfig

Returns a new instance of EffectiveVpcFlowLogsConfig.



843
844
845
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 843

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

Instance Attribute Details

#aggregation_intervalString

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

Returns:

  • (String)


762
763
764
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 762

def aggregation_interval
  @aggregation_interval
end

#cross_project_metadataString

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)


769
770
771
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 769

def 
  @cross_project_metadata
end

#filter_exprString

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

Returns:

  • (String)


774
775
776
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 774

def filter_expr
  @filter_expr
end

#flow_samplingFloat

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)


782
783
784
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 782

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)


788
789
790
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 788

def interconnect_attachment
  @interconnect_attachment
end

#metadataString

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)


794
795
796
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 794

def 
  @metadata
end

#metadata_fieldsArray<String>

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>)


800
801
802
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 800

def 
  @metadata_fields
end

#nameString

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` Corresponds to the JSON propertyname`

Returns:

  • (String)


811
812
813
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 811

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)


817
818
819
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 817

def network
  @network
end

#scopeString

Specifies the scope of the config (e.g., SUBNET, NETWORK, ORGANIZATION..). Corresponds to the JSON property scope

Returns:

  • (String)


822
823
824
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 822

def scope
  @scope
end

#stateString

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)


829
830
831
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 829

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)


835
836
837
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 835

def subnet
  @subnet
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)


841
842
843
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 841

def vpn_tunnel
  @vpn_tunnel
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 848

def update!(**args)
  @aggregation_interval = args[:aggregation_interval] if args.key?(:aggregation_interval)
  @cross_project_metadata = args[:cross_project_metadata] if args.key?(:cross_project_metadata)
  @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)
  @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)
  @scope = args[:scope] if args.key?(:scope)
  @state = args[:state] if args.key?(:state)
  @subnet = args[:subnet] if args.key?(:subnet)
  @vpn_tunnel = args[:vpn_tunnel] if args.key?(:vpn_tunnel)
end