Class CfnFlowLogProps
Properties for defining a CfnFlowLog
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnFlowLogProps : Object, ICfnFlowLogProps
Syntax (vb)
Public Class CfnFlowLogProps
Inherits Object
Implements ICfnFlowLogProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-flowlog.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var destinationOptions;
var cfnFlowLogProps = new CfnFlowLogProps {
ResourceId = "resourceId",
ResourceType = "resourceType",
// the properties below are optional
DeliverCrossAccountRole = "deliverCrossAccountRole",
DeliverLogsPermissionArn = "deliverLogsPermissionArn",
DestinationOptions = destinationOptions,
LogDestination = "logDestination",
LogDestinationType = "logDestinationType",
LogFormat = "logFormat",
LogGroupName = "logGroupName",
MaxAggregationInterval = 123,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TrafficType = "trafficType"
};
Synopsis
Constructors
CfnFlowLogProps() |
Properties
DeliverCrossAccountRole | The ARN of the IAM role that allows the service to publish flow logs across accounts. |
DeliverLogsPermissionArn | The ARN of the IAM role that allows Amazon EC2 to publish flow logs to the log destination. |
DestinationOptions | The destination options. |
LogDestination | The destination for the flow log data. The meaning of this parameter depends on the destination type. |
LogDestinationType | The type of destination for the flow log data. |
LogFormat | The fields to include in the flow log record, in the order in which they should appear. |
LogGroupName | The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs. |
MaxAggregationInterval | The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. |
ResourceId | The ID of the resource to monitor. |
ResourceType | The type of resource to monitor. |
Tags | The tags to apply to the flow logs. |
TrafficType | The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). |
Constructors
CfnFlowLogProps()
public CfnFlowLogProps()
Properties
DeliverCrossAccountRole
The ARN of the IAM role that allows the service to publish flow logs across accounts.
public string DeliverCrossAccountRole { get; set; }
Property Value
System.String
Remarks
DeliverLogsPermissionArn
The ARN of the IAM role that allows Amazon EC2 to publish flow logs to the log destination.
public string DeliverLogsPermissionArn { get; set; }
Property Value
System.String
Remarks
This parameter is required if the destination type is cloud-watch-logs
, or if the destination type is kinesis-data-firehose
and the delivery stream and the resources to monitor are in different accounts.
DestinationOptions
The destination options.
public object DestinationOptions { get; set; }
Property Value
System.Object
Remarks
LogDestination
The destination for the flow log data. The meaning of this parameter depends on the destination type.
public string LogDestination { get; set; }
Property Value
System.String
Remarks
arn:aws:logs: region : account_id :log-group: my_group
Alternatively, use the LogGroupName
parameter.
arn:aws:s3::: my_bucket / my_subfolder /
The subfolder is optional. Note that you can't use AWSLogs
as a subfolder name.
arn:aws:firehose: region : account_id :deliverystream: my_stream
LogDestinationType
The type of destination for the flow log data.
public string LogDestinationType { get; set; }
Property Value
System.String
Remarks
LogFormat
The fields to include in the flow log record, in the order in which they should appear.
public string LogFormat { get; set; }
Property Value
System.String
Remarks
If you omit this parameter, the flow log is created using the default format. If you specify this parameter, you must include at least one field. For more information about the available fields, see Flow log records in the Amazon VPC User Guide or Transit Gateway Flow Log records in the AWS Transit Gateway Guide .
Specify the fields using the ${field-id}
format, separated by spaces.
LogGroupName
The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.
public string LogGroupName { get; set; }
Property Value
System.String
Remarks
This parameter is valid only if the destination type is cloud-watch-logs
.
MaxAggregationInterval
The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record.
public Nullable<double> MaxAggregationInterval { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be 60 seconds for transit gateway resource types.
When a network interface is attached to a Nitro-based instance , the aggregation interval is always 60 seconds or less, regardless of the value that you specify.
Default: 600
ResourceId
The ID of the resource to monitor.
public string ResourceId { get; set; }
Property Value
System.String
Remarks
For example, if the resource type is VPC
, specify the ID of the VPC.
ResourceType
The type of resource to monitor.
public string ResourceType { get; set; }
Property Value
System.String
Remarks
Tags
The tags to apply to the flow logs.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
TrafficType
The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic).
public string TrafficType { get; set; }
Property Value
System.String
Remarks
This parameter is not supported for transit gateway resource types. It is required for the other resource types.