@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:34.901Z") public class CfnAddon extends CfnResource implements IInspectable
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.legacy.*; 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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnAddon.Builder
A fluent builder for
CfnAddon . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnAddon(Construct scope,
java.lang.String id,
CfnAddonProps props)
Create a new `AWS::EKS::Addon`.
|
protected |
CfnAddon(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnAddon(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAddonName()
The name of the add-on.
|
java.lang.String |
getAddonVersion()
The version of the add-on.
|
java.lang.String |
getAttrArn()
The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` .
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getClusterName()
The name of the cluster.
|
java.lang.String |
getConfigurationValues()
The configuration values that you provided.
|
java.lang.Object |
getPreserveOnDelete()
Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on.
|
java.lang.String |
getResolveConflicts()
How to resolve field value conflicts for an Amazon EKS add-on.
|
java.lang.String |
getServiceAccountRoleArn()
The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account.
|
TagManager |
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.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAddonName(java.lang.String value)
The name of the add-on.
|
void |
setAddonVersion(java.lang.String value)
The version of the add-on.
|
void |
setClusterName(java.lang.String value)
The name of the cluster.
|
void |
setConfigurationValues(java.lang.String value)
The configuration values that you provided.
|
void |
setPreserveOnDelete(java.lang.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(java.lang.String value)
How to resolve field value conflicts for an Amazon EKS add-on.
|
void |
setServiceAccountRoleArn(java.lang.String value)
The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnAddon(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAddon(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnAddon(Construct scope, java.lang.String id, CfnAddonProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
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.
public java.lang.String getAddonName()
public void setAddonName(java.lang.String value)
public java.lang.String getClusterName()
public void setClusterName(java.lang.String value)
public java.lang.String getAddonVersion()
public void setAddonVersion(java.lang.String value)
public java.lang.String getConfigurationValues()
public void setConfigurationValues(java.lang.String value)
public java.lang.Object getPreserveOnDelete()
If an IAM account is associated with the add-on, it isn't removed.
public void setPreserveOnDelete(java.lang.Boolean value)
If an IAM account is associated with the add-on, it isn't removed.
public void setPreserveOnDelete(IResolvable value)
If an IAM account is associated with the add-on, it isn't removed.
public java.lang.String getResolveConflicts()
Conflicts are handled based on the value you choose:
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.
public void setResolveConflicts(java.lang.String value)
Conflicts are handled based on the value you choose:
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.
public java.lang.String getServiceAccountRoleArn()
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 .
public void setServiceAccountRoleArn(java.lang.String value)
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 .