Class: AWSCDK::EKSv2::KubectlProvider

Inherits:
Constructs::Construct
  • Object
show all
Includes:
IKubectlProvider
Defined in:
ek_sv2/kubectl_provider.rb

Overview

Implementation of Kubectl Lambda.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props) ⇒ KubectlProvider

Returns a new instance of KubectlProvider.

Parameters:



12
13
14
15
16
17
18
# File 'ek_sv2/kubectl_provider.rb', line 12

def initialize(scope, id, props)
  props = props.is_a?(Hash) ? ::AWSCDK::EKSv2::KubectlProviderProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkt1YmVjdGxQcm92aWRlclByb3BzIn0=")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props)
end

Class Method Details

.from_kubectl_provider_attributes(scope, id, attrs) ⇒ AWSCDK::EKSv2::IKubectlProvider

Import an existing provider.

Parameters:

Returns:



36
37
38
39
40
41
42
# File 'ek_sv2/kubectl_provider.rb', line 36

def self.from_kubectl_provider_attributes(scope, id, attrs)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  attrs = attrs.is_a?(Hash) ? ::AWSCDK::EKSv2::KubectlProviderAttributes.new(**attrs.transform_keys(&:to_sym)) : attrs
  Jsii::Type.check_type(attrs, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkt1YmVjdGxQcm92aWRlckF0dHJpYnV0ZXMifQ==")), "attrs")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_eks_v2.KubectlProvider", "fromKubectlProviderAttributes", [scope, id, attrs])
end

.get_kubectl_provider(scope, cluster) ⇒ AWSCDK::EKSv2::IKubectlProvider?

Take existing provider on cluster.

Parameters:

Returns:



49
50
51
52
53
# File 'ek_sv2/kubectl_provider.rb', line 49

def self.get_kubectl_provider(scope, cluster)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLklDbHVzdGVyIn0=")), "cluster")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_eks_v2.KubectlProvider", "getKubectlProvider", [scope, cluster])
end

.jsii_overridable_methodsObject



20
21
22
23
24
25
26
27
28
# File 'ek_sv2/kubectl_provider.rb', line 20

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :service_token => { kind: :property, name: "serviceToken", is_optional: false },
    :role => { kind: :property, name: "role", is_optional: true },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
  }
end

Instance Method Details

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


58
59
60
# File 'ek_sv2/kubectl_provider.rb', line 58

def node()
  jsii_get_property("node")
end

#roleAWSCDK::IAM::IRole?

The IAM execution role of the handler.

Returns:



72
73
74
# File 'ek_sv2/kubectl_provider.rb', line 72

def role()
  jsii_get_property("role")
end

#service_tokenString

The custom resource provider's service token.

Returns:

  • (String)


65
66
67
# File 'ek_sv2/kubectl_provider.rb', line 65

def service_token()
  jsii_get_property("serviceToken")
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


79
80
81
# File 'ek_sv2/kubectl_provider.rb', line 79

def to_string()
  jsii_call_method("toString", [])
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



92
93
94
95
96
97
# File 'ek_sv2/kubectl_provider.rb', line 92

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end