@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:58.300Z") @Stability(value=Experimental) public interface AwsCustomResourceProps extends software.amazon.jsii.JsiiSerializable
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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
AwsCustomResourceProps.Builder
A builder for
AwsCustomResourceProps |
static class |
AwsCustomResourceProps.Jsii$Proxy
An implementation for
AwsCustomResourceProps |
| Modifier and Type | Method and Description |
|---|---|
static AwsCustomResourceProps.Builder |
builder() |
default String |
getFunctionName()
(experimental) A name for the singleton Lambda function implementing this custom resource.
|
default Boolean |
getInstallLatestAwsSdk()
(experimental) Whether to install the latest AWS SDK v2.
|
default RetentionDays |
getLogRetention()
(experimental) The number of days log events of the singleton Lambda function implementing this custom resource are kept in CloudWatch Logs.
|
default AwsSdkCall |
getOnCreate()
(experimental) The AWS SDK call to make when the resource is created.
|
default AwsSdkCall |
getOnDelete()
(experimental) The AWS SDK call to make when the resource is deleted.
|
default AwsSdkCall |
getOnUpdate()
(experimental) The AWS SDK call to make when the resource is updated.
|
AwsCustomResourcePolicy |
getPolicy()
(experimental) The policy that will be added to the execution role of the Lambda function implementing this custom resource provider.
|
default String |
getResourceType()
(experimental) Cloudformation Resource type.
|
default IRole |
getRole()
(experimental) The execution role for the singleton Lambda function implementing this custom resource provider.
|
default Duration |
getTimeout()
(experimental) The timeout for the singleton Lambda function implementing this custom resource.
|
@Stability(value=Experimental) @NotNull AwsCustomResourcePolicy getPolicy()
The custom resource also implements iam.IGrantable, making it possible
to use the grantXxx() 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.
@Stability(value=Experimental) @Nullable default String getFunctionName()
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.
@Stability(value=Experimental) @Nullable default Boolean getInstallLatestAwsSdk()
The installation takes around 60 seconds.
Default: true
@Stability(value=Experimental) @Nullable default RetentionDays getLogRetention()
Default: logs.RetentionDays.INFINITE
@Stability(value=Experimental) @Nullable default AwsSdkCall getOnCreate()
Default: - the call when the resource is updated
@Stability(value=Experimental) @Nullable default AwsSdkCall getOnDelete()
Default: - no call
@Stability(value=Experimental) @Nullable default AwsSdkCall getOnUpdate()
Default: - no call
@Stability(value=Experimental) @Nullable default String getResourceType()
Default: - Custom::AWS
@Stability(value=Experimental) @Nullable default IRole getRole()
This role will apply to all AwsCustomResource
instances in the stack. The role must be assumable by the
lambda.amazonaws.com service principal.
Default: - a new role is created
@Stability(value=Experimental) @Nullable default Duration getTimeout()
Default: Duration.minutes(2)
@Stability(value=Experimental) static AwsCustomResourceProps.Builder builder()
AwsCustomResourceProps.Builder of AwsCustomResourcePropsCopyright © 2022. All rights reserved.