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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.disableWaiterStateMachineLogging
(Boolean disableWaiterStateMachineLogging) Sets the value ofProviderProps.getDisableWaiterStateMachineLogging()
isCompleteHandler
(IFunction isCompleteHandler) Sets the value ofProviderProps.getIsCompleteHandler()
Sets the value ofProviderProps.getLogGroup()
logRetention
(RetentionDays logRetention) Sets the value ofProviderProps.getLogRetention()
onEventHandler
(IFunction onEventHandler) Sets the value ofProviderProps.getOnEventHandler()
providerFunctionEnvEncryption
(IKey providerFunctionEnvEncryption) Sets the value ofProviderProps.getProviderFunctionEnvEncryption()
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()
waiterStateMachineLogOptions
(LogOptions waiterStateMachineLogOptions) Sets the value ofProviderProps.getWaiterStateMachineLogOptions()
-
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
-
disableWaiterStateMachineLogging
@Stability(Stable) public ProviderProps.Builder disableWaiterStateMachineLogging(Boolean disableWaiterStateMachineLogging) Sets the value ofProviderProps.getDisableWaiterStateMachineLogging()
- Parameters:
disableWaiterStateMachineLogging
- Whether logging for the waiter state machine is disabled.- 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
-
logGroup
Sets the value ofProviderProps.getLogGroup()
- Parameters:
logGroup
- The Log Group used for logging of events emitted by the custom resource's lambda function. Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first.- 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
.This is a legacy API and we strongly recommend you migrate to
logGroup
if you can.logGroup
allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.- Returns:
this
-
providerFunctionEnvEncryption
@Stability(Stable) public ProviderProps.Builder providerFunctionEnvEncryption(IKey providerFunctionEnvEncryption) Sets the value ofProviderProps.getProviderFunctionEnvEncryption()
- Parameters:
providerFunctionEnvEncryption
- AWS KMS key used to encrypt provider lambda's environment variables.- 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 1 hour (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
-
waiterStateMachineLogOptions
@Stability(Stable) public ProviderProps.Builder waiterStateMachineLogOptions(LogOptions waiterStateMachineLogOptions) Sets the value ofProviderProps.getWaiterStateMachineLogOptions()
- Parameters:
waiterStateMachineLogOptions
- Defines what execution history events of the waiter state machine are logged and where they are logged.- 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
-