Class Nodegroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.eks.Nodegroup
- All Implemented Interfaces:
IResource,INodegroup,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:10.662Z")
@Stability(Stable)
public class Nodegroup
extends Resource
implements INodegroup
The Nodegroup resource class.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.eks.*;
import software.amazon.awscdk.services.iam.*;
Cluster cluster;
InstanceType instanceType;
Role role;
SecurityGroup securityGroup;
Subnet subnet;
SubnetFilter subnetFilter;
Nodegroup nodegroup = Nodegroup.Builder.create(this, "MyNodegroup")
.cluster(cluster)
// the properties below are optional
.amiType(NodegroupAmiType.AL2_X86_64)
.capacityType(CapacityType.SPOT)
.desiredSize(123)
.diskSize(123)
.enableNodeAutoRepair(false)
.forceUpdate(false)
.instanceTypes(List.of(instanceType))
.labels(Map.of(
"labelsKey", "labels"))
.launchTemplateSpec(LaunchTemplateSpec.builder()
.id("id")
// the properties below are optional
.version("version")
.build())
.maxSize(123)
.maxUnavailable(123)
.maxUnavailablePercentage(123)
.minSize(123)
.nodegroupName("nodegroupName")
.nodeRole(role)
.releaseVersion("releaseVersion")
.remoteAccess(NodegroupRemoteAccess.builder()
.sshKeyName("sshKeyName")
// the properties below are optional
.sourceSecurityGroups(List.of(securityGroup))
.build())
.subnets(SubnetSelection.builder()
.availabilityZones(List.of("availabilityZones"))
.onePerAz(false)
.subnetFilters(List.of(subnetFilter))
.subnetGroupName("subnetGroupName")
.subnets(List.of(subnet))
.subnetType(SubnetType.PRIVATE_ISOLATED)
.build())
.tags(Map.of(
"tagsKey", "tags"))
.taints(List.of(TaintSpec.builder()
.effect(TaintEffect.NO_SCHEDULE)
.key("key")
.value("value")
.build()))
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.eks.INodegroup
INodegroup.Jsii$Default, INodegroup.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNodegroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedNodegroup(software.amazon.jsii.JsiiObjectRef objRef) Nodegroup(software.constructs.Construct scope, String id, NodegroupProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic INodegroupfromNodegroupName(software.constructs.Construct scope, String id, String nodegroupName) Import the Nodegroup from attributes.the Amazon EKS cluster resource.ARN of the nodegroup.Nodegroup name.getRole()IAM role of the instance profile for the nodegroup.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
Nodegroup
protected Nodegroup(software.amazon.jsii.JsiiObjectRef objRef) -
Nodegroup
protected Nodegroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Nodegroup
@Stability(Stable) public Nodegroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull NodegroupProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromNodegroupName
@Stability(Stable) @NotNull public static INodegroup fromNodegroupName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String nodegroupName) Import the Nodegroup from attributes.- Parameters:
scope- This parameter is required.id- This parameter is required.nodegroupName- This parameter is required.
-
getCluster
the Amazon EKS cluster resource. -
getNodegroupArn
ARN of the nodegroup. -
getNodegroupName
Nodegroup name.- Specified by:
getNodegroupNamein interfaceINodegroup
-
getRole
IAM role of the instance profile for the nodegroup.
-