Class Provider.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Provider>
- Enclosing class:
Provider
Provider
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static Provider.Builder
isCompleteHandler
(IFunction isCompleteHandler) The AWS Lambda function to invoke in order to determine if the operation is complete.logRetention
(RetentionDays logRetention) The number of days framework log events are kept in CloudWatch Logs.onEventHandler
(IFunction onEventHandler) The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE).providerFunctionName
(String providerFunctionName) Provider Lambda name.queryInterval
(Duration queryInterval) Time between calls to theisComplete
handler which determines if the resource has been stabilized.AWS Lambda execution role.securityGroups
(List<? extends ISecurityGroup> securityGroups) Security groups to attach to the provider functions.totalTimeout
(Duration totalTimeout) Total timeout for the entire operation.The vpc to provision the lambda functions in.vpcSubnets
(SubnetSelection vpcSubnets) Which subnets from the VPC to place the lambda functions in.
-
Method Details
-
create
@Stability(Stable) public static Provider.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
Provider.Builder
.
-
onEventHandler
The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE).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
. ThePhysicalResourceId
property must be included in the response.- Parameters:
onEventHandler
- The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE). This parameter is required.- Returns:
this
-
isCompleteHandler
The AWS Lambda function to invoke in order to determine if the operation is complete.This function will be called immediately after
onEvent
and then periodically based on the configured query interval as long as it returnsfalse
. If the function still returnsfalse
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.
- Parameters:
isCompleteHandler
- The AWS Lambda function to invoke in order to determine if the operation is complete. This parameter is required.- Returns:
this
-
logRetention
The number of days framework log events are kept in CloudWatch Logs.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
- Parameters:
logRetention
- The number of days framework log events are kept in CloudWatch Logs. This parameter is required.- Returns:
this
-
providerFunctionName
Provider Lambda name.The provider lambda function name.
Default: - CloudFormation default name from unique physical ID
- Parameters:
providerFunctionName
- Provider Lambda name. This parameter is required.- Returns:
this
-
queryInterval
Time between calls to theisComplete
handler which determines if the resource has been stabilized.The first
isComplete
will be called immediately afterhandler
and then everyqueryInterval
seconds, and untiltimeout
has been reached or untilisComplete
returnstrue
.Default: Duration.seconds(5)
- Parameters:
queryInterval
- Time between calls to theisComplete
handler which determines if the resource has been stabilized. This parameter is required.- Returns:
this
-
role
AWS Lambda execution 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.
- Parameters:
role
- AWS Lambda execution role. This parameter is required.- Returns:
this
-
securityGroups
@Stability(Stable) public Provider.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Security groups to attach to the provider functions.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.
- Parameters:
securityGroups
- Security groups to attach to the provider functions. This parameter is required.- Returns:
this
-
totalTimeout
Total timeout for the entire operation.The maximum timeout is 2 hours (yes, it can exceed the AWS Lambda 15 minutes)
Default: Duration.minutes(30)
- Parameters:
totalTimeout
- Total timeout for the entire operation. This parameter is required.- Returns:
this
-
vpc
The vpc to provision the lambda functions in.Default: - functions are not provisioned inside a vpc.
- Parameters:
vpc
- The vpc to provision the lambda functions in. This parameter is required.- Returns:
this
-
vpcSubnets
Which subnets from the VPC to place the lambda functions in.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
- Parameters:
vpcSubnets
- Which subnets from the VPC to place the lambda functions in. This parameter is required.- Returns:
this
-
build
-