Class FlowLogDestination
The destination type for the flow log.
Inheritance
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class FlowLogDestination : DeputyBase
Syntax (vb)
Public MustInherit Class FlowLogDestination
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
Vpc vpc;
var logGroup = new LogGroup(this, "MyCustomLogGroup");
var role = new Role(this, "MyCustomRole", new RoleProps {
AssumedBy = new ServicePrincipal("vpc-flow-logs.amazonaws.com")
});
new FlowLog(this, "FlowLog", new FlowLogProps {
ResourceType = FlowLogResourceType.FromVpc(vpc),
Destination = FlowLogDestination.ToCloudWatchLogs(logGroup, role)
});
Synopsis
Constructors
FlowLogDestination() | |
FlowLogDestination(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
FlowLogDestination(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, FlowLog) | Generates a flow log destination configuration. |
ToCloudWatchLogs(ILogGroup, IRole) | Use CloudWatch logs as the destination. |
ToKinesisDataFirehoseDestination(String) | Use Amazon Data Firehose as the destination. |
ToS3(IBucket, String, IS3DestinationOptions) | Use S3 as the destination. |
Constructors
FlowLogDestination()
protected FlowLogDestination()
FlowLogDestination(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected FlowLogDestination(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
FlowLogDestination(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected FlowLogDestination(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, FlowLog)
Generates a flow log destination configuration.
public abstract IFlowLogDestinationConfig Bind(Construct scope, FlowLog flowLog)
Parameters
- scope Constructs.Construct
- flowLog FlowLog
Returns
ToCloudWatchLogs(ILogGroup, IRole)
Use CloudWatch logs as the destination.
public static FlowLogDestination ToCloudWatchLogs(ILogGroup logGroup = null, IRole iamRole = null)
Parameters
Returns
ToKinesisDataFirehoseDestination(String)
Use Amazon Data Firehose as the destination.
public static FlowLogDestination ToKinesisDataFirehoseDestination(string deliveryStreamArn)
Parameters
- deliveryStreamArn System.String
the ARN of Amazon Data Firehose delivery stream to publish logs to.
Returns
ToS3(IBucket, String, IS3DestinationOptions)
Use S3 as the destination.
public static FlowLogDestination ToS3(IBucket bucket = null, string keyPrefix = null, IS3DestinationOptions options = null)
Parameters
- bucket IBucket
optional s3 bucket to publish logs to.
- keyPrefix System.String
optional prefix within the bucket to write logs to.
- options IS3DestinationOptions
additional s3 destination options.
Returns