@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)",
date="2022-05-20T22:20:01.355Z")
public interface AwsCustomResourceProps
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 java.lang.String |
getFunctionName()
A name for the singleton Lambda function implementing this custom resource.
|
default java.lang.Boolean |
getInstallLatestAwsSdk()
Whether to install the latest AWS SDK v2.
|
default RetentionDays |
getLogRetention()
The number of days log events of the singleton Lambda function implementing this custom resource are kept in CloudWatch Logs.
|
default AwsSdkCall |
getOnCreate()
The AWS SDK call to make when the resource is created.
|
default AwsSdkCall |
getOnDelete()
The AWS SDK call to make when the resource is deleted.
|
default AwsSdkCall |
getOnUpdate()
The AWS SDK call to make when the resource is updated.
|
AwsCustomResourcePolicy |
getPolicy()
The policy that will be added to the execution role of the Lambda function implementing this custom resource provider.
|
default java.lang.String |
getResourceType()
Cloudformation Resource type.
|
default IRole |
getRole()
The execution role for the singleton Lambda function implementing this custom resource provider.
|
default Duration |
getTimeout()
The timeout for the singleton Lambda function implementing this custom resource.
|
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
default java.lang.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.
default java.lang.Boolean getInstallLatestAwsSdk()
The installation takes around 60 seconds.
Default: true
default RetentionDays getLogRetention()
Default: logs.RetentionDays.INFINITE
default AwsSdkCall getOnCreate()
Default: - the call when the resource is updated
default AwsSdkCall getOnDelete()
Default: - no call
default AwsSdkCall getOnUpdate()
Default: - no call
default java.lang.String getResourceType()
Default: - Custom::AWS
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
default Duration getTimeout()
Default: Duration.minutes(2)
static AwsCustomResourceProps.Builder builder()
AwsCustomResourceProps.Builder
of AwsCustomResourceProps