Package software.amazon.awscdk
Class CustomResourceProviderProps.Builder
java.lang.Object
software.amazon.awscdk.CustomResourceProviderProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CustomResourceProviderProps>
- Enclosing interface:
CustomResourceProviderProps
@Stability(Stable)
public static final class CustomResourceProviderProps.Builder
extends Object
implements software.amazon.jsii.Builder<CustomResourceProviderProps>
A builder for
CustomResourceProviderProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.codeDirectory(String codeDirectory) Sets the value ofCustomResourceProviderProps.getCodeDirectory()description(String description) Sets the value ofCustomResourceProviderOptions.getDescription()environment(Map<String, String> environment) Sets the value ofCustomResourceProviderOptions.getEnvironment()memorySize(Size memorySize) Sets the value ofCustomResourceProviderOptions.getMemorySize()policyStatements(List<? extends Object> policyStatements) Sets the value ofCustomResourceProviderOptions.getPolicyStatements()runtime(CustomResourceProviderRuntime runtime) Sets the value ofCustomResourceProviderProps.getRuntime()Sets the value ofCustomResourceProviderOptions.getTimeout()useCfnResponseWrapper(Boolean useCfnResponseWrapper) Sets the value ofCustomResourceProviderOptions.getUseCfnResponseWrapper()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
codeDirectory
Sets the value ofCustomResourceProviderProps.getCodeDirectory()- Parameters:
codeDirectory- A local file system directory with the provider's code. This parameter is required. The code will be bundled into a zip asset and wired to the provider's AWS Lambda function.- Returns:
this
-
runtime
@Stability(Stable) public CustomResourceProviderProps.Builder runtime(CustomResourceProviderRuntime runtime) Sets the value ofCustomResourceProviderProps.getRuntime()- Parameters:
runtime- The AWS Lambda runtime and version to use for the provider. This parameter is required.- Returns:
this
-
description
Sets the value ofCustomResourceProviderOptions.getDescription()- Parameters:
description- A description of the function.- Returns:
this
-
environment
@Stability(Stable) public CustomResourceProviderProps.Builder environment(Map<String, String> environment) Sets the value ofCustomResourceProviderOptions.getEnvironment()- Parameters:
environment- Key-value pairs that are passed to Lambda as Environment.- Returns:
this
-
memorySize
Sets the value ofCustomResourceProviderOptions.getMemorySize()- Parameters:
memorySize- The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation.- Returns:
this
-
policyStatements
@Stability(Stable) public CustomResourceProviderProps.Builder policyStatements(List<? extends Object> policyStatements) Sets the value ofCustomResourceProviderOptions.getPolicyStatements()- Parameters:
policyStatements- A set of IAM policy statements to include in the inline policy of the provider's lambda function. Please note: these are direct IAM JSON policy blobs, notiam.PolicyStatementobjects like you will see in the rest of the CDK.- Returns:
this
-
timeout
Sets the value ofCustomResourceProviderOptions.getTimeout()- Parameters:
timeout- AWS Lambda timeout for the provider.- Returns:
this
-
useCfnResponseWrapper
@Stability(Stable) public CustomResourceProviderProps.Builder useCfnResponseWrapper(Boolean useCfnResponseWrapper) Sets the value ofCustomResourceProviderOptions.getUseCfnResponseWrapper()- Parameters:
useCfnResponseWrapper- Whether or not the cloudformation response wrapper (nodejs-entrypoint.ts) is used. If set totrue,nodejs-entrypoint.jsis bundled in the same asset as the custom resource and set as the entrypoint. If set tofalse, the custom resource provided is the entrypoint.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CustomResourceProviderProps>- Returns:
- a new instance of
CustomResourceProviderProps - Throws:
NullPointerException- if any required attribute was not provided
-