Class KubernetesObjectValue
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.eks.KubernetesObjectValue
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:40:51.385Z")
@Stability(Stable)
public class KubernetesObjectValue
extends software.constructs.Construct
Represents a value of a specific object deployed in the cluster.
Use this to fetch any information available by the kubectl get command.
Example:
Cluster cluster;
// query the load balancer address
KubernetesObjectValue myServiceAddress = KubernetesObjectValue.Builder.create(this, "LoadBalancerAttribute")
.cluster(cluster)
.objectType("service")
.objectName("my-service")
.jsonPath(".status.loadBalancer.ingress[0].hostname")
.build();
// pass the address to a lambda function
Function proxyFunction = Function.Builder.create(this, "ProxyFunction")
.handler("index.handler")
.code(Code.fromInline("my-code"))
.runtime(Runtime.NODEJS_LATEST)
.environment(Map.of(
"myServiceAddress", myServiceAddress.getValue()))
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedKubernetesObjectValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedKubernetesObjectValue(software.amazon.jsii.JsiiObjectRef objRef) KubernetesObjectValue(software.constructs.Construct scope, String id, KubernetesObjectValueProps props) -
Method Summary
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
RESOURCE_TYPE
The CloudFormation resource type.
-
-
Constructor Details
-
KubernetesObjectValue
protected KubernetesObjectValue(software.amazon.jsii.JsiiObjectRef objRef) -
KubernetesObjectValue
protected KubernetesObjectValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
KubernetesObjectValue
@Stability(Stable) public KubernetesObjectValue(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull KubernetesObjectValueProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
getValue
The value as a string token.
-