/
awsevents_ConnectionProps.go
41 lines (38 loc) · 1.92 KB
/
awsevents_ConnectionProps.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
package awsevents
// An API Destination Connection.
//
// A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.
//
// Example:
// connection := events.NewConnection(this, jsii.String("Connection"), &connectionProps{
// authorization: events.authorization.apiKey(jsii.String("x-api-key"), awscdk.SecretValue.secretsManager(jsii.String("ApiSecretName"))),
// description: jsii.String("Connection with API Key x-api-key"),
// })
//
// destination := events.NewApiDestination(this, jsii.String("Destination"), &apiDestinationProps{
// connection: connection,
// endpoint: jsii.String("https://example.com"),
// description: jsii.String("Calling example.com with API key x-api-key"),
// })
//
// rule := events.NewRule(this, jsii.String("Rule"), &ruleProps{
// schedule: events.schedule.rate(cdk.duration.minutes(jsii.Number(1))),
// targets: []iRuleTarget{
// targets.NewApiDestination(destination),
// },
// })
//
type ConnectionProps struct {
// The authorization type for the connection.
Authorization Authorization `field:"required" json:"authorization" yaml:"authorization"`
// Additional string parameters to add to the invocation bodies.
BodyParameters *map[string]HttpParameter `field:"optional" json:"bodyParameters" yaml:"bodyParameters"`
// The name of the connection.
ConnectionName *string `field:"optional" json:"connectionName" yaml:"connectionName"`
// The name of the connection.
Description *string `field:"optional" json:"description" yaml:"description"`
// Additional string parameters to add to the invocation headers.
HeaderParameters *map[string]HttpParameter `field:"optional" json:"headerParameters" yaml:"headerParameters"`
// Additional string parameters to add to the invocation query strings.
QueryStringParameters *map[string]HttpParameter `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"`
}