Package org.cdk8s
Class ApiObjectMetadataDefinition
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- org.cdk8s.ApiObjectMetadataDefinition
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.106.0 (build e852934)", date="2024-12-31T06:16:49.781Z") @Stability(Stable) public class ApiObjectMetadataDefinition extends software.amazon.jsii.JsiiObject
Object metadata.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ApiObjectMetadataDefinition.Builder
A fluent builder forApiObjectMetadataDefinition
.
-
Constructor Summary
Constructors Modifier Constructor Description ApiObjectMetadataDefinition(ApiObjectMetadataDefinitionOptions options)
protected
ApiObjectMetadataDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected
ApiObjectMetadataDefinition(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String key, Object value)
Adds an arbitrary key/value to the object metadata.void
addAnnotation(String key, String value)
Add an annotation.void
addFinalizers(@NotNull String... finalizers)
Add one or more finalizers.void
addLabel(String key, String value)
Add a label.void
addOwnerReference(OwnerReference owner)
Add an owner.String
getLabel(String key)
String
getName()
The name of the API object.String
getNamespace()
The object's namespace.Object
toJson()
Synthesizes a k8s ObjectMeta for this metadata set.-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
ApiObjectMetadataDefinition
protected ApiObjectMetadataDefinition(software.amazon.jsii.JsiiObjectRef objRef)
-
ApiObjectMetadataDefinition
protected ApiObjectMetadataDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
ApiObjectMetadataDefinition
@Stability(Stable) public ApiObjectMetadataDefinition(@NotNull ApiObjectMetadataDefinitionOptions options)
- Parameters:
options
- This parameter is required.
-
-
Method Detail
-
add
@Stability(Stable) public void add(@NotNull String key, @NotNull Object value)
Adds an arbitrary key/value to the object metadata.- Parameters:
key
- Metadata key. This parameter is required.value
- Metadata value. This parameter is required.
-
addAnnotation
@Stability(Stable) public void addAnnotation(@NotNull String key, @NotNull String value)
Add an annotation.- Parameters:
key
-- The key.
value
-- The value.
-
addFinalizers
@Stability(Stable) public void addFinalizers(@NotNull @NotNull String... finalizers)
Add one or more finalizers.- Parameters:
finalizers
- the finalizers. This parameter is required.
-
addLabel
@Stability(Stable) public void addLabel(@NotNull String key, @NotNull String value)
Add a label.- Parameters:
key
-- The key.
value
-- The value.
-
addOwnerReference
@Stability(Stable) public void addOwnerReference(@NotNull OwnerReference owner)
Add an owner.- Parameters:
owner
- the owner. This parameter is required.
-
getLabel
@Stability(Stable) @Nullable public String getLabel(@NotNull String key)
- Parameters:
key
- the label. This parameter is required.- Returns:
- a value of a label or undefined
-
toJson
@Stability(Stable) @NotNull public Object toJson()
Synthesizes a k8s ObjectMeta for this metadata set.
-
getName
@Stability(Stable) @Nullable public String getName()
The name of the API object.If a name is specified in
metadata.name
this will be the name returned. Otherwise, a name will be generated by callingChart.of(this).generatedObjectName(this)
, which by default uses the construct path to generate a DNS-compatible name for the resource.
-
getNamespace
@Stability(Stable) @Nullable public String getNamespace()
The object's namespace.
-
-