Package software.amazon.awscdk
Interface CustomResourceProviderOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
CustomResourceProviderBaseProps,CustomResourceProviderProps
- All Known Implementing Classes:
CustomResourceProviderBaseProps.Jsii$Proxy,CustomResourceProviderOptions.Jsii$Proxy,CustomResourceProviderProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-12T17:54:04.159Z")
@Stability(Stable)
public interface CustomResourceProviderOptions
extends software.amazon.jsii.JsiiSerializable
Initialization options for custom resource providers.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
Object policyStatements;
Size size;
CustomResourceProviderOptions customResourceProviderOptions = CustomResourceProviderOptions.builder()
.description("description")
.environment(Map.of(
"environmentKey", "environment"))
.memorySize(size)
.policyStatements(List.of(policyStatements))
.timeout(Duration.minutes(30))
.useCfnResponseWrapper(false)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCustomResourceProviderOptionsstatic final classAn implementation forCustomResourceProviderOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringA description of the function.Key-value pairs that are passed to Lambda as Environment.default SizeThe amount of memory that your function has access to.A set of IAM policy statements to include in the inline policy of the provider's lambda function.default DurationAWS Lambda timeout for the provider.default BooleanWhether or not the cloudformation response wrapper (nodejs-entrypoint.ts) is used.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDescription
A description of the function.Default: - No description.
-
getEnvironment
Key-value pairs that are passed to Lambda as Environment.Default: - No environment variables.
-
getMemorySize
The amount of memory that your function has access to.Increasing the function's memory also increases its CPU allocation.
Default: Size.mebibytes(128)
-
getPolicyStatements
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, not
iam.PolicyStatementobjects like you will see in the rest of the CDK.Default: - no additional inline policy
Example:
CustomResourceProvider provider = CustomResourceProvider.getOrCreateProvider(this, "Custom::MyCustomResourceType", CustomResourceProviderProps.builder() .codeDirectory(String.format("%s/my-handler", __dirname)) .runtime(CustomResourceProviderRuntime.NODEJS_18_X) .policyStatements(List.of(Map.of( "Effect", "Allow", "Action", "s3:PutObject*", "Resource", "*"))) .build()); -
getTimeout
AWS Lambda timeout for the provider.Default: Duration.minutes(15)
-
getUseCfnResponseWrapper
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.Default: - `true` if `inlineCode: false` and `false` otherwise.
-
builder
-