Interface KubernetesObjectValueProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
KubernetesObjectValueProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-09T14:39:10.764Z") @Stability(Stable) public interface KubernetesObjectValueProps extends software.amazon.jsii.JsiiSerializable
Properties for KubernetesObjectValue.

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();
 
  • Method Details

    • getCluster

      @Stability(Stable) @NotNull ICluster getCluster()
      The EKS cluster to fetch attributes from.

      [disable-awslint:ref-via-interface]

    • getJsonPath

      @Stability(Stable) @NotNull String getJsonPath()
      JSONPath to the specific value.

      See Also:
    • getObjectName

      @Stability(Stable) @NotNull String getObjectName()
      The name of the object to query.
    • getObjectType

      @Stability(Stable) @NotNull String getObjectType()
      The object type to query.

      (e.g 'service', 'pod'...)

    • getObjectNamespace

      @Stability(Stable) @Nullable default String getObjectNamespace()
      The namespace the object belongs to.

      Default: 'default'

    • getRemovalPolicy

      @Stability(Stable) @Nullable default RemovalPolicy getRemovalPolicy()
      The removal policy applied to the custom resource that manages the Kubernetes object value.

      The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations:

      • The resource is removed from the template, so CloudFormation stops managing it
      • A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
      • The stack is deleted, so CloudFormation stops managing all resources in it

      Default: RemovalPolicy.DESTROY

    • getTimeout

      @Stability(Stable) @Nullable default Duration getTimeout()
      Timeout for waiting on a value.

      Default: Duration.minutes(5)

    • builder

      @Stability(Stable) static KubernetesObjectValueProps.Builder builder()
      Returns:
      a KubernetesObjectValueProps.Builder of KubernetesObjectValueProps