Class: AWSCDK::Batch::CfnComputeEnvironment::EKSConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
batch/cfn_compute_environment.rb

Overview

Configuration for the Amazon EKS cluster that supports the AWS Batch compute environment.

The cluster must exist before the compute environment can be created.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(eks_cluster_arn:, kubernetes_namespace:) ⇒ EKSConfigurationProperty

Returns a new instance of EKSConfigurationProperty.

Parameters:

  • eks_cluster_arn (String)

    The Amazon Resource Name (ARN) of the Amazon EKS cluster.

  • kubernetes_namespace (String)

    The namespace of the Amazon EKS cluster.



1145
1146
1147
1148
1149
1150
# File 'batch/cfn_compute_environment.rb', line 1145

def initialize(eks_cluster_arn:, kubernetes_namespace:)
  @eks_cluster_arn = eks_cluster_arn
  Jsii::Type.check_type(@eks_cluster_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eksClusterArn")
  @kubernetes_namespace = kubernetes_namespace
  Jsii::Type.check_type(@kubernetes_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kubernetesNamespace")
end

Instance Attribute Details

#eks_cluster_arnString (readonly)

The Amazon Resource Name (ARN) of the Amazon EKS cluster.

An example is arn: *aws* :eks: *us-east-1* : *123456789012* :cluster/ *ClusterForBatch* .



1158
1159
1160
# File 'batch/cfn_compute_environment.rb', line 1158

def eks_cluster_arn
  @eks_cluster_arn
end

#kubernetes_namespaceString (readonly)

The namespace of the Amazon EKS cluster.

AWS Batch manages pods in this namespace. The value can't left empty or null. It must be fewer than 64 characters long, can't be set to default , can't start with " kube- ," and must match this regular expression: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ . For more information, see Namespaces in the Kubernetes documentation.



1165
1166
1167
# File 'batch/cfn_compute_environment.rb', line 1165

def kubernetes_namespace
  @kubernetes_namespace
end

Class Method Details

.jsii_propertiesObject



1167
1168
1169
1170
1171
1172
# File 'batch/cfn_compute_environment.rb', line 1167

def self.jsii_properties
  {
    :eks_cluster_arn => "eksClusterArn",
    :kubernetes_namespace => "kubernetesNamespace",
  }
end

Instance Method Details

#to_jsiiObject



1174
1175
1176
1177
1178
1179
1180
1181
# File 'batch/cfn_compute_environment.rb', line 1174

def to_jsii
  result = {}
  result.merge!({
    "eksClusterArn" => @eks_cluster_arn,
    "kubernetesNamespace" => @kubernetes_namespace,
  })
  result.compact
end