Class FlowLogDestination
The destination type for the flow log.
Inheritance
System.Object
FlowLogDestination
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.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. |
ToS3(IBucket, String) | 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
Returns
ToCloudWatchLogs(ILogGroup, IRole)
Use CloudWatch logs as the destination.
public static FlowLogDestination ToCloudWatchLogs(ILogGroup logGroup = null, IRole iamRole = null)
Parameters
Returns
ToS3(IBucket, String)
Use S3 as the destination.
public static FlowLogDestination ToS3(IBucket bucket = null, string keyPrefix = null)
Parameters
- bucket IBucket
- keyPrefix System.String
Returns