-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
shared.ts
72 lines (65 loc) · 2.04 KB
/
shared.ts
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
import { Duration } from '../duration';
import { Size } from '../size';
export const INLINE_CUSTOM_RESOURCE_CONTEXT = '@aws-cdk/core:inlineCustomResourceIfPossible';
/**
* Initialization options for custom resource providers
*/
export interface CustomResourceProviderOptions {
/**
* Whether or not the cloudformation response wrapper (`nodejs-entrypoint.ts`) is used.
* If set to `true`, `nodejs-entrypoint.js` is bundled in the same asset as the custom resource
* and set as the entrypoint. If set to `false`, the custom resource provided is the
* entrypoint.
*
* @default - `true` if `inlineCode: false` and `false` otherwise.
*/
readonly useCfnResponseWrapper?: boolean;
/**
* 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.
*
* @default - no additional inline policy
*
* @example
* const provider = CustomResourceProvider.getOrCreateProvider(this, 'Custom::MyCustomResourceType', {
* codeDirectory: `${__dirname}/my-handler`,
* runtime: CustomResourceProviderRuntime.NODEJS_18_X,
* policyStatements: [
* {
* Effect: 'Allow',
* Action: 's3:PutObject*',
* Resource: '*',
* }
* ],
* });
*/
readonly policyStatements?: any[];
/**
* AWS Lambda timeout for the provider.
*
* @default Duration.minutes(15)
*/
readonly timeout?: Duration;
/**
* The amount of memory that your function has access to. Increasing the
* function's memory also increases its CPU allocation.
*
* @default Size.mebibytes(128)
*/
readonly memorySize?: Size;
/**
* Key-value pairs that are passed to Lambda as Environment
*
* @default - No environment variables.
*/
readonly environment?: { [key: string]: string };
/**
* A description of the function.
*
* @default - No description.
*/
readonly description?: string;
}