Class Provider.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Provider>
- Enclosing class:
Provider
Provider
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static Provider.Builder
disableWaiterStateMachineLogging
(Boolean disableWaiterStateMachineLogging) Whether logging for the waiter state machine is disabled.isCompleteHandler
(IFunction isCompleteHandler) The AWS Lambda function to invoke in order to determine if the operation is complete.The Log Group used for logging of events emitted by the custom resource's lambda function.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).providerFunctionEnvEncryption
(IKey providerFunctionEnvEncryption) AWS KMS key used to encrypt provider lambda's environment variables.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.waiterStateMachineLogOptions
(LogOptions waiterStateMachineLogOptions) Defines what execution history events of the waiter state machine are logged and where they are logged.
-
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
-
disableWaiterStateMachineLogging
@Stability(Stable) public Provider.Builder disableWaiterStateMachineLogging(Boolean disableWaiterStateMachineLogging) Whether logging for the waiter state machine is disabled.Default: - false
- Parameters:
disableWaiterStateMachineLogging
- Whether logging for the waiter state machine is disabled. 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
-
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.
Default: - a default log group created by AWS Lambda
- Parameters:
logGroup
- The Log Group used for logging of events emitted by the custom resource's lambda function. 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
.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.Default: logs.RetentionDays.INFINITE
- Parameters:
logRetention
- The number of days framework log events are kept in CloudWatch Logs. This parameter is required.- Returns:
this
-
providerFunctionEnvEncryption
@Stability(Stable) public Provider.Builder providerFunctionEnvEncryption(IKey providerFunctionEnvEncryption) AWS KMS key used to encrypt provider lambda's environment variables.Default: - AWS Lambda creates and uses an AWS managed customer master key (CMK)
- Parameters:
providerFunctionEnvEncryption
- AWS KMS key used to encrypt provider lambda's environment variables. 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 1 hour (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
-
waiterStateMachineLogOptions
@Stability(Stable) public Provider.Builder waiterStateMachineLogOptions(LogOptions waiterStateMachineLogOptions) Defines what execution history events of the waiter state machine are logged and where they are logged.Default: - A default log group will be created if logging for the waiter state machine is enabled.
- Parameters:
waiterStateMachineLogOptions
- Defines what execution history events of the waiter state machine are logged and where they are logged. This parameter is required.- Returns:
this
-
build
-