-
Notifications
You must be signed in to change notification settings - Fork 17
/
KinesisDestination.go
89 lines (75 loc) · 2.58 KB
/
KinesisDestination.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package awslogsdestinations
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/v2/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
"github.com/aws/aws-cdk-go/awscdk/v2/awskinesis"
"github.com/aws/aws-cdk-go/awscdk/v2/awslogs"
"github.com/aws/aws-cdk-go/awscdk/v2/awslogsdestinations/internal"
"github.com/aws/constructs-go/constructs/v10"
)
// Use a Kinesis stream as the destination for a log subscription.
//
// 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"
//
// var role role
// var stream stream
//
// kinesisDestination := awscdk.Aws_logs_destinations.NewKinesisDestination(stream, &KinesisDestinationProps{
// Role: role,
// })
//
type KinesisDestination interface {
awslogs.ILogSubscriptionDestination
// Return the properties required to send subscription events to this destination.
//
// If necessary, the destination can use the properties of the SubscriptionFilter
// object itself to configure its permissions to allow the subscription to write
// to it.
//
// The destination may reconfigure its own permissions in response to this
// function call.
Bind(scope constructs.Construct, _sourceLogGroup awslogs.ILogGroup) *awslogs.LogSubscriptionDestinationConfig
}
// The jsii proxy struct for KinesisDestination
type jsiiProxy_KinesisDestination struct {
internal.Type__awslogsILogSubscriptionDestination
}
func NewKinesisDestination(stream awskinesis.IStream, props *KinesisDestinationProps) KinesisDestination {
_init_.Initialize()
if err := validateNewKinesisDestinationParameters(stream, props); err != nil {
panic(err)
}
j := jsiiProxy_KinesisDestination{}
_jsii_.Create(
"aws-cdk-lib.aws_logs_destinations.KinesisDestination",
[]interface{}{stream, props},
&j,
)
return &j
}
func NewKinesisDestination_Override(k KinesisDestination, stream awskinesis.IStream, props *KinesisDestinationProps) {
_init_.Initialize()
_jsii_.Create(
"aws-cdk-lib.aws_logs_destinations.KinesisDestination",
[]interface{}{stream, props},
k,
)
}
func (k *jsiiProxy_KinesisDestination) Bind(scope constructs.Construct, _sourceLogGroup awslogs.ILogGroup) *awslogs.LogSubscriptionDestinationConfig {
if err := k.validateBindParameters(scope, _sourceLogGroup); err != nil {
panic(err)
}
var returns *awslogs.LogSubscriptionDestinationConfig
_jsii_.Invoke(
k,
"bind",
[]interface{}{scope, _sourceLogGroup},
&returns,
)
return returns
}