public sealed class VpcFlowLogsConfig : IMessage<VpcFlowLogsConfig>, IEquatable<VpcFlowLogsConfig>, IDeepCloneable<VpcFlowLogsConfig>, IBufferMessage, IMessage
Reference documentation and code samples for the Network Management v1 API class VpcFlowLogsConfig.
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.
public VpcFlowLogsConfig.Types.Metadata Metadata { get; set; }
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eVpcFlowLogsConfig\u003c/code\u003e API is 2.13.0, with previous versions ranging from 2.12.0 down to 1.0.0, each providing specific functionalities.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eVpcFlowLogsConfig\u003c/code\u003e is a class used to configure VPC Flow Logs within the Network Management v1 API, allowing the generation and management of flow logs.\u003c/p\u003e\n"],["\u003cp\u003eThis class offers several properties such as \u003ccode\u003eAggregationInterval\u003c/code\u003e, \u003ccode\u003eDescription\u003c/code\u003e, \u003ccode\u003eFilterExpr\u003c/code\u003e, and \u003ccode\u003eFlowSampling\u003c/code\u003e, to customize log configurations and includes methods to manage which metadata is included in logs.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eVpcFlowLogsConfig\u003c/code\u003e class can be applied to both \u003ccode\u003eInterconnectAttachment\u003c/code\u003e or \u003ccode\u003eVpnTunnel\u003c/code\u003e traffic, specified by the corresponding properties.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eState\u003c/code\u003e property manages the operational status of the VPC Flow Log configuration, while the \u003ccode\u003eTargetResourceState\u003c/code\u003e provides a diagnostic view of the configured resource's condition.\u003c/p\u003e\n"]]],[],null,["# Network Management v1 API - Class VpcFlowLogsConfig (2.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.15.0 (latest)](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/latest/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.14.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.13.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.12.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.11.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.10.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.9.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.8.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.7.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.6.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.5.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.4.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.3.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.2.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.1.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/2.0.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/1.1.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/1.0.0/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig) \n\n public sealed class VpcFlowLogsConfig : IMessage\u003cVpcFlowLogsConfig\u003e, IEquatable\u003cVpcFlowLogsConfig\u003e, IDeepCloneable\u003cVpcFlowLogsConfig\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Network Management v1 API class VpcFlowLogsConfig.\n\nA configuration to generate VPC Flow Logs. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e VpcFlowLogsConfig \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[VpcFlowLogsConfig](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/latest/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[VpcFlowLogsConfig](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/latest/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[VpcFlowLogsConfig](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/latest/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.NetworkManagement.V1](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/latest/Google.Cloud.NetworkManagement.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.NetworkManagement.V1.dll\n\nConstructors\n------------\n\n### VpcFlowLogsConfig()\n\n public VpcFlowLogsConfig()\n\n### VpcFlowLogsConfig(VpcFlowLogsConfig)\n\n public VpcFlowLogsConfig(VpcFlowLogsConfig other)\n\nProperties\n----------\n\n### AggregationInterval\n\n public VpcFlowLogsConfig.Types.AggregationInterval AggregationInterval { get; set; }\n\nOptional. The aggregation interval for the logs. Default value is\nINTERVAL_5_SEC.\n\n### CreateTime\n\n public Timestamp CreateTime { get; set; }\n\nOutput only. The time the config was created.\n\n### Description\n\n public string Description { get; set; }\n\nOptional. The user-supplied description of the VPC Flow Logs configuration.\nMaximum of 512 characters.\n\n### FilterExpr\n\n public string FilterExpr { get; set; }\n\nOptional. Export filter used to define which VPC Flow Logs should be\nlogged.\n\n### FlowSampling\n\n public float FlowSampling { get; set; }\n\nOptional. The value of the field must be in (0, 1\\]. The sampling rate of\nVPC Flow Logs where 1.0 means all collected logs are reported. Setting the\nsampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs,\nuse the state field instead. Default value is 1.0.\n\n### HasAggregationInterval\n\n public bool HasAggregationInterval { get; }\n\nGets whether the \"aggregation_interval\" field is set\n\n### HasDescription\n\n public bool HasDescription { get; }\n\nGets whether the \"description\" field is set\n\n### HasFilterExpr\n\n public bool HasFilterExpr { get; }\n\nGets whether the \"filter_expr\" field is set\n\n### HasFlowSampling\n\n public bool HasFlowSampling { get; }\n\nGets whether the \"flow_sampling\" field is set\n\n### HasInterconnectAttachment\n\n public bool HasInterconnectAttachment { get; }\n\nGets whether the \"interconnect_attachment\" field is set\n\n### HasMetadata\n\n public bool HasMetadata { get; }\n\nGets whether the \"metadata\" field is set\n\n### HasState\n\n public bool HasState { get; }\n\nGets whether the \"state\" field is set\n\n### HasTargetResourceState\n\n public bool HasTargetResourceState { get; }\n\nGets whether the \"target_resource_state\" field is set\n\n### HasVpnTunnel\n\n public bool HasVpnTunnel { get; }\n\nGets whether the \"vpn_tunnel\" field is set\n\n### InterconnectAttachment\n\n public string InterconnectAttachment { get; set; }\n\nTraffic will be logged from the Interconnect Attachment.\nFormat:\nprojects/{project_id}/regions/{region}/interconnectAttachments/{name}\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nOptional. Resource labels to represent user-provided metadata.\n\n### Metadata\n\n public VpcFlowLogsConfig.Types.Metadata Metadata { get; set; }\n\nOptional. Configures whether all, none or a subset of metadata fields\nshould be added to the reported VPC flow logs. Default value is\nINCLUDE_ALL_METADATA.\n\n### MetadataFields\n\n public RepeatedField\u003cstring\u003e MetadataFields { get; }\n\nOptional. Custom metadata fields to include in the reported VPC flow logs.\nCan only be specified if \"metadata\" was set to CUSTOM_METADATA.\n\n### Name\n\n public string Name { get; set; }\n\nIdentifier. Unique name of the configuration using the form:\n`projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}`\n\n### State\n\n public VpcFlowLogsConfig.Types.State State { get; set; }\n\nOptional. The state of the VPC Flow Log configuration. Default value is\nENABLED. When creating a new configuration, it must be enabled.\n\n### TargetResourceCase\n\n public VpcFlowLogsConfig.TargetResourceOneofCase TargetResourceCase { get; }\n\n### TargetResourceState\n\n public VpcFlowLogsConfig.Types.TargetResourceState TargetResourceState { get; set; }\n\nOutput only. A diagnostic bit - describes the state of the configured\ntarget resource for diagnostic purposes.\n\n### UpdateTime\n\n public Timestamp UpdateTime { get; set; }\n\nOutput only. The time the config was updated.\n\n### VpcFlowLogsConfigName\n\n public VpcFlowLogsConfigName VpcFlowLogsConfigName { get; set; }\n\n[VpcFlowLogsConfigName](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/latest/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfigName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.NetworkManagement.V1/latest/Google.Cloud.NetworkManagement.V1.VpcFlowLogsConfig#Google_Cloud_NetworkManagement_V1_VpcFlowLogsConfig_Name) resource name property.\n\n### VpnTunnel\n\n public string VpnTunnel { get; set; }\n\nTraffic will be logged from the VPN Tunnel.\nFormat: projects/{project_id}/regions/{region}/vpnTunnels/{name}"]]