Class: AWSCDK::EKS::KubernetesObjectValueProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
eks/kubernetes_object_value_props.rb

Overview

Properties for KubernetesObjectValue.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cluster:, json_path:, object_name:, object_type:, object_namespace: nil, removal_policy: nil, timeout: nil) ⇒ KubernetesObjectValueProps

Returns a new instance of KubernetesObjectValueProps.

Parameters:

  • cluster (AWSCDK::EKS::ICluster)

    The EKS cluster to fetch attributes from.

  • json_path (String)

    JSONPath to the specific value.

  • object_name (String)

    The name of the object to query.

  • object_type (String)

    The object type to query.

  • object_namespace (String, nil) (defaults to: nil)

    The namespace the object belongs to.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    The removal policy applied to the custom resource that manages the Kubernetes object value.

  • timeout (AWSCDK::Duration, nil) (defaults to: nil)

    Timeout for waiting on a value.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'eks/kubernetes_object_value_props.rb', line 14

def initialize(cluster:, json_path:, object_name:, object_type:, object_namespace: nil, removal_policy: nil, timeout: nil)
  @cluster = cluster
  Jsii::Type.check_type(@cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLklDbHVzdGVyIn0=")), "cluster")
  @json_path = json_path
  Jsii::Type.check_type(@json_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jsonPath")
  @object_name = object_name
  Jsii::Type.check_type(@object_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectName")
  @object_type = object_type
  Jsii::Type.check_type(@object_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectType")
  @object_namespace = object_namespace
  Jsii::Type.check_type(@object_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectNamespace") unless @object_namespace.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil?
end

Instance Attribute Details

#clusterAWSCDK::EKS::ICluster (readonly)

The EKS cluster to fetch attributes from.

[disable-awslint:ref-via-interface]



36
37
38
# File 'eks/kubernetes_object_value_props.rb', line 36

def cluster
  @cluster
end

#json_pathString (readonly)

JSONPath to the specific value.



41
42
43
# File 'eks/kubernetes_object_value_props.rb', line 41

def json_path
  @json_path
end

#object_nameString (readonly)

The name of the object to query.

Returns:

  • (String)


45
46
47
# File 'eks/kubernetes_object_value_props.rb', line 45

def object_name
  @object_name
end

#object_namespaceString? (readonly)

Note:

Default: 'default'

The namespace the object belongs to.

Returns:

  • (String, nil)


56
57
58
# File 'eks/kubernetes_object_value_props.rb', line 56

def object_namespace
  @object_namespace
end

#object_typeString (readonly)

The object type to query.

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

Returns:

  • (String)


51
52
53
# File 'eks/kubernetes_object_value_props.rb', line 51

def object_type
  @object_type
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: RemovalPolicy.DESTROY

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

Returns:



68
69
70
# File 'eks/kubernetes_object_value_props.rb', line 68

def removal_policy
  @removal_policy
end

#timeoutAWSCDK::Duration? (readonly)

Note:

Default: Duration.minutes(5)

Timeout for waiting on a value.

Returns:



73
74
75
# File 'eks/kubernetes_object_value_props.rb', line 73

def timeout
  @timeout
end

Class Method Details

.jsii_propertiesObject



75
76
77
78
79
80
81
82
83
84
85
# File 'eks/kubernetes_object_value_props.rb', line 75

def self.jsii_properties
  {
    :cluster => "cluster",
    :json_path => "jsonPath",
    :object_name => "objectName",
    :object_type => "objectType",
    :object_namespace => "objectNamespace",
    :removal_policy => "removalPolicy",
    :timeout => "timeout",
  }
end

Instance Method Details

#to_jsiiObject



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'eks/kubernetes_object_value_props.rb', line 87

def to_jsii
  result = {}
  result.merge!({
    "cluster" => @cluster,
    "jsonPath" => @json_path,
    "objectName" => @object_name,
    "objectType" => @object_type,
    "objectNamespace" => @object_namespace,
    "removalPolicy" => @removal_policy,
    "timeout" => @timeout,
  })
  result.compact
end