@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)",
date="2023-01-31T18:36:55.248Z")
@Deprecated
public interface CustomResourceProps
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.cloudformation.*; import software.amazon.awscdk.core.*; 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 java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Deprecated.
|
ICustomResourceProvider |
getProvider()
Deprecated.
|
default RemovalPolicy |
getRemovalPolicy()
Deprecated.
|
default java.lang.String |
getResourceType()
Deprecated.
|
@Deprecated 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.
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();
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);
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);
@Deprecated default java.util.Map<java.lang.String,java.lang.Object> getProperties()
Default: - No properties.
@Deprecated default RemovalPolicy getRemovalPolicy()
Default: cdk.RemovalPolicy.Destroy
@Deprecated default java.lang.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
@Deprecated static CustomResourceProps.Builder builder()
CustomResourceProps.Builder
of CustomResourceProps