Class CfnAddon
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::EKS::Addon
.
Creates an Amazon EKS add-on.
Amazon EKS add-ons help to automate the provisioning and lifecycle management of common operational software for Amazon EKS clusters. For more information, see Amazon EKS add-ons in the Amazon EKS User Guide .
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.eks.*; CfnAddon cfnAddon = CfnAddon.Builder.create(this, "MyCfnAddon") .addonName("addonName") .clusterName("clusterName") // the properties below are optional .addonVersion("addonVersion") .configurationValues("configurationValues") .preserveOnDelete(false) .resolveConflicts("resolveConflicts") .serviceAccountRoleArn("serviceAccountRoleArn") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe name of the add-on.The version of the add-on.The ARN of the add-on, such asarn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
.The name of the cluster.The configuration values that you provided.Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on.How to resolve field value conflicts for an Amazon EKS add-on.The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account.getTags()
The metadata that you apply to the add-on to assist with categorization and organization.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAddonName
(String value) The name of the add-on.void
setAddonVersion
(String value) The version of the add-on.void
setClusterName
(String value) The name of the cluster.void
setConfigurationValues
(String value) The configuration values that you provided.void
setPreserveOnDelete
(Boolean value) Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on.void
setPreserveOnDelete
(IResolvable value) Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on.void
setResolveConflicts
(String value) How to resolve field value conflicts for an Amazon EKS add-on.void
setServiceAccountRoleArn
(String value) The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAddon
protected CfnAddon(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAddon
protected CfnAddon(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAddon
@Stability(Stable) public CfnAddon(@NotNull Construct scope, @NotNull String id, @NotNull CfnAddonProps props) Create a newAWS::EKS::Addon
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
The ARN of the add-on, such asarn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
The metadata that you apply to the add-on to assist with categorization and organization.Each tag consists of a key and an optional value, both of which you define. Add-on tags do not propagate to any other resources associated with the cluster.
-
getAddonName
The name of the add-on. -
setAddonName
The name of the add-on. -
getClusterName
The name of the cluster. -
setClusterName
The name of the cluster. -
getAddonVersion
The version of the add-on. -
setAddonVersion
The version of the add-on. -
getConfigurationValues
The configuration values that you provided. -
setConfigurationValues
The configuration values that you provided. -
getPreserveOnDelete
Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on.If an IAM account is associated with the add-on, it isn't removed.
-
setPreserveOnDelete
Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on.If an IAM account is associated with the add-on, it isn't removed.
-
setPreserveOnDelete
Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on.If an IAM account is associated with the add-on, it isn't removed.
-
getResolveConflicts
How to resolve field value conflicts for an Amazon EKS add-on.Conflicts are handled based on the value you choose:
- None – If the self-managed version of the add-on is installed on your cluster, Amazon EKS doesn't change the value. Creation of the add-on might fail.
- Overwrite – If the self-managed version of the add-on is installed on your cluster and the Amazon EKS default value is different than the existing value, Amazon EKS changes the value to the Amazon EKS default value.
- Preserve – Not supported. You can set this value when updating an add-on though. For more information, see UpdateAddon .
If you don't currently have the self-managed version of the add-on installed on your cluster, the Amazon EKS add-on is installed. Amazon EKS sets all values to default values, regardless of the option that you specify.
-
setResolveConflicts
How to resolve field value conflicts for an Amazon EKS add-on.Conflicts are handled based on the value you choose:
- None – If the self-managed version of the add-on is installed on your cluster, Amazon EKS doesn't change the value. Creation of the add-on might fail.
- Overwrite – If the self-managed version of the add-on is installed on your cluster and the Amazon EKS default value is different than the existing value, Amazon EKS changes the value to the Amazon EKS default value.
- Preserve – Not supported. You can set this value when updating an add-on though. For more information, see UpdateAddon .
If you don't currently have the self-managed version of the add-on installed on your cluster, the Amazon EKS add-on is installed. Amazon EKS sets all values to default values, regardless of the option that you specify.
-
getServiceAccountRoleArn
The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account.The role must be assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the Amazon EKS User Guide .
To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. For more information, see Enabling IAM roles for service accounts on your cluster in the Amazon EKS User Guide .
-
setServiceAccountRoleArn
The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account.The role must be assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the Amazon EKS User Guide .
To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. For more information, see Enabling IAM roles for service accounts on your cluster in the Amazon EKS User Guide .
-