Class: Google::Apis::NetworkmanagementV1beta1::VpcFlowLogsConfig

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 VPC Flow Logs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VpcFlowLogsConfig

Returns a new instance of VpcFlowLogsConfig.



2990
2991
2992
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2990

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)


2912
2913
2914
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2912

def aggregation_interval
  @aggregation_interval
end

#create_timeString

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

Returns:

  • (String)


2917
2918
2919
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2917

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


2923
2924
2925
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2923

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)


2928
2929
2930
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2928

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)


2936
2937
2938
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2936

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)


2942
2943
2944
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2942

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


2947
2948
2949
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2947

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)


2953
2954
2955
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2953

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


2959
2960
2961
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2959

def 
  @metadata_fields
end

#nameString

Identifier. Unique name of the configuration using the form: projects/ project_id/locations/global/vpcFlowLogsConfigs/vpc_flow_logs_config_id` Corresponds to the JSON propertyname`

Returns:

  • (String)


2965
2966
2967
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2965

def name
  @name
end

#stateString

Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Corresponds to the JSON property state

Returns:

  • (String)


2971
2972
2973
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2971

def state
  @state
end

#target_resource_stateString

Output only. A diagnostic bit - describes the state of the configured target resource for diagnostic purposes. Corresponds to the JSON property targetResourceState

Returns:

  • (String)


2977
2978
2979
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2977

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)


2982
2983
2984
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2982

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)


2988
2989
2990
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2988

def vpn_tunnel
  @vpn_tunnel
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
# File 'lib/google/apis/networkmanagement_v1beta1/classes.rb', line 2995

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