Interface KubernetesObjectValueProps

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

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:37.919Z") @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'

    • 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