Class: AWSCDK::EKSv2::FargateCluster

Inherits:
Cluster
  • Object
show all
Defined in:
ek_sv2/fargate_cluster.rb

Overview

Defines an EKS cluster that runs entirely on AWS Fargate.

The cluster is created with a default Fargate Profile that matches the "default" and "kube-system" namespaces. You can add additional profiles using add_fargate_profile.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props) ⇒ FargateCluster

Returns a new instance of FargateCluster.

Parameters:



15
16
17
18
19
20
21
# File 'ek_sv2/fargate_cluster.rb', line 15

def initialize(scope, id, props)
  props = props.is_a?(Hash) ? ::AWSCDK::EKSv2::FargateClusterProps.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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkZhcmdhdGVDbHVzdGVyUHJvcHMifQ==")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props)
end

Class Method Details

.jsii_overridable_methodsObject



23
24
25
26
27
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
68
69
70
# File 'ek_sv2/fargate_cluster.rb', line 23

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :physical_name => { kind: :property, name: "physicalName", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :cluster_arn => { kind: :property, name: "clusterArn", is_optional: false },
    :cluster_certificate_authority_data => { kind: :property, name: "clusterCertificateAuthorityData", is_optional: false },
    :cluster_encryption_config_key_arn => { kind: :property, name: "clusterEncryptionConfigKeyArn", is_optional: false },
    :cluster_endpoint => { kind: :property, name: "clusterEndpoint", is_optional: false },
    :cluster_name => { kind: :property, name: "clusterName", is_optional: false },
    :cluster_open_id_connect_issuer_url => { kind: :property, name: "clusterOpenIdConnectIssuerUrl", is_optional: false },
    :cluster_ref => { kind: :property, name: "clusterRef", is_optional: false },
    :cluster_security_group => { kind: :property, name: "clusterSecurityGroup", is_optional: false },
    :cluster_security_group_id => { kind: :property, name: "clusterSecurityGroupId", is_optional: false },
    :connections => { kind: :property, name: "connections", is_optional: false },
    :open_id_connect_provider => { kind: :property, name: "openIdConnectProvider", is_optional: false },
    :prune => { kind: :property, name: "prune", is_optional: false },
    :role => { kind: :property, name: "role", is_optional: false },
    :vpc => { kind: :property, name: "vpc", is_optional: false },
    :alb_controller => { kind: :property, name: "albController", is_optional: true },
    :default_capacity => { kind: :property, name: "defaultCapacity", is_optional: true },
    :default_nodegroup => { kind: :property, name: "defaultNodegroup", is_optional: true },
    :eks_pod_identity_agent => { kind: :property, name: "eksPodIdentityAgent", is_optional: true },
    :ip_family => { kind: :property, name: "ipFamily", is_optional: true },
    :kubectl_provider => { kind: :property, name: "kubectlProvider", is_optional: true },
    :default_profile => { kind: :property, name: "defaultProfile", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :generate_physical_name => { kind: :method, name: "generatePhysicalName", is_optional: false },
    :get_resource_arn_attribute => { kind: :method, name: "getResourceArnAttribute", is_optional: false },
    :get_resource_name_attribute => { kind: :method, name: "getResourceNameAttribute", is_optional: false },
    :add_auto_scaling_group_capacity => { kind: :method, name: "addAutoScalingGroupCapacity", is_optional: false },
    :add_cdk8s_chart => { kind: :method, name: "addCdk8sChart", is_optional: false },
    :add_fargate_profile => { kind: :method, name: "addFargateProfile", is_optional: false },
    :add_helm_chart => { kind: :method, name: "addHelmChart", is_optional: false },
    :add_manifest => { kind: :method, name: "addManifest", is_optional: false },
    :add_nodegroup_capacity => { kind: :method, name: "addNodegroupCapacity", is_optional: false },
    :add_service_account => { kind: :method, name: "addServiceAccount", is_optional: false },
    :connect_auto_scaling_group_capacity => { kind: :method, name: "connectAutoScalingGroupCapacity", is_optional: false },
    :get_ingress_load_balancer_address => { kind: :method, name: "getIngressLoadBalancerAddress", is_optional: false },
    :get_service_load_balancer_address => { kind: :method, name: "getServiceLoadBalancerAddress", is_optional: false },
    :grant_access => { kind: :method, name: "grantAccess", is_optional: false },
    :grant_cluster_admin => { kind: :method, name: "grantClusterAdmin", is_optional: false },
  }
end

.PROPERTY_INJECTION_IDString

Uniquely identifies this class.

Returns:

  • (String)


118
119
120
# File 'ek_sv2/fargate_cluster.rb', line 118

def self.PROPERTY_INJECTION_ID()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_eks_v2.FargateCluster", "PROPERTY_INJECTION_ID")
end

Instance Method Details

#add_auto_scaling_group_capacity(id, options) ⇒ AWSCDK::Autoscaling::AutoScalingGroup

Add nodes to this EKS cluster.

The nodes will automatically be configured with the right VPC and AMI for the instance type and Kubernetes version.

Note that if you specify updateType: RollingUpdate or updateType: ReplacingUpdate, your nodes might be replaced at deploy time without notice in case the recommended AMI for your machine image type has been updated by AWS. The default behavior for update_type is None, which means only new instances will be launched using the new AMI.



397
398
399
400
401
402
# File 'ek_sv2/fargate_cluster.rb', line 397

def add_auto_scaling_group_capacity(id, options)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  options = options.is_a?(Hash) ? ::AWSCDK::EKSv2::AutoScalingGroupCapacityOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkF1dG9TY2FsaW5nR3JvdXBDYXBhY2l0eU9wdGlvbnMifQ==")), "options")
  jsii_call_method("addAutoScalingGroupCapacity", [id, options])
end

#add_cdk8s_chart(id, chart, options = nil) ⇒ AWSCDK::EKSv2::KubernetesManifest

Defines a CDK8s chart in this cluster.

Parameters:

Returns:



410
411
412
413
414
415
416
# File 'ek_sv2/fargate_cluster.rb', line 410

def add_cdk8s_chart(id, chart, options = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(chart, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "chart")
  options = options.is_a?(Hash) ? ::AWSCDK::EKSv2::KubernetesManifestOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkt1YmVybmV0ZXNNYW5pZmVzdE9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("addCdk8sChart", [id, chart, options])
end

#add_fargate_profile(id, options) ⇒ AWSCDK::EKSv2::FargateProfile

Adds a Fargate profile to this cluster.

Parameters:

Returns:

See Also:



424
425
426
427
428
429
# File 'ek_sv2/fargate_cluster.rb', line 424

def add_fargate_profile(id, options)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  options = options.is_a?(Hash) ? ::AWSCDK::EKSv2::FargateProfileOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkZhcmdhdGVQcm9maWxlT3B0aW9ucyJ9")), "options")
  jsii_call_method("addFargateProfile", [id, options])
end

#add_helm_chart(id, options) ⇒ AWSCDK::EKSv2::HelmChart

Defines a Helm chart in this cluster.

Parameters:

Returns:



436
437
438
439
440
441
# File 'ek_sv2/fargate_cluster.rb', line 436

def add_helm_chart(id, options)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  options = options.is_a?(Hash) ? ::AWSCDK::EKSv2::HelmChartOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkhlbG1DaGFydE9wdGlvbnMifQ==")), "options")
  jsii_call_method("addHelmChart", [id, options])
end

#add_manifest(id, *manifest) ⇒ AWSCDK::EKSv2::KubernetesManifest

Defines a Kubernetes resource in this cluster.

The manifest will be applied/deleted using kubectl as needed.

Parameters:

  • id (String)

    logical id of this manifest.

  • manifest (Array<Hash{String => Object}>)

    a list of Kubernetes resource specifications.

Returns:



450
451
452
453
454
455
456
# File 'ek_sv2/fargate_cluster.rb', line 450

def add_manifest(id, *manifest)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  manifest.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "manifest[#{index}]")
  end
  jsii_call_method("addManifest", [id, *manifest])
end

#add_nodegroup_capacity(id, options = nil) ⇒ AWSCDK::EKSv2::Nodegroup

Add managed nodegroup to this Amazon EKS cluster.

This method will create a new managed nodegroup and add into the capacity.

Parameters:

Returns:

See Also:



466
467
468
469
470
471
# File 'ek_sv2/fargate_cluster.rb', line 466

def add_nodegroup_capacity(id, options = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  options = options.is_a?(Hash) ? ::AWSCDK::EKSv2::NodegroupOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLk5vZGVncm91cE9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("addNodegroupCapacity", [id, options])
end

#add_service_account(id, options = nil) ⇒ AWSCDK::EKSv2::ServiceAccount

Creates a new service account with corresponding IAM Role (IRSA).

Parameters:

Returns:



478
479
480
481
482
483
# File 'ek_sv2/fargate_cluster.rb', line 478

def (id, options = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  options = options.is_a?(Hash) ? ::AWSCDK::EKSv2::ServiceAccountOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLlNlcnZpY2VBY2NvdW50T3B0aW9ucyJ9")), "options") unless options.nil?
  jsii_call_method("addServiceAccount", [id, options])
end

#alb_controllerAWSCDK::EKSv2::ALBController?

The ALB Controller construct defined for this cluster.

Will be undefined if alb_controller wasn't configured.



236
237
238
# File 'ek_sv2/fargate_cluster.rb', line 236

def alb_controller()
  jsii_get_property("albController")
end

#apply_cross_stack_reference_strength(strength) ⇒ void

This method returns an undefined value.

Override the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the "deadly embrace" problem without changing the app-wide default.

Parameters:



328
329
330
331
# File 'ek_sv2/fargate_cluster.rb', line 328

def apply_cross_stack_reference_strength(strength)
  Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength")
  jsii_call_method("applyCrossStackReferenceStrength", [strength])
end

#apply_removal_policy(policy) ⇒ void

This method returns an undefined value.

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:



345
346
347
348
# File 'ek_sv2/fargate_cluster.rb', line 345

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#cluster_arnString

The AWS generated ARN for the Cluster resource.

For example, arn:aws:eks:us-west-2:666666666666:cluster/prod

Returns:

  • (String)


127
128
129
# File 'ek_sv2/fargate_cluster.rb', line 127

def cluster_arn()
  jsii_get_property("clusterArn")
end

#cluster_certificate_authority_dataString

The certificate-authority-data for your cluster.

Returns:

  • (String)


134
135
136
# File 'ek_sv2/fargate_cluster.rb', line 134

def cluster_certificate_authority_data()
  jsii_get_property("clusterCertificateAuthorityData")
end

#cluster_encryption_config_key_arnString

Amazon Resource Name (ARN) or alias of the customer master key (CMK).

Returns:

  • (String)


141
142
143
# File 'ek_sv2/fargate_cluster.rb', line 141

def cluster_encryption_config_key_arn()
  jsii_get_property("clusterEncryptionConfigKeyArn")
end

#cluster_endpointString

The endpoint URL for the Cluster.

This is the URL inside the kubeconfig file to use with kubectl

For example, https://5E1D0CEXAMPLEA591B746AFC5AB30262.yl4.us-west-2.eks.amazonaws.com

Returns:

  • (String)


152
153
154
# File 'ek_sv2/fargate_cluster.rb', line 152

def cluster_endpoint()
  jsii_get_property("clusterEndpoint")
end

#cluster_nameString

The Name of the created EKS Cluster.

Returns:

  • (String)


159
160
161
# File 'ek_sv2/fargate_cluster.rb', line 159

def cluster_name()
  jsii_get_property("clusterName")
end

#cluster_open_id_connect_issuer_urlString

If this cluster is kubectl-enabled, returns the OpenID Connect issuer url.

If this cluster is not kubectl-enabled (i.e. uses the stock CfnCluster), this is undefined.

Returns:

  • (String)


169
170
171
# File 'ek_sv2/fargate_cluster.rb', line 169

def cluster_open_id_connect_issuer_url()
  jsii_get_property("clusterOpenIdConnectIssuerUrl")
end

#cluster_refAWSCDK::Interfaces::AWSEKS::ClusterReference

A reference to a Cluster resource.



176
177
178
# File 'ek_sv2/fargate_cluster.rb', line 176

def cluster_ref()
  jsii_get_property("clusterRef")
end

#cluster_security_groupAWSCDK::EC2::ISecurityGroup

The cluster security group that was created by Amazon EKS for the cluster.



183
184
185
# File 'ek_sv2/fargate_cluster.rb', line 183

def cluster_security_group()
  jsii_get_property("clusterSecurityGroup")
end

#cluster_security_group_idString

The id of the cluster security group that was created by Amazon EKS for the cluster.

Returns:

  • (String)


190
191
192
# File 'ek_sv2/fargate_cluster.rb', line 190

def cluster_security_group_id()
  jsii_get_property("clusterSecurityGroupId")
end

#connect_auto_scaling_group_capacity(auto_scaling_group, options) ⇒ void

This method returns an undefined value.

Connect capacity in the form of an existing AutoScalingGroup to the EKS cluster.

The AutoScalingGroup must be running an EKS-optimized AMI containing the /etc/eks/bootstrap.sh script. This method will configure Security Groups, add the right policies to the instance role, apply the right tags, and add the required user data to the instance's launch configuration.

Prefer to use add_auto_scaling_group_capacity if possible.

Parameters:

See Also:



498
499
500
501
502
503
# File 'ek_sv2/fargate_cluster.rb', line 498

def connect_auto_scaling_group_capacity(auto_scaling_group, options)
  Jsii::Type.check_type(auto_scaling_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQXV0b1NjYWxpbmdHcm91cCJ9")), "autoScalingGroup")
  options = options.is_a?(Hash) ? ::AWSCDK::EKSv2::AutoScalingGroupOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkF1dG9TY2FsaW5nR3JvdXBPcHRpb25zIn0=")), "options")
  jsii_call_method("connectAutoScalingGroupCapacity", [auto_scaling_group, options])
end

#connectionsAWSCDK::EC2::Connections

Manages connection rules (Security Group Rules) for the cluster.



197
198
199
# File 'ek_sv2/fargate_cluster.rb', line 197

def connections()
  jsii_get_property("connections")
end

#default_capacityAWSCDK::Autoscaling::AutoScalingGroup?

The auto scaling group that hosts the default capacity for this cluster.

This will be undefined if the default_capacity_type is not EC2 or default_capacity_type is EC2 but default capacity is set to 0.



246
247
248
# File 'ek_sv2/fargate_cluster.rb', line 246

def default_capacity()
  jsii_get_property("defaultCapacity")
end

#default_nodegroupAWSCDK::EKSv2::Nodegroup?

The node group that hosts the default capacity for this cluster.

This will be undefined if the default_capacity_type is EC2 or default_capacity_type is NODEGROUP but default capacity is set to 0.

Returns:



256
257
258
# File 'ek_sv2/fargate_cluster.rb', line 256

def default_nodegroup()
  jsii_get_property("defaultNodegroup")
end

#default_profileAWSCDK::EKSv2::FargateProfile

Fargate Profile that was created with the cluster.



291
292
293
# File 'ek_sv2/fargate_cluster.rb', line 291

def default_profile()
  jsii_get_property("defaultProfile")
end

#eks_pod_identity_agentAWSCDK::EKSv2::IAddon?

Retrieves the EKS Pod Identity Agent addon for the EKS cluster.

The EKS Pod Identity Agent is responsible for managing the temporary credentials used by pods in the cluster to access AWS resources. It runs as a DaemonSet on each node and provides the necessary credentials to the pods based on their associated service account.

Returns:



268
269
270
# File 'ek_sv2/fargate_cluster.rb', line 268

def eks_pod_identity_agent()
  jsii_get_property("eksPodIdentityAgent")
end

#envAWSCDK::Interfaces::ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.



90
91
92
# File 'ek_sv2/fargate_cluster.rb', line 90

def env()
  jsii_get_property("env")
end

#generate_physical_nameString

Returns:

  • (String)


351
352
353
# File 'ek_sv2/fargate_cluster.rb', line 351

def generate_physical_name()
  jsii_call_method("generatePhysicalName", [])
end

#get_ingress_load_balancer_address(ingress_name, options = nil) ⇒ String

Fetch the load balancer address of an ingress backed by a load balancer.

Parameters:

Returns:

  • (String)


510
511
512
513
514
515
# File 'ek_sv2/fargate_cluster.rb', line 510

def get_ingress_load_balancer_address(ingress_name, options = nil)
  Jsii::Type.check_type(ingress_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ingressName")
  options = options.is_a?(Hash) ? ::AWSCDK::EKSv2::IngressLoadBalancerAddressOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkluZ3Jlc3NMb2FkQmFsYW5jZXJBZGRyZXNzT3B0aW9ucyJ9")), "options") unless options.nil?
  jsii_call_method("getIngressLoadBalancerAddress", [ingress_name, options])
end

#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String

Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. bucket.bucketArn).

Normally, this token will resolve to arn_attr, but if the resource is referenced across environments, arn_components will be used to synthesize a concrete ARN with the resource's physical name. Make sure to reference this.physicalName in arn_components.

Parameters:

  • arn_attr (String)

    The CFN attribute which resolves to the ARN of the resource.

  • arn_components (AWSCDK::ARNComponents)

    The format of the ARN of this resource.

Returns:

  • (String)


365
366
367
368
369
370
# File 'ek_sv2/fargate_cluster.rb', line 365

def get_resource_arn_attribute(arn_attr, arn_components)
  Jsii::Type.check_type(arn_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arnAttr")
  arn_components = arn_components.is_a?(Hash) ? ::AWSCDK::ARNComponents.new(**arn_components.transform_keys(&:to_sym)) : arn_components
  Jsii::Type.check_type(arn_components, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Bcm5Db21wb25lbnRzIn0=")), "arnComponents")
  jsii_call_method("getResourceArnAttribute", [arn_attr, arn_components])
end

#get_resource_name_attribute(name_attr) ⇒ String

Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. bucket.bucketName).

Normally, this token will resolve to name_attr, but if the resource is referenced across environments, it will be resolved to this.physicalName, which will be a concrete name.

Parameters:

  • name_attr (String)

    The CFN attribute which resolves to the resource's name.

Returns:

  • (String)


380
381
382
383
# File 'ek_sv2/fargate_cluster.rb', line 380

def get_resource_name_attribute(name_attr)
  Jsii::Type.check_type(name_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nameAttr")
  jsii_call_method("getResourceNameAttribute", [name_attr])
end

#get_service_load_balancer_address(service_name, options = nil) ⇒ String

Fetch the load balancer address of a service of type 'LoadBalancer'.

Parameters:

Returns:

  • (String)


522
523
524
525
526
527
# File 'ek_sv2/fargate_cluster.rb', line 522

def get_service_load_balancer_address(service_name, options = nil)
  Jsii::Type.check_type(service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName")
  options = options.is_a?(Hash) ? ::AWSCDK::EKSv2::ServiceLoadBalancerAddressOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLlNlcnZpY2VMb2FkQmFsYW5jZXJBZGRyZXNzT3B0aW9ucyJ9")), "options") unless options.nil?
  jsii_call_method("getServiceLoadBalancerAddress", [service_name, options])
end

#grant_access(id, principal, access_policies, options = nil) ⇒ void

This method returns an undefined value.

Grants the specified IAM principal access to the EKS cluster based on the provided access policies.

This method creates an AccessEntry construct that grants the specified IAM principal the access permissions defined by the provided IAccessPolicy array. This allows the IAM principal to perform the actions permitted by the access policies within the EKS cluster. [disable-awslint:no-grants]

Parameters:

  • id (String)
    • The ID of the AccessEntry construct to be created.
  • principal (String)
    • The IAM principal (role or user) to be granted access to the EKS cluster.
  • access_policies (Array<AWSCDK::EKSv2::IAccessPolicy>)
    • An array of IAccessPolicy objects that define the access permissions to be granted to the IAM principal.
  • options (AWSCDK::EKSv2::GrantAccessOptions, nil) (defaults to: nil)
    • Additional options for granting access.


541
542
543
544
545
546
547
548
# File 'ek_sv2/fargate_cluster.rb', line 541

def grant_access(id, principal, access_policies, options = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(principal, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "principal")
  Jsii::Type.check_type(access_policies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3NfdjIuSUFjY2Vzc1BvbGljeSJ9LCJraW5kIjoiYXJyYXkifX0=")), "accessPolicies")
  options = options.is_a?(Hash) ? ::AWSCDK::EKSv2::GrantAccessOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkdyYW50QWNjZXNzT3B0aW9ucyJ9")), "options") unless options.nil?
  jsii_call_method("grantAccess", [id, principal, access_policies, options])
end

#grant_cluster_admin(id, principal) ⇒ AWSCDK::EKSv2::AccessEntry

Grants the specified IAM principal cluster admin access to the EKS cluster.

This method creates an AccessEntry construct that grants the specified IAM principal the cluster admin access permissions. This allows the IAM principal to perform the actions permitted by the cluster admin access. [disable-awslint:no-grants]

Parameters:

  • id (String)
    • The ID of the AccessEntry construct to be created.
  • principal (String)
    • The IAM principal (role or user) to be granted access to the EKS cluster.

Returns:



560
561
562
563
564
# File 'ek_sv2/fargate_cluster.rb', line 560

def grant_cluster_admin(id, principal)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(principal, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "principal")
  jsii_call_method("grantClusterAdmin", [id, principal])
end

#ip_familyAWSCDK::EKSv2::IPFamily?

Note:

Default: IpFamily.IP_V4

Specify which IP family is used to assign Kubernetes pod and service IP addresses.



277
278
279
# File 'ek_sv2/fargate_cluster.rb', line 277

def ip_family()
  jsii_get_property("ipFamily")
end

#kubectl_providerAWSCDK::EKSv2::IKubectlProvider?

KubectlProvider for issuing kubectl commands.



284
285
286
# File 'ek_sv2/fargate_cluster.rb', line 284

def kubectl_provider()
  jsii_get_property("kubectlProvider")
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


75
76
77
# File 'ek_sv2/fargate_cluster.rb', line 75

def node()
  jsii_get_property("node")
end

#open_id_connect_providerAWSCDK::IAM::IOpenIdConnectProvider

An OpenIdConnectProvider resource associated with this cluster, and which can be used to link this cluster to AWS IAM.

A provider will only be defined if this property is accessed (lazy initialization).



206
207
208
# File 'ek_sv2/fargate_cluster.rb', line 206

def open_id_connect_provider()
  jsii_get_property("openIdConnectProvider")
end

#physical_nameString

Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.

This value will resolve to one of the following:

  • a concrete value (e.g. "my-awesome-bucket")
  • undefined, when a name should be generated by CloudFormation
  • a concrete name generated automatically during synthesis, in cross-environment scenarios.

Returns:

  • (String)


104
105
106
# File 'ek_sv2/fargate_cluster.rb', line 104

def physical_name()
  jsii_get_property("physicalName")
end

#pruneBoolean

Determines if Kubernetes resources can be pruned automatically.

Returns:

  • (Boolean)


213
214
215
# File 'ek_sv2/fargate_cluster.rb', line 213

def prune()
  jsii_get_property("prune")
end

#roleAWSCDK::IAM::IRole

IAM role assumed by the EKS Control Plane.

Returns:



220
221
222
# File 'ek_sv2/fargate_cluster.rb', line 220

def role()
  jsii_get_property("role")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



111
112
113
# File 'ek_sv2/fargate_cluster.rb', line 111

def stack()
  jsii_get_property("stack")
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


298
299
300
# File 'ek_sv2/fargate_cluster.rb', line 298

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

#vpcAWSCDK::EC2::IVPC

The VPC in which this Cluster was created.

Returns:



227
228
229
# File 'ek_sv2/fargate_cluster.rb', line 227

def vpc()
  jsii_get_property("vpc")
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>)

Returns:

  • (Constructs::IConstruct)


311
312
313
314
315
316
# File 'ek_sv2/fargate_cluster.rb', line 311

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