Class CfnPodIdentityAssociation
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.eks.CfnPodIdentityAssociation
- All Implemented Interfaces:
IInspectable,IPodIdentityAssociationRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T10:47:20.266Z")
@Stability(Stable)
public class CfnPodIdentityAssociation
extends CfnResource
implements IInspectable, IPodIdentityAssociationRef, ITaggableV2
Amazon EKS Pod Identity associations provide the ability to manage credentials for your applications, similar to the way that Amazon EC2 instance profiles provide credentials to Amazon EC2 instances.
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.*;
CfnPodIdentityAssociation cfnPodIdentityAssociation = CfnPodIdentityAssociation.Builder.create(this, "MyCfnPodIdentityAssociation")
.clusterName("clusterName")
.namespace("namespace")
.roleArn("roleArn")
.serviceAccount("serviceAccount")
// the properties below are optional
.disableSessionTags(false)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.targetRoleArn("targetRoleArn")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnPodIdentityAssociation.Nested 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.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.eks.IPodIdentityAssociationRef
IPodIdentityAssociationRef.Jsii$Default, IPodIdentityAssociationRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnPodIdentityAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnPodIdentityAssociation(software.amazon.jsii.JsiiObjectRef objRef) CfnPodIdentityAssociation(software.constructs.Construct scope, String id, CfnPodIdentityAssociationProps props) Create a newAWS::EKS::PodIdentityAssociation. -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the association.The ID of the association.The unique identifier for this EKS Pod Identity association for a target IAM role.Tag Manager which manages the tags for this resource.The name of the cluster that the association is in.The state of the automatic sessions tags.The name of the Kubernetes namespace inside the cluster to create the association in.A reference to a PodIdentityAssociation resource.The Amazon Resource Name (ARN) of the IAM role to associate with the service account.The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.getTags()Metadata that assists with categorization and organization.The Amazon Resource Name (ARN) of the target IAM role to associate with the service account.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnPodIdentityAssociation.renderProperties(Map<String, Object> props) voidsetClusterName(String value) The name of the cluster that the association is in.voidsetDisableSessionTags(Boolean value) The state of the automatic sessions tags.voidsetDisableSessionTags(IResolvable value) The state of the automatic sessions tags.voidsetNamespace(String value) The name of the Kubernetes namespace inside the cluster to create the association in.voidsetRoleArn(String value) The Amazon Resource Name (ARN) of the IAM role to associate with the service account.voidsetServiceAccount(String value) The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.voidMetadata that assists with categorization and organization.voidsetTargetRoleArn(String value) The Amazon Resource Name (ARN) of the target IAM role to associate with the service account.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.interfaces.IEnvironmentAware
getEnvMethods 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
-
CfnPodIdentityAssociation
protected CfnPodIdentityAssociation(software.amazon.jsii.JsiiObjectRef objRef) -
CfnPodIdentityAssociation
protected CfnPodIdentityAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnPodIdentityAssociation
@Stability(Stable) public CfnPodIdentityAssociation(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPodIdentityAssociationProps props) Create a newAWS::EKS::PodIdentityAssociation.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
isCfnPodIdentityAssociation
Checks whether the given object is a CfnPodIdentityAssociation.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrAssociationArn
The Amazon Resource Name (ARN) of the association. -
getAttrAssociationId
The ID of the association. -
getAttrExternalId
The unique identifier for this EKS Pod Identity association for a target IAM role.You put this value in the trust policy of the target role, in a
Conditionto match thests.ExternalId. This ensures that the target role can only be assumed by this association. This prevents the confused deputy problem . For more information about the confused deputy problem, see The confused deputy problem in the IAM User Guide .If you want to use the same target role with multiple associations or other roles, use independent statements in the trust policy to allow
sts:AssumeRoleaccess from each role. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getPodIdentityAssociationRef
A reference to a PodIdentityAssociation resource.- Specified by:
getPodIdentityAssociationRefin interfaceIPodIdentityAssociationRef
-
getClusterName
The name of the cluster that the association is in. -
setClusterName
The name of the cluster that the association is in. -
getNamespace
The name of the Kubernetes namespace inside the cluster to create the association in. -
setNamespace
The name of the Kubernetes namespace inside the cluster to create the association in. -
getRoleArn
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. -
setRoleArn
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. -
getServiceAccount
The name of the Kubernetes service account inside the cluster to associate the IAM credentials with. -
setServiceAccount
The name of the Kubernetes service account inside the cluster to associate the IAM credentials with. -
getDisableSessionTags
The state of the automatic sessions tags.The value of true disables these tags.
Returns union: either
BooleanorIResolvable -
setDisableSessionTags
The state of the automatic sessions tags.The value of true disables these tags.
-
setDisableSessionTags
The state of the automatic sessions tags.The value of true disables these tags.
-
getTags
Metadata that assists with categorization and organization. -
setTags
Metadata that assists with categorization and organization. -
getTargetRoleArn
The Amazon Resource Name (ARN) of the target IAM role to associate with the service account. -
setTargetRoleArn
The Amazon Resource Name (ARN) of the target IAM role to associate with the service account.
-