Skip to content
v2.278.0

PodIdentityAssociationProperty Struct ​

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 ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_eks as eks } from 'aws-cdk-lib';
const podIdentityAssociationProperty: eks.CfnAddon.PodIdentityAssociationProperty = {
  roleArn: 'roleArn',
  serviceAccount: 'serviceAccount',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_eks as eks

pod_identity_association_property = eks.CfnAddon.PodIdentityAssociationProperty(
    role_arn="roleArn",
    service_account="serviceAccount"
)
java
// 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.*;

PodIdentityAssociationProperty podIdentityAssociationProperty = PodIdentityAssociationProperty.builder()
        .roleArn("roleArn")
        .serviceAccount("serviceAccount")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EKS;

var podIdentityAssociationProperty = new PodIdentityAssociationProperty {
    RoleArn = "roleArn",
    ServiceAccount = "serviceAccount"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

podIdentityAssociationProperty := &PodIdentityAssociationProperty{
	RoleArn: jsii.String("roleArn"),
	ServiceAccount: jsii.String("serviceAccount"),
}

Properties ​

roleArnstringrole_arnstrroleArnStringRoleArnstringRoleArn*string required #
The Amazon Resource Name (ARN) of the IAM role to associate with the service account.

The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the Pods that use this service account.

serviceAccountstringservice_accountstrserviceAccountStringServiceAccountstringServiceAccount*string required #
The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.