Modifier and Type | Method and Description |
---|---|
Provider |
build() |
static Provider.Builder |
create(software.constructs.Construct scope,
java.lang.String id) |
Provider.Builder |
isCompleteHandler(IFunction isCompleteHandler)
The AWS Lambda function to invoke in order to determine if the operation is complete.
|
Provider.Builder |
logRetention(RetentionDays logRetention)
The number of days framework log events are kept in CloudWatch Logs.
|
Provider.Builder |
onEventHandler(IFunction onEventHandler)
The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE).
|
Provider.Builder |
providerFunctionName(java.lang.String providerFunctionName)
Provider Lambda name.
|
Provider.Builder |
queryInterval(Duration queryInterval)
Time between calls to the `isComplete` handler which determines if the resource has been stabilized.
|
Provider.Builder |
role(IRole role)
AWS Lambda execution role.
|
Provider.Builder |
securityGroups(java.util.List<? extends ISecurityGroup> securityGroups)
Security groups to attach to the provider functions.
|
Provider.Builder |
totalTimeout(Duration totalTimeout)
Total timeout for the entire operation.
|
Provider.Builder |
vpc(IVpc vpc)
The vpc to provision the lambda functions in.
|
Provider.Builder |
vpcSubnets(SubnetSelection vpcSubnets)
Which subnets from the VPC to place the lambda functions in.
|
public static Provider.Builder create(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.Provider.Builder
.public Provider.Builder onEventHandler(IFunction onEventHandler)
This function is responsible to begin the requested resource operation
(CREATE/UPDATE/DELETE) and return any additional properties to add to the
event, which will later be passed to isComplete
. The PhysicalResourceId
property must be included in the response.
onEventHandler
- The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE). This parameter is required.this
public Provider.Builder isCompleteHandler(IFunction isCompleteHandler)
This function will be called immediately after onEvent
and then
periodically based on the configured query interval as long as it returns
false
. If the function still returns false
and the alloted timeout has
passed, the operation will fail.
Default: - provider is synchronous. This means that the `onEvent` handler is expected to finish all lifecycle operations within the initial invocation.
isCompleteHandler
- The AWS Lambda function to invoke in order to determine if the operation is complete. This parameter is required.this
public Provider.Builder logRetention(RetentionDays logRetention)
When
updating this property, unsetting it doesn't remove the log retention policy.
To remove the retention policy, set the value to INFINITE
.
Default: logs.RetentionDays.INFINITE
logRetention
- The number of days framework log events are kept in CloudWatch Logs. This parameter is required.this
public Provider.Builder providerFunctionName(java.lang.String providerFunctionName)
The provider lambda function name.
Default: - CloudFormation default name from unique physical ID
providerFunctionName
- Provider Lambda name. This parameter is required.this
public Provider.Builder queryInterval(Duration queryInterval)
The first isComplete
will be called immediately after handler
and then
every queryInterval
seconds, and until timeout
has been reached or until
isComplete
returns true
.
Default: Duration.seconds(5)
queryInterval
- Time between calls to the `isComplete` handler which determines if the resource has been stabilized. This parameter is required.this
public Provider.Builder role(IRole role)
The role that will be assumed by the AWS Lambda. Must be assumable by the 'lambda.amazonaws.com' service principal.
Default: - A default role will be created.
role
- AWS Lambda execution role. This parameter is required.this
public Provider.Builder securityGroups(java.util.List<? extends ISecurityGroup> securityGroups)
Only used if 'vpc' is supplied
Default: - If `vpc` is not supplied, no security groups are attached. Otherwise, a dedicated security group is created for each function.
securityGroups
- Security groups to attach to the provider functions. This parameter is required.this
public Provider.Builder totalTimeout(Duration totalTimeout)
The maximum timeout is 2 hours (yes, it can exceed the AWS Lambda 15 minutes)
Default: Duration.minutes(30)
totalTimeout
- Total timeout for the entire operation. This parameter is required.this
public Provider.Builder vpc(IVpc vpc)
Default: - functions are not provisioned inside a vpc.
vpc
- The vpc to provision the lambda functions in. This parameter is required.this
public Provider.Builder vpcSubnets(SubnetSelection vpcSubnets)
Only used if 'vpc' is supplied. Note: internet access for Lambdas requires a NAT gateway, so picking Public subnets is not allowed.
Default: - the Vpc default strategy if not specified
vpcSubnets
- Which subnets from the VPC to place the lambda functions in. This parameter is required.this
public Provider build()