@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:40.436Z") @Stability(value=Experimental) public interface CfnResourceProps extends software.amazon.jsii.JsiiSerializable
import software.amazon.awscdk.core.*;
import software.constructs.Construct;
import software.constructs.IConstruct;
public class MyAspect implements IAspect {
public void visit(IConstruct node) {
if (node instanceof CfnResource && node.getCfnResourceType() == "Foo::Bar") {
this.error(node, "we do not want a Foo::Bar resource");
}
}
public void error(IConstruct node, String message) {
Annotations.of(node).addError(message);
}
}
public class MyStack extends Stack {
public MyStack(Construct scope, String id) {
super(scope, id);
Stack stack = new Stack();
CfnResource.Builder.create(stack, "Foo")
.type("Foo::Bar")
.properties(Map.of(
"Fred", "Thud"))
.build();
Aspects.of(stack).add(new MyAspect());
}
}
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnResourceProps.Builder
A builder for
CfnResourceProps |
static class |
CfnResourceProps.Jsii$Proxy
An implementation for
CfnResourceProps |
| Modifier and Type | Method and Description |
|---|---|
static CfnResourceProps.Builder |
builder() |
default Map<String,Object> |
getProperties()
(experimental) Resource properties.
|
String |
getType()
(experimental) CloudFormation resource type (e.g.
|
@Stability(value=Experimental) @NotNull String getType()
@Stability(value=Experimental) @Nullable default Map<String,Object> getProperties()
Default: - No resource properties.
@Stability(value=Experimental) static CfnResourceProps.Builder builder()
CfnResourceProps.Builder of CfnResourcePropsCopyright © 2022. All rights reserved.