Class FlowLogDestinationConfig
Flow Log Destination configuration.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FlowLogDestinationConfig : IFlowLogDestinationConfig
Syntax (vb)
Public Class FlowLogDestinationConfig Implements IFlowLogDestinationConfig
Remarks
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;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.S3;
using Amazon.CDK.Interfaces.KinesisFirehose;
using Amazon.CDK.Interfaces.Logs;
Bucket bucket;
IDeliveryStreamRef deliveryStreamRef;
ILogGroupRef logGroupRef;
Role role;
var flowLogDestinationConfig = new FlowLogDestinationConfig {
LogDestinationType = FlowLogDestinationType.CLOUD_WATCH_LOGS,
// the properties below are optional
DeliveryStream = deliveryStreamRef,
DeliveryStreamArn = "deliveryStreamArn",
DestinationOptions = new DestinationOptions {
FileFormat = FlowLogFileFormat.PLAIN_TEXT,
HiveCompatiblePartitions = false,
PerHourPartition = false
},
IamRole = role,
KeyPrefix = "keyPrefix",
LogGroup = logGroupRef,
S3Bucket = bucket
};
Synopsis
Constructors
| FlowLogDestinationConfig() | Flow Log Destination configuration. |
Properties
| DeliveryStream | The Amazon Data Firehose delivery stream to publish the flow logs to. |
| DeliveryStreamArn | (deprecated) The ARN of Amazon Data Firehose delivery stream to publish the flow logs to. |
| DestinationOptions | Options for writing flow logs to a supported destination. |
| IamRole | The IAM role that allows Amazon EC2 to publish flow logs to the log destination. |
| KeyPrefix | S3 bucket key prefix to publish the flow logs to. |
| LogDestinationType | The type of destination to publish the flow logs to. |
| LogGroup | The CloudWatch Logs Log Group to publish the flow logs to. |
| S3Bucket | S3 bucket to publish the flow logs to. |
Constructors
FlowLogDestinationConfig()
Flow Log Destination configuration.
public FlowLogDestinationConfig()
Remarks
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;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.S3;
using Amazon.CDK.Interfaces.KinesisFirehose;
using Amazon.CDK.Interfaces.Logs;
Bucket bucket;
IDeliveryStreamRef deliveryStreamRef;
ILogGroupRef logGroupRef;
Role role;
var flowLogDestinationConfig = new FlowLogDestinationConfig {
LogDestinationType = FlowLogDestinationType.CLOUD_WATCH_LOGS,
// the properties below are optional
DeliveryStream = deliveryStreamRef,
DeliveryStreamArn = "deliveryStreamArn",
DestinationOptions = new DestinationOptions {
FileFormat = FlowLogFileFormat.PLAIN_TEXT,
HiveCompatiblePartitions = false,
PerHourPartition = false
},
IamRole = role,
KeyPrefix = "keyPrefix",
LogGroup = logGroupRef,
S3Bucket = bucket
};
Properties
DeliveryStream
The Amazon Data Firehose delivery stream to publish the flow logs to.
public IDeliveryStreamRef? DeliveryStream { get; set; }
Property Value
Remarks
Default: - undefined
DeliveryStreamArn
(deprecated) The ARN of Amazon Data Firehose delivery stream to publish the flow logs to.
[Obsolete("use deliveryStream")]
public string? DeliveryStreamArn { get; set; }
Property Value
Remarks
Default: - undefined
Stability: Deprecated
DestinationOptions
Options for writing flow logs to a supported destination.
public IDestinationOptions? DestinationOptions { get; set; }
Property Value
Remarks
Default: - undefined
IamRole
The IAM role that allows Amazon EC2 to publish flow logs to the log destination.
public IRole? IamRole { get; set; }
Property Value
Remarks
Required if the destination type is CloudWatch logs, or if the destination type is Amazon Data Firehose delivery stream and the delivery stream and the VPC are in different accounts.
Default: - default IAM role is created for you if the destination type is CloudWatch logs
KeyPrefix
S3 bucket key prefix to publish the flow logs to.
public string? KeyPrefix { get; set; }
Property Value
Remarks
Default: - undefined
LogDestinationType
The type of destination to publish the flow logs to.
public FlowLogDestinationType LogDestinationType { get; set; }
Property Value
Remarks
Default: - CLOUD_WATCH_LOGS
LogGroup
The CloudWatch Logs Log Group to publish the flow logs to.
public ILogGroupRef? LogGroup { get; set; }
Property Value
Remarks
Default: - default log group is created for you
S3Bucket
S3 bucket to publish the flow logs to.
public IBucket? S3Bucket { get; set; }
Property Value
Remarks
Default: - undefined