-
Notifications
You must be signed in to change notification settings - Fork 17
/
awscdk_CustomResourceProviderProps.go
67 lines (64 loc) · 2.63 KB
/
awscdk_CustomResourceProviderProps.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
// An experiment to bundle the entire CDK into a single module
package awscdk
// Initialization properties for `CustomResourceProvider`.
//
// Example:
// provider := awscdk.CustomResourceProvider.getOrCreateProvider(this, jsii.String("Custom::MyCustomResourceType"), &customResourceProviderProps{
// codeDirectory: fmt.Sprintf("%v/my-handler", __dirname),
// runtime: awscdk.CustomResourceProviderRuntime_NODEJS_14_X,
// policyStatements: []interface{}{
// map[string]*string{
// "Effect": jsii.String("Allow"),
// "Action": jsii.String("s3:PutObject*"),
// "Resource": jsii.String("*"),
// },
// },
// })
//
// Experimental.
type CustomResourceProviderProps struct {
// A local file system directory with the provider's code.
//
// The code will be
// bundled into a zip asset and wired to the provider's AWS Lambda function.
// Experimental.
CodeDirectory *string `field:"required" json:"codeDirectory" yaml:"codeDirectory"`
// The AWS Lambda runtime and version to use for the provider.
// Experimental.
Runtime CustomResourceProviderRuntime `field:"required" json:"runtime" yaml:"runtime"`
// A description of the function.
// Experimental.
Description *string `field:"optional" json:"description" yaml:"description"`
// Key-value pairs that are passed to Lambda as Environment.
// Experimental.
Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
// The amount of memory that your function has access to.
//
// Increasing the
// function's memory also increases its CPU allocation.
// Experimental.
MemorySize Size `field:"optional" json:"memorySize" yaml:"memorySize"`
// A set of IAM policy statements to include in the inline policy of the provider's lambda function.
//
// **Please note**: these are direct IAM JSON policy blobs, *not* `iam.PolicyStatement`
// objects like you will see in the rest of the CDK.
//
// Example:
// provider := awscdk.CustomResourceProvider.getOrCreateProvider(this, jsii.String("Custom::MyCustomResourceType"), &customResourceProviderProps{
// codeDirectory: fmt.Sprintf("%v/my-handler", __dirname),
// runtime: awscdk.CustomResourceProviderRuntime_NODEJS_14_X,
// policyStatements: []interface{}{
// map[string]*string{
// "Effect": jsii.String("Allow"),
// "Action": jsii.String("s3:PutObject*"),
// "Resource": jsii.String("*"),
// },
// },
// })
//
// Experimental.
PolicyStatements *[]interface{} `field:"optional" json:"policyStatements" yaml:"policyStatements"`
// AWS Lambda timeout for the provider.
// Experimental.
Timeout Duration `field:"optional" json:"timeout" yaml:"timeout"`
}