KubernetesObjectValueProps
- class aws_cdk.aws_eks_v2_alpha.KubernetesObjectValueProps(*, cluster, json_path, object_name, object_type, object_namespace=None, removal_policy=None, timeout=None)
Bases:
object(experimental) Properties for KubernetesObjectValue.
- Parameters:
cluster (
ICluster) – (experimental) The EKS cluster to fetch attributes from. [disable-awslint:ref-via-interface]json_path (
str) – (experimental) JSONPath to the specific value.object_name (
str) – (experimental) The name of the object to query.object_type (
str) – (experimental) The object type to query. (e.g ‘service’, ‘pod’…)object_namespace (
Optional[str]) – (experimental) The namespace the object belongs to. Default: ‘default’removal_policy (
Optional[RemovalPolicy]) – (experimental) 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.DESTROYtimeout (
Optional[Duration]) – (experimental) Timeout for waiting on a value. Default: Duration.minutes(5)
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# cluster: eks.Cluster # query the load balancer address my_service_address = eks.KubernetesObjectValue(self, "LoadBalancerAttribute", cluster=cluster, object_type="service", object_name="my-service", json_path=".status.loadBalancer.ingress[0].hostname" ) # pass the address to a lambda function proxy_function = lambda_.Function(self, "ProxyFunction", handler="index.handler", code=lambda_.Code.from_inline("my-code"), runtime=lambda_.Runtime.NODEJS_LATEST, environment={ "my_service_address": my_service_address.value } )
Attributes
- cluster
(experimental) The EKS cluster to fetch attributes from.
[disable-awslint:ref-via-interface]
- Stability:
experimental
- json_path
(experimental) JSONPath to the specific value.
- See:
- Stability:
experimental
- object_name
(experimental) The name of the object to query.
- Stability:
experimental
- object_namespace
(experimental) The namespace the object belongs to.
- Default:
‘default’
- Stability:
experimental
- object_type
(experimental) The object type to query.
(e.g ‘service’, ‘pod’…)
- Stability:
experimental
- removal_policy
(experimental) 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
- Stability:
experimental
- timeout
(experimental) Timeout for waiting on a value.
- Default:
Duration.minutes(5)
- Stability:
experimental