Interface ProviderProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ProviderProps.Jsii$Proxy
Provider construct.
Example:
import software.amazon.awscdk.customresources.*;
import software.amazon.awscdk.services.lambda.*;
import software.amazon.awscdk.core.Stack;
Function myOnEventLambda;
Function myIsCompleteLambda;
Stack stack = new Stack();
Provider provider = Provider.Builder.create(stack, "myProvider")
.onEventHandler(myOnEventLambda)
.isCompleteHandler(myIsCompleteLambda)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forProviderPropsstatic final classAn implementation forProviderProps -
Method Summary
Modifier and TypeMethodDescriptionstatic ProviderProps.Builderbuilder()default IFunctionThe AWS Lambda function to invoke in order to determine if the operation is complete.default RetentionDaysThe number of days framework log events are kept in CloudWatch Logs.The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE).default StringProvider Lambda name.default DurationTime between calls to theisCompletehandler which determines if the resource has been stabilized.default IRolegetRole()AWS Lambda execution role.default List<ISecurityGroup>Security groups to attach to the provider functions.default DurationTotal timeout for the entire operation.default IVpcgetVpc()The vpc to provision the lambda functions in.default SubnetSelectionWhich subnets from the VPC to place the lambda functions in.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getOnEventHandler
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. ThePhysicalResourceIdproperty must be included in the response. -
getIsCompleteHandler
The AWS Lambda function to invoke in order to determine if the operation is complete.This function will be called immediately after
onEventand then periodically based on the configured query interval as long as it returnsfalse. If the function still returnsfalseand 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.
-
getLogRetention
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
-
getProviderFunctionName
Provider Lambda name.The provider lambda function name.
Default: - CloudFormation default name from unique physical ID
-
getQueryInterval
Time between calls to theisCompletehandler which determines if the resource has been stabilized.The first
isCompletewill be called immediately afterhandlerand then everyqueryIntervalseconds, and untiltimeouthas been reached or untilisCompletereturnstrue.Default: Duration.seconds(5)
-
getRole
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.
-
getSecurityGroups
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.
-
getTotalTimeout
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)
-
getVpc
The vpc to provision the lambda functions in.Default: - functions are not provisioned inside a vpc.
-
getVpcSubnets
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
-
builder
- Returns:
- a
ProviderProps.BuilderofProviderProps
-