Interface AwsCustomResourceProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AwsCustomResourceProps.Jsii$Proxy
Note that at least onCreate, onUpdate or onDelete must be specified.
Example:
AwsCustomResource awsCustom = AwsCustomResource.Builder.create(this, "aws-custom") .onCreate(AwsSdkCall.builder() .service("...") .action("...") .parameters(Map.of( "text", "...")) .physicalResourceId(PhysicalResourceId.of("...")) .build()) .onUpdate(AwsSdkCall.builder() .service("...") .action("...") .parameters(Map.of( "text", "...", "resourceId", new PhysicalResourceIdReference())) .build()) .policy(AwsCustomResourcePolicy.fromSdkCalls(SdkCallsPolicyOptions.builder() .resources(AwsCustomResourcePolicy.ANY_RESOURCE) .build())) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forAwsCustomResourceProps
static final class
An implementation forAwsCustomResourceProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
A name for the singleton Lambda function implementing this custom resource.default Boolean
Whether to install the latest AWS SDK v2.default RetentionDays
The number of days log events of the singleton Lambda function implementing this custom resource are kept in CloudWatch Logs.default AwsSdkCall
The AWS SDK call to make when the resource is created.default AwsSdkCall
The AWS SDK call to make when the resource is deleted.default AwsSdkCall
The AWS SDK call to make when the resource is updated.The policy that will be added to the execution role of the Lambda function implementing this custom resource provider.default String
Cloudformation Resource type.default IRole
getRole()
The execution role for the singleton Lambda function implementing this custom resource provider.default Duration
The timeout for the singleton Lambda function implementing this custom resource.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPolicy
The policy that will be added to the execution role of the Lambda function implementing this custom resource provider.The custom resource also implements
iam.IGrantable
, making it possible to use thegrantXxx()
methods.As this custom resource uses a singleton Lambda function, it's important to note the that function's role will eventually accumulate the permissions/grants from all resources.
- See Also:
-
getFunctionName
A name for the singleton Lambda function implementing this custom resource.The function name will remain the same after the first AwsCustomResource is created in a stack.
Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type.
-
getInstallLatestAwsSdk
Whether to install the latest AWS SDK v2. Allows to use the latest API calls documented at https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html.The installation takes around 60 seconds.
Default: true
-
getLogRetention
The number of days log events of the singleton Lambda function implementing this custom resource are kept in CloudWatch Logs.Default: logs.RetentionDays.INFINITE
-
getOnCreate
The AWS SDK call to make when the resource is created.Default: - the call when the resource is updated
-
getOnDelete
The AWS SDK call to make when the resource is deleted.Default: - no call
-
getOnUpdate
The AWS SDK call to make when the resource is updated.Default: - no call
-
getResourceType
Cloudformation Resource type.Default: - Custom::AWS
-
getRole
The execution role for the singleton Lambda function implementing this custom resource provider.This role will apply to all
AwsCustomResource
instances in the stack. The role must be assumable by thelambda.amazonaws.com
service principal.Default: - a new role is created
-
getTimeout
The timeout for the singleton Lambda function implementing this custom resource.Default: Duration.minutes(2)
-
builder
- Returns:
- a
AwsCustomResourceProps.Builder
ofAwsCustomResourceProps
-