/
OAuthAuthorizationProps.go
60 lines (57 loc) · 2.39 KB
/
OAuthAuthorizationProps.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
package awsevents
import (
"github.com/aws/aws-cdk-go/awscdk/v2"
)
// Properties for `Authorization.oauth()`.
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import cdk "github.com/aws/aws-cdk-go/awscdk"
// import "github.com/aws/aws-cdk-go/awscdk"
//
// var httpParameter httpParameter
// var secretValue secretValue
//
// oAuthAuthorizationProps := &OAuthAuthorizationProps{
// AuthorizationEndpoint: jsii.String("authorizationEndpoint"),
// ClientId: jsii.String("clientId"),
// ClientSecret: secretValue,
// HttpMethod: awscdk.Aws_events.HttpMethod_POST,
//
// // the properties below are optional
// BodyParameters: map[string]*httpParameter{
// "bodyParametersKey": httpParameter,
// },
// HeaderParameters: map[string]*httpParameter{
// "headerParametersKey": httpParameter,
// },
// QueryStringParameters: map[string]*httpParameter{
// "queryStringParametersKey": httpParameter,
// },
// }
//
type OAuthAuthorizationProps struct {
// The URL to the authorization endpoint.
AuthorizationEndpoint *string `field:"required" json:"authorizationEndpoint" yaml:"authorizationEndpoint"`
// The client ID to use for OAuth authorization for the connection.
ClientId *string `field:"required" json:"clientId" yaml:"clientId"`
// The client secret associated with the client ID to use for OAuth authorization for the connection.
ClientSecret awscdk.SecretValue `field:"required" json:"clientSecret" yaml:"clientSecret"`
// The method to use for the authorization request.
//
// (Can only choose POST, GET or PUT).
HttpMethod HttpMethod `field:"required" json:"httpMethod" yaml:"httpMethod"`
// Additional string parameters to add to the OAuth request body.
// Default: - No additional parameters.
//
BodyParameters *map[string]HttpParameter `field:"optional" json:"bodyParameters" yaml:"bodyParameters"`
// Additional string parameters to add to the OAuth request header.
// Default: - No additional parameters.
//
HeaderParameters *map[string]HttpParameter `field:"optional" json:"headerParameters" yaml:"headerParameters"`
// Additional string parameters to add to the OAuth request query string.
// Default: - No additional parameters.
//
QueryStringParameters *map[string]HttpParameter `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"`
}