Show / Hide Table of Contents

Class KubernetesObjectValueProps

Properties for KubernetesObjectValue.

Inheritance
System.Object
KubernetesObjectValueProps
Implements
IKubernetesObjectValueProps
Namespace: Amazon.CDK.AWS.EKS
Assembly: Amazon.CDK.AWS.EKS.dll
Syntax (csharp)
public class KubernetesObjectValueProps : Object, IKubernetesObjectValueProps
Syntax (vb)
Public Class KubernetesObjectValueProps
    Inherits Object
    Implements IKubernetesObjectValueProps
Remarks

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

KubernetesObjectValueProps()

Properties

Cluster

The EKS cluster to fetch attributes from.

JsonPath

JSONPath to the specific value.

ObjectName

The name of the object to query.

ObjectNamespace

The namespace the object belongs to.

ObjectType

The object type to query.

Timeout

Timeout for waiting on a value.

Constructors

KubernetesObjectValueProps()

public KubernetesObjectValueProps()

Properties

Cluster

The EKS cluster to fetch attributes from.

public ICluster Cluster { get; set; }
Property Value

ICluster

Remarks

[disable-awslint:ref-via-interface]

JsonPath

JSONPath to the specific value.

public string JsonPath { get; set; }
Property Value

System.String

Remarks

See: https://kubernetes.io/docs/reference/kubectl/jsonpath/

ObjectName

The name of the object to query.

public string ObjectName { get; set; }
Property Value

System.String

ObjectNamespace

The namespace the object belongs to.

public string ObjectNamespace { get; set; }
Property Value

System.String

Remarks

Default: 'default'

ObjectType

The object type to query.

public string ObjectType { get; set; }
Property Value

System.String

Remarks

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

Timeout

Timeout for waiting on a value.

public Duration Timeout { get; set; }
Property Value

Duration

Remarks

Default: Duration.minutes(5)

Implements

IKubernetesObjectValueProps
Back to top Generated by DocFX