@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:16.470Z") @Stability(value=Experimental) public interface AwsCustomResourceProps extends software.amazon.jsii.JsiiSerializable
Note that at least onCreate, onUpdate or onDelete must be specified.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.services.iam.*;
import software.amazon.awscdk.services.logs.*;
import software.amazon.awscdk.customresources.*;
AwsCustomResourcePolicy awsCustomResourcePolicy;
Duration duration;
Object parameters;
PhysicalResourceId physicalResourceId;
Role role;
AwsCustomResourceProps awsCustomResourceProps = AwsCustomResourceProps.builder()
.policy(awsCustomResourcePolicy)
// the properties below are optional
.functionName("functionName")
.installLatestAwsSdk(false)
.logRetention(RetentionDays.ONE_DAY)
.onCreate(AwsSdkCall.builder()
.action("action")
.service("service")
// the properties below are optional
.apiVersion("apiVersion")
.assumedRoleArn("assumedRoleArn")
.ignoreErrorCodesMatching("ignoreErrorCodesMatching")
.outputPath("outputPath")
.outputPaths(List.of("outputPaths"))
.parameters(parameters)
.physicalResourceId(physicalResourceId)
.region("region")
.build())
.onDelete(AwsSdkCall.builder()
.action("action")
.service("service")
// the properties below are optional
.apiVersion("apiVersion")
.assumedRoleArn("assumedRoleArn")
.ignoreErrorCodesMatching("ignoreErrorCodesMatching")
.outputPath("outputPath")
.outputPaths(List.of("outputPaths"))
.parameters(parameters)
.physicalResourceId(physicalResourceId)
.region("region")
.build())
.onUpdate(AwsSdkCall.builder()
.action("action")
.service("service")
// the properties below are optional
.apiVersion("apiVersion")
.assumedRoleArn("assumedRoleArn")
.ignoreErrorCodesMatching("ignoreErrorCodesMatching")
.outputPath("outputPath")
.outputPaths(List.of("outputPaths"))
.parameters(parameters)
.physicalResourceId(physicalResourceId)
.region("region")
.build())
.resourceType("resourceType")
.role(role)
.timeout(duration)
.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 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 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 Lambda function implementing this custom resource provider.
|
default Duration |
getTimeout()
(experimental) The timeout for the 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.
Policy.fromSdkCalls@Stability(value=Experimental) @Nullable default String getFunctionName()
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.