Class KubernetesObjectValue
Represents a value of a specific object deployed in the cluster.
Inherited Members
Namespace: Amazon.CDK.AWS.EKS
Assembly: Amazon.CDK.AWS.EKS.dll
Syntax (csharp)
public class KubernetesObjectValue : Construct, IConstruct, IDependable
Syntax (vb)
Public Class KubernetesObjectValue
Inherits Construct
Implements IConstruct, IDependable
Remarks
Use this to fetch any information available by the kubectl get
command.
ExampleMetadata: infused
Examples
Cluster cluster;
// query the load balancer address
var myServiceAddress = new KubernetesObjectValue(this, "LoadBalancerAttribute", new KubernetesObjectValueProps {
Cluster = cluster,
ObjectType = "service",
ObjectName = "my-service",
JsonPath = ".status.loadBalancer.ingress[0].hostname"
});
// pass the address to a lambda function
var proxyFunction = new Function(this, "ProxyFunction", new FunctionProps {
Handler = "index.handler",
Code = Code.FromInline("my-code"),
Runtime = Runtime.NODEJS_14_X,
Environment = new Dictionary<string, string> {
{ "myServiceAddress", myServiceAddress.Value }
}
});
Synopsis
Constructors
KubernetesObjectValue(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
KubernetesObjectValue(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
KubernetesObjectValue(Construct, String, IKubernetesObjectValueProps) |
Properties
RESOURCE_TYPE | The CloudFormation reosurce type. |
Value | The value as a string token. |
Constructors
KubernetesObjectValue(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected KubernetesObjectValue(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
KubernetesObjectValue(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected KubernetesObjectValue(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
KubernetesObjectValue(Construct, String, IKubernetesObjectValueProps)
public KubernetesObjectValue(Construct scope, string id, IKubernetesObjectValueProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IKubernetesObjectValueProps
Properties
RESOURCE_TYPE
The CloudFormation reosurce type.
public static string RESOURCE_TYPE { get; }
Property Value
System.String
Value
The value as a string token.
public virtual string Value { get; }
Property Value
System.String
Implements
Constructs.IConstruct