@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:35.881Z") @Stability(value=Stable) 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:
// Example automatically generated from non-compiling source. May contain errors.
CustomResourceProvider myProvider;
CustomResource.Builder.create(this, "MyCustomResource")
.serviceToken(myProvider.getServiceToken())
.properties(Map.of(
"myPropertyOne", "one",
"myPropertyTwo", "two"))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CustomResource.Builder
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)
Returns the value of an attribute of the custom resource of an arbitrary type.
|
String |
getAttString(String attributeName)
Returns the value of an attribute of the custom resource of type string.
|
String |
getRef()
The physical name of this custom resource.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected CustomResource(software.amazon.jsii.JsiiObjectRef objRef)
protected CustomResource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
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=Stable) @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=Stable) @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=Stable) @NotNull public String getRef()
Copyright © 2022. All rights reserved.