Interface CustomResourceProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CustomResourceProps.Jsii$Proxy
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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
Deprecated.static final class
Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomResourceProps.Builder
builder()
Deprecated.Deprecated.Deprecated.default RemovalPolicy
Deprecated.default String
Deprecated.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getProvider
Deprecated.(deprecated) The provider which implements the custom resource.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);
-
getProperties
Deprecated.(deprecated) Properties to pass to the Lambda.Default: - No properties.
-
getRemovalPolicy
Deprecated.(deprecated) The policy to apply when this resource is removed from the application.Default: cdk.RemovalPolicy.Destroy
-
getResourceType
Deprecated.(deprecated) For custom resources, you can specify AWS::CloudFormation::CustomResource (the default) as the resource type, or you can specify your own resource type name.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
- See Also:
-
builder
Deprecated.- Returns:
- a
CustomResourceProps.Builder
ofCustomResourceProps
-
core.CustomResourceProps