@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-13T17:18:47.420Z") @Stability(value=Stable) public class ApiObject extends software.constructs.Construct
Modifier and Type | Class and Description |
---|---|
static class |
ApiObject.Builder
A fluent builder for
ApiObject . |
Modifier | Constructor and Description |
---|---|
|
ApiObject(software.constructs.Construct scope,
String id,
ApiObjectProps props)
Defines an API object.
|
protected |
ApiObject(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ApiObject(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
void |
addDependency(software.constructs.IConstruct... dependencies)
Create a dependency between this ApiObject and other constructs.
|
void |
addJsonPatch(JsonPatch... ops)
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
|
String |
getApiGroup()
The group portion of the API version (e.g.
|
String |
getApiVersion()
The object's API version (e.g.
|
Chart |
getChart()
The chart in which this object is defined.
|
String |
getKind()
The object kind.
|
ApiObjectMetadataDefinition |
getMetadata()
Metadata associated with this API object.
|
String |
getName()
The name of the API object.
|
static ApiObject |
of(software.constructs.IConstruct c)
Returns the `ApiObject` named `Resource` which is a child of the given construct.
|
Object |
toJson()
Renders the object to Kubernetes JSON.
|
onPrepare, onSynthesize, onValidate, toString
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
protected ApiObject(software.amazon.jsii.JsiiObjectRef objRef)
protected ApiObject(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) public ApiObject(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ApiObjectProps props)
scope
- the construct scope. This parameter is required.id
- namespace. This parameter is required.props
- options. This parameter is required.@Stability(value=Stable) @NotNull public static ApiObject of(@NotNull software.constructs.IConstruct c)
If c
is an ApiObject
, it is returned directly. Throws an
exception if the construct does not have a child named Default
or if
this child is not an ApiObject
.
c
- The higher-level construct. This parameter is required.@Stability(value=Stable) public void addDependency(@NotNull software.constructs.IConstruct... dependencies)
These can be other ApiObjects, Charts, or custom.
dependencies
- the dependencies to add. This parameter is required.@Stability(value=Stable) public void addJsonPatch(@NotNull JsonPatch... ops)
Example:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 kubePod.addJsonPatch(JsonPatch.replace("/spec/enableServiceLinks", true));
ops
- The JSON-Patch operations to apply. This parameter is required.@Stability(value=Stable) @NotNull public Object toJson()
To disable sorting of dictionary keys in output object set the
CDK8S_DISABLE_SORT
environment variable to any non-empty value.
@Stability(value=Stable) @NotNull public String getApiGroup()
@Stability(value=Stable) @NotNull public String getApiVersion()
@Stability(value=Stable) @NotNull public Chart getChart()
@Stability(value=Stable) @NotNull public String getKind()
@Stability(value=Stable) @NotNull public ApiObjectMetadataDefinition getMetadata()
@Stability(value=Stable) @NotNull public String getName()
If a name is specified in metadata.name
this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this)
, which by default uses the
construct path to generate a DNS-compatible name for the resource.
Copyright © 2021. All rights reserved.