-
Notifications
You must be signed in to change notification settings - Fork 17
/
FlowLogDestinationConfig.go
52 lines (49 loc) · 2 KB
/
FlowLogDestinationConfig.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package awsec2
import (
"github.com/aws/aws-cdk-go/awscdk/v2/awsiam"
"github.com/aws/aws-cdk-go/awscdk/v2/awslogs"
"github.com/aws/aws-cdk-go/awscdk/v2/awss3"
)
// Flow Log Destination configuration.
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import "github.com/aws/aws-cdk-go/awscdk"
// import "github.com/aws/aws-cdk-go/awscdk"
// import "github.com/aws/aws-cdk-go/awscdk"
// import "github.com/aws/aws-cdk-go/awscdk"
//
// var bucket bucket
// var logGroup logGroup
// var role role
//
// flowLogDestinationConfig := &FlowLogDestinationConfig{
// LogDestinationType: awscdk.Aws_ec2.FlowLogDestinationType_CLOUD_WATCH_LOGS,
//
// // the properties below are optional
// DestinationOptions: &DestinationOptions{
// FileFormat: awscdk.*Aws_ec2.FlowLogFileFormat_PLAIN_TEXT,
// HiveCompatiblePartitions: jsii.Boolean(false),
// PerHourPartition: jsii.Boolean(false),
// },
// IamRole: role,
// KeyPrefix: jsii.String("keyPrefix"),
// LogGroup: logGroup,
// S3Bucket: bucket,
// }
//
type FlowLogDestinationConfig struct {
// The type of destination to publish the flow logs to.
LogDestinationType FlowLogDestinationType `field:"required" json:"logDestinationType" yaml:"logDestinationType"`
// Options for writing flow logs to a supported destination.
DestinationOptions *DestinationOptions `field:"optional" json:"destinationOptions" yaml:"destinationOptions"`
// The IAM Role that has access to publish to CloudWatch logs.
IamRole awsiam.IRole `field:"optional" json:"iamRole" yaml:"iamRole"`
// S3 bucket key prefix to publish the flow logs to.
KeyPrefix *string `field:"optional" json:"keyPrefix" yaml:"keyPrefix"`
// The CloudWatch Logs Log Group to publish the flow logs to.
LogGroup awslogs.ILogGroup `field:"optional" json:"logGroup" yaml:"logGroup"`
// S3 bucket to publish the flow logs to.
S3Bucket awss3.IBucket `field:"optional" json:"s3Bucket" yaml:"s3Bucket"`
}