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.103.1 (build bef2dea)", date="2024-10-25T14:21:15.026Z") @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 Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for KubernetesObjectValue.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The CloudFormation reosurce type.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    KubernetesObjectValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    KubernetesObjectValue(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    KubernetesObjectValue(software.constructs.Construct scope, String id, KubernetesObjectValueProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The value as a string token.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • RESOURCE_TYPE

      @Stability(Stable) public static final String 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

      @Stability(Stable) @NotNull public String getValue()
      The value as a string token.