@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:01.056Z") @Stability(value=Experimental) public class CustomResource extends Resource
This class is intended to be used by construct library authors. Application builder should not be able to tell whether or not a construct is backed by a custom resource, and so the use of this class should be invisible.
Instead, construct library authors declare a custom construct that hides the choice of provider, and accepts a strongly-typed properties object with the properties your provider accepts.
Your custom resource provider (identified by the serviceToken property)
can be one of 4 constructs:
Provider class in the custom-resources module.CustomResourceProvider construct in this package.serviceToken.Example:
// use the provider framework from aws-cdk/custom-resources:
Provider provider = Provider.Builder.create(this, "ResourceProvider")
.onEventHandler(onEventHandler)
.isCompleteHandler(isCompleteHandler)
.build();
CustomResource.Builder.create(this, "MyResource")
.serviceToken(provider.getServiceToken())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CustomResource.Builder
(experimental) A fluent builder for
CustomResource. |
software.amazon.jsii.JsiiObject.InitializationModeIResource.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
CustomResource(software.constructs.Construct scope,
String id,
CustomResourceProps props) |
protected |
CustomResource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CustomResource(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Reference |
getAtt(String attributeName)
(experimental) Returns the value of an attribute of the custom resource of an arbitrary type.
|
String |
getAttString(String attributeName)
(experimental) Returns the value of an attribute of the custom resource of type string.
|
String |
getRef()
(experimental) The physical name of this custom resource.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcegetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNodeprotected CustomResource(software.amazon.jsii.JsiiObjectRef objRef)
protected CustomResource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public CustomResource(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CustomResourceProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public Reference getAtt(@NotNull String attributeName)
Attributes are returned from the custom resource provider through the
Data map where the key is the attribute name.
attributeName - the name of the attribute. This parameter is required.@Stability(value=Experimental) @NotNull public String getAttString(@NotNull String attributeName)
Attributes are returned from the custom resource provider through the
Data map where the key is the attribute name.
attributeName - the name of the attribute. This parameter is required.@Stability(value=Experimental) @NotNull public String getRef()
Copyright © 2022. All rights reserved.