Class: Google::Apis::NetworkmanagementV1::VpcFlowLogsConfig
- Inherits:
-
Object
- Object
- Google::Apis::NetworkmanagementV1::VpcFlowLogsConfig
- 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
-
#aggregation_interval ⇒ String
Optional.
-
#create_time ⇒ String
Output only.
-
#cross_project_metadata ⇒ String
Optional.
-
#description ⇒ String
Optional.
-
#filter_expr ⇒ String
Optional.
-
#flow_sampling ⇒ Float
Optional.
-
#interconnect_attachment ⇒ String
Traffic will be logged from the Interconnect Attachment.
-
#labels ⇒ Hash<String,String>
Optional.
-
#metadata ⇒ String
Optional.
-
#metadata_fields ⇒ Array<String>
Optional.
-
#name ⇒ String
Identifier.
-
#network ⇒ String
Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network.
-
#state ⇒ String
Optional.
-
#subnet ⇒ String
Traffic will be logged from VMs within the subnetwork.
-
#target_resource_state ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
-
#vpn_tunnel ⇒ String
Traffic will be logged from the VPN Tunnel.
Instance Method Summary collapse
-
#initialize(**args) ⇒ VpcFlowLogsConfig
constructor
A new instance of VpcFlowLogsConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ VpcFlowLogsConfig
Returns a new instance of VpcFlowLogsConfig.
4603 4604 4605 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4603 def initialize(**args) update!(**args) end |
Instance Attribute Details
#aggregation_interval ⇒ String
Optional. The aggregation interval for the logs. Default value is
INTERVAL_5_SEC.
Corresponds to the JSON property aggregationInterval
4502 4503 4504 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4502 def aggregation_interval @aggregation_interval end |
#create_time ⇒ String
Output only. The time the config was created.
Corresponds to the JSON property createTime
4507 4508 4509 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4507 def create_time @create_time end |
#cross_project_metadata ⇒ String
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
4514 4515 4516 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4514 def @cross_project_metadata end |
#description ⇒ String
Optional. The user-supplied description of the VPC Flow Logs configuration.
Maximum of 512 characters.
Corresponds to the JSON property description
4520 4521 4522 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4520 def description @description end |
#filter_expr ⇒ String
Optional. Export filter used to define which VPC Flow Logs should be logged.
Corresponds to the JSON property filterExpr
4525 4526 4527 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4525 def filter_expr @filter_expr end |
#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.
Corresponds to the JSON property flowSampling
4533 4534 4535 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4533 def flow_sampling @flow_sampling end |
#interconnect_attachment ⇒ String
Traffic will be logged from the Interconnect Attachment. Format: projects/
project_id/regions/region/interconnectAttachments/name
Corresponds to the JSON property interconnectAttachment
4539 4540 4541 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4539 def @interconnect_attachment end |
#labels ⇒ Hash<String,String>
Optional. Resource labels to represent user-provided metadata.
Corresponds to the JSON property labels
4544 4545 4546 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4544 def labels @labels end |
#metadata ⇒ String
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
4550 4551 4552 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4550 def @metadata end |
#metadata_fields ⇒ Array<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
4556 4557 4558 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4556 def @metadata_fields end |
#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
Corresponds to the JSON property name
4565 4566 4567 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4565 def name @name end |
#network ⇒ String
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
4571 4572 4573 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4571 def network @network end |
#state ⇒ String
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
4578 4579 4580 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4578 def state @state end |
#subnet ⇒ String
Traffic will be logged from VMs within the subnetwork. Format: projects/
project_id/regions/region/subnetworks/name
Corresponds to the JSON property subnet
4584 4585 4586 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4584 def subnet @subnet end |
#target_resource_state ⇒ String
Output only. Describes the state of the configured target resource for
diagnostic purposes.
Corresponds to the JSON property targetResourceState
4590 4591 4592 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4590 def target_resource_state @target_resource_state end |
#update_time ⇒ String
Output only. The time the config was updated.
Corresponds to the JSON property updateTime
4595 4596 4597 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4595 def update_time @update_time end |
#vpn_tunnel ⇒ String
Traffic will be logged from the VPN Tunnel. Format: projects/project_id/
regions/region/vpnTunnels/name
Corresponds to the JSON property vpnTunnel
4601 4602 4603 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4601 def vpn_tunnel @vpn_tunnel end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 |
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 4608 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 |