Class KubernetesObjectValue
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.services.eks.KubernetesObjectValue
- All Implemented Interfaces:
IConstruct,IDependable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.640Z")
@Stability(Stable)
public class KubernetesObjectValue
extends 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_14_X)
.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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default, IConstruct.Jsii$ProxyNested 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.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
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 reosurce 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.
-