Class: AWSCDK::EKS::CfnClusterProps

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

Overview

Properties for defining a CfnCluster.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resources_vpc_config:, role_arn:, access_config: nil, bootstrap_self_managed_addons: nil, compute_config: nil, control_plane_scaling_config: nil, deletion_protection: nil, encryption_config: nil, force: nil, kubernetes_network_config: nil, logging: nil, name: nil, outpost_config: nil, remote_network_config: nil, storage_config: nil, tags: nil, upgrade_policy: nil, version: nil, zonal_shift_config: nil) ⇒ CfnClusterProps

Returns a new instance of CfnClusterProps.

Parameters:



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'eks/cfn_cluster_props.rb', line 28

def initialize(resources_vpc_config:, role_arn:, access_config: nil, bootstrap_self_managed_addons: nil, compute_config: nil, control_plane_scaling_config: nil, deletion_protection: nil, encryption_config: nil, force: nil, kubernetes_network_config: nil, logging: nil, name: nil, outpost_config: nil, remote_network_config: nil, storage_config: nil, tags: nil, upgrade_policy: nil, version: nil, zonal_shift_config: nil)
  @resources_vpc_config = resources_vpc_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::ResourcesVPCConfigProperty.new(**resources_vpc_config.transform_keys(&:to_sym)) : resources_vpc_config
  Jsii::Type.check_type(@resources_vpc_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5SZXNvdXJjZXNWcGNDb25maWdQcm9wZXJ0eSJ9XX19")), "resourcesVpcConfig")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "roleArn")
  @access_config = access_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::AccessConfigProperty.new(**access_config.transform_keys(&:to_sym)) : access_config
  Jsii::Type.check_type(@access_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5BY2Nlc3NDb25maWdQcm9wZXJ0eSJ9XX19")), "accessConfig") unless @access_config.nil?
  @bootstrap_self_managed_addons = bootstrap_self_managed_addons
  Jsii::Type.check_type(@bootstrap_self_managed_addons, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "bootstrapSelfManagedAddons") unless @bootstrap_self_managed_addons.nil?
  @compute_config = compute_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::ComputeConfigProperty.new(**compute_config.transform_keys(&:to_sym)) : compute_config
  Jsii::Type.check_type(@compute_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5Db21wdXRlQ29uZmlnUHJvcGVydHkifV19fQ==")), "computeConfig") unless @compute_config.nil?
  @control_plane_scaling_config = control_plane_scaling_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::ControlPlaneScalingConfigProperty.new(**control_plane_scaling_config.transform_keys(&:to_sym)) : control_plane_scaling_config
  Jsii::Type.check_type(@control_plane_scaling_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5Db250cm9sUGxhbmVTY2FsaW5nQ29uZmlnUHJvcGVydHkifV19fQ==")), "controlPlaneScalingConfig") unless @control_plane_scaling_config.nil?
  @deletion_protection = deletion_protection
  Jsii::Type.check_type(@deletion_protection, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "deletionProtection") unless @deletion_protection.nil?
  @encryption_config = encryption_config
  Jsii::Type.check_type(@encryption_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkNmbkNsdXN0ZXIuRW5jcnlwdGlvbkNvbmZpZ1Byb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "encryptionConfig") unless @encryption_config.nil?
  @force = force
  Jsii::Type.check_type(@force, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "force") unless @force.nil?
  @kubernetes_network_config = kubernetes_network_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::KubernetesNetworkConfigProperty.new(**kubernetes_network_config.transform_keys(&:to_sym)) : kubernetes_network_config
  Jsii::Type.check_type(@kubernetes_network_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5LdWJlcm5ldGVzTmV0d29ya0NvbmZpZ1Byb3BlcnR5In1dfX0=")), "kubernetesNetworkConfig") unless @kubernetes_network_config.nil?
  @logging = logging.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::LoggingProperty.new(**logging.transform_keys(&:to_sym)) : logging
  Jsii::Type.check_type(@logging, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5Mb2dnaW5nUHJvcGVydHkifV19fQ==")), "logging") unless @logging.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @outpost_config = outpost_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::OutpostConfigProperty.new(**outpost_config.transform_keys(&:to_sym)) : outpost_config
  Jsii::Type.check_type(@outpost_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5PdXRwb3N0Q29uZmlnUHJvcGVydHkifV19fQ==")), "outpostConfig") unless @outpost_config.nil?
  @remote_network_config = remote_network_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::RemoteNetworkConfigProperty.new(**remote_network_config.transform_keys(&:to_sym)) : remote_network_config
  Jsii::Type.check_type(@remote_network_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5SZW1vdGVOZXR3b3JrQ29uZmlnUHJvcGVydHkifV19fQ==")), "remoteNetworkConfig") unless @remote_network_config.nil?
  @storage_config = storage_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::StorageConfigProperty.new(**storage_config.transform_keys(&:to_sym)) : storage_config
  Jsii::Type.check_type(@storage_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5TdG9yYWdlQ29uZmlnUHJvcGVydHkifV19fQ==")), "storageConfig") unless @storage_config.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @upgrade_policy = upgrade_policy.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::UpgradePolicyProperty.new(**upgrade_policy.transform_keys(&:to_sym)) : upgrade_policy
  Jsii::Type.check_type(@upgrade_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5VcGdyYWRlUG9saWN5UHJvcGVydHkifV19fQ==")), "upgradePolicy") unless @upgrade_policy.nil?
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") unless @version.nil?
  @zonal_shift_config = zonal_shift_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::ZonalShiftConfigProperty.new(**zonal_shift_config.transform_keys(&:to_sym)) : zonal_shift_config
  Jsii::Type.check_type(@zonal_shift_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5ab25hbFNoaWZ0Q29uZmlnUHJvcGVydHkifV19fQ==")), "zonalShiftConfig") unless @zonal_shift_config.nil?
end

Instance Attribute Details

#access_configAWSCDK::IResolvable, ... (readonly)

The access configuration for the cluster.



87
88
89
# File 'eks/cfn_cluster_props.rb', line 87

def access_config
  @access_config
end

#bootstrap_self_managed_addonsBoolean, ... (readonly)

If you set this value to False when creating a cluster, the default networking add-ons will not be installed.

The default networking add-ons include vpc-cni , coredns , and kube-proxy .

Use this option when you plan to install third-party alternative add-ons or self-manage the default networking add-ons.



96
97
98
# File 'eks/cfn_cluster_props.rb', line 96

def bootstrap_self_managed_addons
  @bootstrap_self_managed_addons
end

#compute_configAWSCDK::IResolvable, ... (readonly)

Indicates the current configuration of the compute capability on your EKS Auto Mode cluster.

For example, if the capability is enabled or disabled. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your AWS account. For more information, see EKS Auto Mode compute capability in the Amazon EKS User Guide .



103
104
105
# File 'eks/cfn_cluster_props.rb', line 103

def compute_config
  @compute_config
end

#control_plane_scaling_configAWSCDK::IResolvable, ... (readonly)

The control plane scaling tier configuration.

For more information, see EKS Provisioned Control Plane in the Amazon EKS User Guide.



110
111
112
# File 'eks/cfn_cluster_props.rb', line 110

def control_plane_scaling_config
  @control_plane_scaling_config
end

#deletion_protectionBoolean, ... (readonly)

The current deletion protection setting for the cluster.

When true , deletion protection is enabled and the cluster cannot be deleted until protection is disabled. When false , the cluster can be deleted normally. This setting only applies to clusters in an active state.



117
118
119
# File 'eks/cfn_cluster_props.rb', line 117

def deletion_protection
  @deletion_protection
end

#encryption_configAWSCDK::IResolvable, ... (readonly)

The encryption configuration for the cluster.



122
123
124
# File 'eks/cfn_cluster_props.rb', line 122

def encryption_config
  @encryption_config
end

#forceBoolean, ... (readonly)

Note:

Default: - false

Set this value to true to override upgrade-blocking readiness checks when updating a cluster.



128
129
130
# File 'eks/cfn_cluster_props.rb', line 128

def force
  @force
end

#kubernetes_network_configAWSCDK::IResolvable, ... (readonly)

The Kubernetes network configuration for the cluster.



133
134
135
# File 'eks/cfn_cluster_props.rb', line 133

def kubernetes_network_config
  @kubernetes_network_config
end

#loggingAWSCDK::IResolvable, ... (readonly)

The logging configuration for your cluster.



138
139
140
# File 'eks/cfn_cluster_props.rb', line 138

def logging
  @logging
end

#nameString? (readonly)

The unique name to give to your cluster.

The name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphanumeric character and can't be longer than 100 characters. The name must be unique within the AWS Region and AWS account that you're creating the cluster in. Note that underscores can't be used in CloudFormation .



145
146
147
# File 'eks/cfn_cluster_props.rb', line 145

def name
  @name
end

#outpost_configAWSCDK::IResolvable, ... (readonly)

An object representing the configuration of your local Amazon EKS cluster on an AWS Outpost.

This object isn't available for clusters on the AWS cloud.



152
153
154
# File 'eks/cfn_cluster_props.rb', line 152

def outpost_config
  @outpost_config
end

#remote_network_configAWSCDK::IResolvable, ... (readonly)

The configuration in the cluster for EKS Hybrid Nodes.

You can add, change, or remove this configuration after the cluster is created.



159
160
161
# File 'eks/cfn_cluster_props.rb', line 159

def remote_network_config
  @remote_network_config
end

#resources_vpc_configAWSCDK::IResolvable, AWSCDK::EKS::CfnCluster::ResourcesVPCConfigProperty (readonly)

The VPC configuration that's used by the cluster control plane.

Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and Cluster Security Group Considerations in the Amazon EKS User Guide . You must specify at least two subnets. You can specify up to five security groups, but we recommend that you use a dedicated security group for your cluster control plane.



75
76
77
# File 'eks/cfn_cluster_props.rb', line 75

def resources_vpc_config
  @resources_vpc_config
end

#role_arnString, AWSCDK::Interfaces::AWSIAM::IRoleRef (readonly)

The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

For more information, see Amazon EKS Service IAM Role in the Amazon EKS User Guide .



82
83
84
# File 'eks/cfn_cluster_props.rb', line 82

def role_arn
  @role_arn
end

#storage_configAWSCDK::IResolvable, ... (readonly)

Indicates the current configuration of the block storage capability on your EKS Auto Mode cluster.

For example, if the capability is enabled or disabled. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your AWS account. For more information, see EKS Auto Mode block storage capability in the Amazon EKS User Guide .



166
167
168
# File 'eks/cfn_cluster_props.rb', line 166

def storage_config
  @storage_config
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The metadata that you apply to the cluster to assist with categorization and organization.

Each tag consists of a key and an optional value, both of which you define. Cluster tags don't propagate to any other resources associated with the cluster.

You must have the eks:TagResource and eks:UntagResource permissions for your IAM principal to manage the CloudFormation stack. If you don't have these permissions, there might be unexpected behavior with stack-level tags propagating to the resource during resource creation and update.



175
176
177
# File 'eks/cfn_cluster_props.rb', line 175

def tags
  @tags
end

#upgrade_policyAWSCDK::IResolvable, ... (readonly)

This value indicates if extended support is enabled or disabled for the cluster.

Learn more about EKS Extended Support in the Amazon EKS User Guide .



182
183
184
# File 'eks/cfn_cluster_props.rb', line 182

def upgrade_policy
  @upgrade_policy
end

#versionString? (readonly)

The desired Kubernetes version for your cluster.

If you don't specify a value here, the default version available in Amazon EKS is used.

The default version might not be the latest version available.



191
192
193
# File 'eks/cfn_cluster_props.rb', line 191

def version
  @version
end

#zonal_shift_configAWSCDK::IResolvable, ... (readonly)

The configuration for zonal shift for the cluster.



196
197
198
# File 'eks/cfn_cluster_props.rb', line 196

def zonal_shift_config
  @zonal_shift_config
end

Class Method Details

.jsii_propertiesObject



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'eks/cfn_cluster_props.rb', line 198

def self.jsii_properties
  {
    :resources_vpc_config => "resourcesVpcConfig",
    :role_arn => "roleArn",
    :access_config => "accessConfig",
    :bootstrap_self_managed_addons => "bootstrapSelfManagedAddons",
    :compute_config => "computeConfig",
    :control_plane_scaling_config => "controlPlaneScalingConfig",
    :deletion_protection => "deletionProtection",
    :encryption_config => "encryptionConfig",
    :force => "force",
    :kubernetes_network_config => "kubernetesNetworkConfig",
    :logging => "logging",
    :name => "name",
    :outpost_config => "outpostConfig",
    :remote_network_config => "remoteNetworkConfig",
    :storage_config => "storageConfig",
    :tags => "tags",
    :upgrade_policy => "upgradePolicy",
    :version => "version",
    :zonal_shift_config => "zonalShiftConfig",
  }
end

Instance Method Details

#to_jsiiObject



222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'eks/cfn_cluster_props.rb', line 222

def to_jsii
  result = {}
  result.merge!({
    "resourcesVpcConfig" => @resources_vpc_config,
    "roleArn" => @role_arn,
    "accessConfig" => @access_config,
    "bootstrapSelfManagedAddons" => @bootstrap_self_managed_addons,
    "computeConfig" => @compute_config,
    "controlPlaneScalingConfig" => @control_plane_scaling_config,
    "deletionProtection" => @deletion_protection,
    "encryptionConfig" => @encryption_config,
    "force" => @force,
    "kubernetesNetworkConfig" => @kubernetes_network_config,
    "logging" => @logging,
    "name" => @name,
    "outpostConfig" => @outpost_config,
    "remoteNetworkConfig" => @remote_network_config,
    "storageConfig" => @storage_config,
    "tags" => @tags,
    "upgradePolicy" => @upgrade_policy,
    "version" => @version,
    "zonalShiftConfig" => @zonal_shift_config,
  })
  result.compact
end