Class ProviderProps.Builder
java.lang.Object
software.amazon.awscdk.customresources.ProviderProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ProviderProps>
- Enclosing interface:
ProviderProps
@Stability(Stable)
public static final class ProviderProps.Builder
extends Object
implements software.amazon.jsii.Builder<ProviderProps>
A builder for
ProviderProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.isCompleteHandler
(IFunction isCompleteHandler) Sets the value ofProviderProps.getIsCompleteHandler()
logRetention
(RetentionDays logRetention) Sets the value ofProviderProps.getLogRetention()
onEventHandler
(IFunction onEventHandler) Sets the value ofProviderProps.getOnEventHandler()
providerFunctionName
(String providerFunctionName) Sets the value ofProviderProps.getProviderFunctionName()
queryInterval
(Duration queryInterval) Sets the value ofProviderProps.getQueryInterval()
Sets the value ofProviderProps.getRole()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofProviderProps.getSecurityGroups()
totalTimeout
(Duration totalTimeout) Sets the value ofProviderProps.getTotalTimeout()
Sets the value ofProviderProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofProviderProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
onEventHandler
Sets the value ofProviderProps.getOnEventHandler()
- Parameters:
onEventHandler
- The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE). This parameter is required. 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 toisComplete
. ThePhysicalResourceId
property must be included in the response.- Returns:
this
-
isCompleteHandler
Sets the value ofProviderProps.getIsCompleteHandler()
- Parameters:
isCompleteHandler
- The AWS Lambda function to invoke in order to determine if the operation is complete. This function will be called immediately afteronEvent
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.- Returns:
this
-
logRetention
Sets the value ofProviderProps.getLogRetention()
- Parameters:
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 toINFINITE
.- Returns:
this
-
providerFunctionName
Sets the value ofProviderProps.getProviderFunctionName()
- Parameters:
providerFunctionName
- Provider Lambda name. The provider lambda function name.- Returns:
this
-
queryInterval
Sets the value ofProviderProps.getQueryInterval()
- Parameters:
queryInterval
- Time between calls to theisComplete
handler which determines if the resource has been stabilized. The firstisComplete
will be called immediately afterhandler
and then everyqueryInterval
seconds, and untiltimeout
has been reached or untilisComplete
returnstrue
.- Returns:
this
-
role
Sets the value ofProviderProps.getRole()
- Parameters:
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.- Returns:
this
-
securityGroups
@Stability(Stable) public ProviderProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofProviderProps.getSecurityGroups()
- Parameters:
securityGroups
- Security groups to attach to the provider functions. Only used if 'vpc' is supplied- Returns:
this
-
totalTimeout
Sets the value ofProviderProps.getTotalTimeout()
- Parameters:
totalTimeout
- Total timeout for the entire operation. The maximum timeout is 2 hours (yes, it can exceed the AWS Lambda 15 minutes)- Returns:
this
-
vpc
Sets the value ofProviderProps.getVpc()
- Parameters:
vpc
- The vpc to provision the lambda functions in.- Returns:
this
-
vpcSubnets
Sets the value ofProviderProps.getVpcSubnets()
- Parameters:
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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ProviderProps>
- Returns:
- a new instance of
ProviderProps
- Throws:
NullPointerException
- if any required attribute was not provided
-