Class CfnPodIdentityAssociationProps
Properties for defining a CfnPodIdentityAssociation.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.EKSv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnPodIdentityAssociationProps : ICfnPodIdentityAssociationProps
Syntax (vb)
Public Class CfnPodIdentityAssociationProps Implements ICfnPodIdentityAssociationProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EKSv2;
var cfnPodIdentityAssociationProps = new CfnPodIdentityAssociationProps {
ClusterName = "clusterName",
Namespace = "namespace",
RoleArn = "roleArn",
ServiceAccount = "serviceAccount",
// the properties below are optional
DisableSessionTags = false,
Policy = "policy",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TargetRoleArn = "targetRoleArn"
};
Synopsis
Constructors
| CfnPodIdentityAssociationProps() | Properties for defining a |
Properties
| ClusterName | The name of the cluster that the association is in. |
| DisableSessionTags | The state of the automatic sessions tags. The value of true disables these tags. |
| Namespace | The name of the Kubernetes namespace inside the cluster to create the association in. |
| Policy | The policy of the pod identity association. |
| RoleArn | The Amazon Resource Name (ARN) of the IAM role to associate with the service account. |
| ServiceAccount | The name of the Kubernetes service account inside the cluster to associate the IAM credentials with. |
| Tags | Metadata that assists with categorization and organization. |
| TargetRoleArn | The Amazon Resource Name (ARN) of the target IAM role to associate with the service account. |
Constructors
CfnPodIdentityAssociationProps()
Properties for defining a CfnPodIdentityAssociation.
public CfnPodIdentityAssociationProps()
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EKSv2;
var cfnPodIdentityAssociationProps = new CfnPodIdentityAssociationProps {
ClusterName = "clusterName",
Namespace = "namespace",
RoleArn = "roleArn",
ServiceAccount = "serviceAccount",
// the properties below are optional
DisableSessionTags = false,
Policy = "policy",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TargetRoleArn = "targetRoleArn"
};
Properties
ClusterName
The name of the cluster that the association is in.
public string ClusterName { get; set; }
Property Value
Remarks
DisableSessionTags
The state of the automatic sessions tags. The value of true disables these tags.
public object? DisableSessionTags { get; set; }
Property Value
Remarks
EKS Pod Identity adds a pre-defined set of session tags when it assumes the role. You can use these tags to author a single role that can work across resources by allowing access to AWS resources based on matching tags. By default, EKS Pod Identity attaches six tags, including tags for cluster name, namespace, and service account name. For the list of tags added by EKS Pod Identity, see List of session tags added by EKS Pod Identity in the Amazon EKS User Guide .
Type union: either bool or IResolvable
Namespace
The name of the Kubernetes namespace inside the cluster to create the association in.
public string Namespace { get; set; }
Property Value
Remarks
The service account and the Pods that use the service account must be in this namespace.
Policy
The policy of the pod identity association.
public string? Policy { get; set; }
Property Value
Remarks
RoleArn
The Amazon Resource Name (ARN) of the IAM role to associate with the service account.
public string RoleArn { get; set; }
Property Value
Remarks
The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the Pods that use this service account.
ServiceAccount
The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.
public string ServiceAccount { get; set; }
Property Value
Remarks
Tags
Metadata that assists with categorization and organization.
public ICfnTag[]? Tags { get; set; }
Property Value
ICfnTag[]
Remarks
Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or AWS resources.
The following basic restrictions apply to tags:
: .
- Tag keys and values are case-sensitive.
- Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
TargetRoleArn
The Amazon Resource Name (ARN) of the target IAM role to associate with the service account.
public string? TargetRoleArn { get; set; }
Property Value
Remarks
This role is assumed by using the EKS Pod Identity association role, then the credentials for this role are injected into the Pod.