@Stability(value=Experimental) @Internal public static final class CustomResourceProps.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CustomResourceProps
CustomResourcePropssoftware.amazon.jsii.JsiiObject.InitializationModeCustomResourceProps.Builder, CustomResourceProps.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.
|
protected |
Jsii$Proxy(String serviceToken,
Boolean pascalCaseProperties,
Map<String,? extends Object> properties,
RemovalPolicy removalPolicy,
String resourceType)
Constructor that initializes the object based on literal property values passed by the
CustomResourceProps.Builder. |
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.databind.JsonNode |
$jsii$toJson() |
boolean |
equals(Object o) |
Boolean |
getPascalCaseProperties()
(experimental) Convert all property keys to pascal case.
|
Map<String,Object> |
getProperties()
(experimental) Properties to pass to the Lambda.
|
RemovalPolicy |
getRemovalPolicy()
(experimental) The policy to apply when this resource is removed from the application.
|
String |
getResourceType()
(experimental) For custom resources, you can specify AWS::CloudFormation::CustomResource (the default) as the resource type, or you can specify your own resource type name.
|
String |
getServiceToken()
(experimental) The ARN of the provider which implements this custom resource type.
|
int |
hashCode() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitbuilderprotected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
objRef - Reference to the JSII managed object.protected Jsii$Proxy(String serviceToken, Boolean pascalCaseProperties, Map<String,? extends Object> properties, RemovalPolicy removalPolicy, String resourceType)
CustomResourceProps.Builder.public final String getServiceToken()
CustomResourceProps
You can implement a provider by listening to raw AWS CloudFormation events
and specify the ARN of an SNS topic (topic.topicArn) or the ARN of an AWS
Lambda function (lambda.functionArn) or use the CDK's custom resource
provider framework which makes it easier to implement robust providers.
Provider framework:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
// use the provider framework from aws-cdk/custom-resources:
Provider provider = new Provider(this, "ResourceProvider", new ProviderProps()
.onEventHandler(onEventHandler)
.isCompleteHandler(isCompleteHandler));
new CustomResource(this, "MyResource", new CustomResourceProps()
.serviceToken(provider.getServiceToken()));
AWS Lambda function:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
// invoke an AWS Lambda function when a lifecycle event occurs:
// invoke an AWS Lambda function when a lifecycle event occurs:
new CustomResource(this, "MyResource", new CustomResourceProps()
.serviceToken(myFunction.getFunctionArn()));
SNS topic:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
// publish lifecycle events to an SNS topic:
// publish lifecycle events to an SNS topic:
new CustomResource(this, "MyResource", new CustomResourceProps()
.serviceToken(myTopic.getTopicArn()));
getServiceToken in interface CustomResourcePropspublic final Boolean getPascalCaseProperties()
CustomResourcePropsDefault: false
getPascalCaseProperties in interface CustomResourcePropspublic final Map<String,Object> getProperties()
CustomResourcePropsDefault: - No properties.
getProperties in interface CustomResourcePropspublic final RemovalPolicy getRemovalPolicy()
CustomResourcePropsDefault: cdk.RemovalPolicy.Destroy
getRemovalPolicy in interface CustomResourcePropspublic final String getResourceType()
CustomResourcePropsFor 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
getResourceType in interface CustomResourcePropshttps://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html#aws-cfn-resource-type-name@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
$jsii$toJson in interface software.amazon.jsii.JsiiSerializableCopyright © 2021. All rights reserved.