/
BaseArchiveProps.go
37 lines (34 loc) · 1.21 KB
/
BaseArchiveProps.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
package awsevents
import (
"github.com/aws/aws-cdk-go/awscdk/v2"
)
// The event archive base properties.
//
// Example:
// bus := events.NewEventBus(this, jsii.String("bus"), &EventBusProps{
// EventBusName: jsii.String("MyCustomEventBus"),
// })
//
// bus.archive(jsii.String("MyArchive"), &BaseArchiveProps{
// ArchiveName: jsii.String("MyCustomEventBusArchive"),
// Description: jsii.String("MyCustomerEventBus Archive"),
// EventPattern: &EventPattern{
// Account: []*string{
// awscdk.*stack_Of(this).Account,
// },
// },
// Retention: awscdk.Duration_Days(jsii.Number(365)),
// })
//
type BaseArchiveProps struct {
// An event pattern to use to filter events sent to the archive.
EventPattern *EventPattern `field:"required" json:"eventPattern" yaml:"eventPattern"`
// The name of the archive.
ArchiveName *string `field:"optional" json:"archiveName" yaml:"archiveName"`
// A description for the archive.
Description *string `field:"optional" json:"description" yaml:"description"`
// The number of days to retain events for.
//
// Default value is 0. If set to 0, events are retained indefinitely.
Retention awscdk.Duration `field:"optional" json:"retention" yaml:"retention"`
}