@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:49.071Z") public class KubernetesObjectValue extends Construct
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();
Modifier and Type | Class and Description |
---|---|
static class |
KubernetesObjectValue.Builder
A fluent builder for
KubernetesObjectValue . |
IConstruct.Jsii$Default, IConstruct.Jsii$Proxy
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RESOURCE_TYPE
The CloudFormation reosurce type.
|
Modifier | Constructor and Description |
---|---|
protected |
KubernetesObjectValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
KubernetesObjectValue(software.amazon.jsii.JsiiObjectRef objRef) |
|
KubernetesObjectValue(software.constructs.Construct scope,
java.lang.String id,
KubernetesObjectValueProps props) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getValue()
The value as a string token.
|
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String RESOURCE_TYPE
protected KubernetesObjectValue(software.amazon.jsii.JsiiObjectRef objRef)
protected KubernetesObjectValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public KubernetesObjectValue(software.constructs.Construct scope, java.lang.String id, KubernetesObjectValueProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.