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 Details

    • Builder

      public Builder()
  • Method Details

    • onEventHandler

      @Stability(Stable) public ProviderProps.Builder onEventHandler(IFunction onEventHandler)
      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 to isComplete. The PhysicalResourceId property must be included in the response.
      Returns:
      this
    • isCompleteHandler

      @Stability(Stable) public ProviderProps.Builder isCompleteHandler(IFunction isCompleteHandler)
      Parameters:
      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 returns false. If the function still returns false and the alloted timeout has passed, the operation will fail.
      Returns:
      this
    • logRetention

      @Stability(Stable) public ProviderProps.Builder logRetention(RetentionDays logRetention)
      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 to INFINITE.
      Returns:
      this
    • providerFunctionName

      @Stability(Stable) public ProviderProps.Builder providerFunctionName(String providerFunctionName)
      Parameters:
      providerFunctionName - Provider Lambda name. The provider lambda function name.
      Returns:
      this
    • queryInterval

      @Stability(Stable) public ProviderProps.Builder queryInterval(Duration queryInterval)
      Parameters:
      queryInterval - Time between calls to the isComplete handler which determines if the resource has been stabilized. The first isComplete will be called immediately after handler and then every queryInterval seconds, and until timeout has been reached or until isComplete returns true.
      Returns:
      this
    • role

      @Stability(Stable) public ProviderProps.Builder role(IRole role)
      Sets the value of ProviderProps.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)
      Parameters:
      securityGroups - Security groups to attach to the provider functions. Only used if 'vpc' is supplied
      Returns:
      this
    • totalTimeout

      @Stability(Stable) public ProviderProps.Builder totalTimeout(Duration totalTimeout)
      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

      @Stability(Stable) public ProviderProps.Builder vpc(IVpc vpc)
      Sets the value of ProviderProps.getVpc()
      Parameters:
      vpc - The vpc to provision the lambda functions in.
      Returns:
      this
    • vpcSubnets

      @Stability(Stable) public ProviderProps.Builder vpcSubnets(SubnetSelection vpcSubnets)
      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

      @Stability(Stable) public ProviderProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<ProviderProps>
      Returns:
      a new instance of ProviderProps
      Throws:
      NullPointerException - if any required attribute was not provided