@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-07T23:47:01.887Z") @Stability(value=Deprecated) @Deprecated public interface CustomResourceProps extends software.amazon.jsii.JsiiSerializable
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.cloudformation.*;
CustomResourceProvider customResourceProvider;
Object properties;
CustomResourceProps customResourceProps = CustomResourceProps.builder()
.provider(customResourceProvider)
// the properties below are optional
.properties(Map.of(
"propertiesKey", properties))
.removalPolicy(RemovalPolicy.DESTROY)
.resourceType("resourceType")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CustomResourceProps.Builder
Deprecated.
|
static class |
CustomResourceProps.Jsii$Proxy
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static CustomResourceProps.Builder |
builder()
Deprecated.
|
default Map<String,Object> |
getProperties()
Deprecated.
|
ICustomResourceProvider |
getProvider()
Deprecated.
|
default RemovalPolicy |
getRemovalPolicy()
Deprecated.
|
default String |
getResourceType()
Deprecated.
|
@Stability(value=Deprecated) @Deprecated @NotNull ICustomResourceProvider getProvider()
You can implement a provider by listening to raw AWS CloudFormation events through an SNS topic or an AWS Lambda function or use the CDK's custom resource provider framework which makes it easier to implement robust providers.
// Example automatically generated from non-compiling source. May contain errors.
import software.amazon.awscdk.customresources.*;
import software.amazon.awscdk.services.lambda.*;
import software.amazon.awscdk.core.Stack;
Function myOnEventLambda;
Function myIsCompleteLambda;
Stack stack = new Stack();
Provider provider = Provider.Builder.create(stack, "myProvider")
.onEventHandler(myOnEventLambda)
.isCompleteHandler(myIsCompleteLambda)
.build();
// Example automatically generated from non-compiling source. May contain errors. import software.amazon.awscdk.services.cloudformation.*; import software.amazon.awscdk.services.lambda.*; Function myFunction; // invoke an AWS Lambda function when a lifecycle event occurs: CustomResourceProvider provider = CustomResourceProvider.fromLambda(myFunction);
// Example automatically generated from non-compiling source. May contain errors. import software.amazon.awscdk.services.cloudformation.*; import software.amazon.awscdk.services.sns.*; Topic myTopic; // publish lifecycle events to an SNS topic: CustomResourceProvider provider = CustomResourceProvider.fromTopic(myTopic);
@Stability(value=Deprecated) @Deprecated @Nullable default Map<String,Object> getProperties()
Default: - No properties.
@Stability(value=Deprecated) @Deprecated @Nullable default RemovalPolicy getRemovalPolicy()
Default: cdk.RemovalPolicy.Destroy
@Stability(value=Deprecated) @Deprecated @Nullable default String getResourceType()
For example, you can use "Custom::MyCustomResourceTypeName".
Custom resource type names must begin with "Custom::" and can include alphanumeric characters and the following characters: _@-. You can specify a custom resource type name up to a maximum length of 60 characters. You cannot change the type during an update.
Using your own resource type names helps you quickly differentiate the types of custom resources in your stack. For example, if you had two custom resources that conduct two different ping tests, you could name their type as Custom::PingTester to make them easily identifiable as ping testers (instead of using AWS::CloudFormation::CustomResource).
Default: - AWS::CloudFormation::CustomResource
@Stability(value=Deprecated) @Deprecated static CustomResourceProps.Builder builder()
CustomResourceProps.Builder of CustomResourcePropsCopyright © 2022. All rights reserved.