@@ -33,7 +33,7 @@ namespace Amazon.EKS.Model
33
33
/// Container for the parameters to the CreatePodIdentityAssociation operation.
34
34
/// Creates an EKS Pod Identity association between a service account in an Amazon EKS
35
35
/// cluster and an IAM role with <i>EKS Pod Identity</i>. Use EKS Pod Identity to give
36
- /// temporary IAM credentials to pods and the credentials are rotated automatically.
36
+ /// temporary IAM credentials to Pods and the credentials are rotated automatically.
37
37
///
38
38
///
39
39
/// <para>
@@ -43,26 +43,46 @@ namespace Amazon.EKS.Model
43
43
/// </para>
44
44
///
45
45
/// <para>
46
- /// If a pod uses a service account that has an association, Amazon EKS sets environment
47
- /// variables in the containers of the pod . The environment variables configure the Amazon
46
+ /// If a Pod uses a service account that has an association, Amazon EKS sets environment
47
+ /// variables in the containers of the Pod . The environment variables configure the Amazon
48
48
/// Web Services SDKs, including the Command Line Interface, to use the EKS Pod Identity
49
49
/// credentials.
50
50
/// </para>
51
51
///
52
52
/// <para>
53
- /// Pod Identity is a simpler method than <i>IAM roles for service accounts</i>, as this
54
- /// method doesn't use OIDC identity providers. Additionally, you can configure a role
55
- /// for Pod Identity once, and reuse it across clusters.
53
+ /// EKS Pod Identity is a simpler method than <i>IAM roles for service accounts</i>, as
54
+ /// this method doesn't use OIDC identity providers. Additionally, you can configure a
55
+ /// role for EKS Pod Identity once, and reuse it across clusters.
56
+ /// </para>
57
+ ///
58
+ /// <para>
59
+ /// Similar to Amazon Web Services IAM behavior, EKS Pod Identity associations are eventually
60
+ /// consistent, and may take several seconds to be effective after the initial API call
61
+ /// returns successfully. You must design your applications to account for these potential
62
+ /// delays. We recommend that you don’t include association create/updates in the critical,
63
+ /// high-availability code paths of your application. Instead, make changes in a separate
64
+ /// initialization or setup routine that you run less frequently.
65
+ /// </para>
66
+ ///
67
+ /// <para>
68
+ /// You can set a <i>target IAM role</i> in the same or a different account for advanced
69
+ /// scenarios. With a target role, EKS Pod Identity automatically performs two role assumptions
70
+ /// in sequence: first assuming the role in the association that is in this account, then
71
+ /// using those credentials to assume the target IAM role. This process provides your
72
+ /// Pod with temporary credentials that have the permissions defined in the target role,
73
+ /// allowing secure access to resources in another Amazon Web Services account.
56
74
/// </para>
57
75
/// </summary>
58
76
public partial class CreatePodIdentityAssociationRequest : AmazonEKSRequest
59
77
{
60
78
private string _clientRequestToken ;
61
79
private string _clusterName ;
80
+ private bool ? _disableSessionTags ;
62
81
private string _awsNamespace ;
63
82
private string _roleArn ;
64
83
private string _serviceAccount ;
65
84
private Dictionary < string , string > _tags = AWSConfigs . InitializeCollections ? new Dictionary < string , string > ( ) : null ;
85
+ private string _targetRoleArn ;
66
86
67
87
/// <summary>
68
88
/// Gets and sets the property ClientRequestToken.
@@ -86,7 +106,7 @@ internal bool IsSetClientRequestToken()
86
106
/// <summary>
87
107
/// Gets and sets the property ClusterName.
88
108
/// <para>
89
- /// The name of the cluster to create the association in.
109
+ /// The name of the cluster to create the EKS Pod Identity association in.
90
110
/// </para>
91
111
/// </summary>
92
112
[ AWSProperty ( Required = true ) ]
@@ -102,12 +122,46 @@ internal bool IsSetClusterName()
102
122
return this . _clusterName != null ;
103
123
}
104
124
125
+ /// <summary>
126
+ /// Gets and sets the property DisableSessionTags.
127
+ /// <para>
128
+ /// Disable the automatic sessions tags that are appended by EKS Pod Identity.
129
+ /// </para>
130
+ ///
131
+ /// <para>
132
+ /// EKS Pod Identity adds a pre-defined set of session tags when it assumes the role.
133
+ /// You can use these tags to author a single role that can work across resources by allowing
134
+ /// access to Amazon Web Services resources based on matching tags. By default, EKS Pod
135
+ /// Identity attaches six tags, including tags for cluster name, namespace, and service
136
+ /// account name. For the list of tags added by EKS Pod Identity, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/pod-id-abac.html#pod-id-abac-tags">List
137
+ /// of session tags added by EKS Pod Identity</a> in the <i>Amazon EKS User Guide</i>.
138
+ /// </para>
139
+ ///
140
+ /// <para>
141
+ /// Amazon Web Services compresses inline session policies, managed policy ARNs, and session
142
+ /// tags into a packed binary format that has a separate limit. If you receive a <c>PackedPolicyTooLarge</c>
143
+ /// error indicating the packed binary format has exceeded the size limit, you can attempt
144
+ /// to reduce the size by disabling the session tags added by EKS Pod Identity.
145
+ /// </para>
146
+ /// </summary>
147
+ public bool DisableSessionTags
148
+ {
149
+ get { return this . _disableSessionTags . GetValueOrDefault ( ) ; }
150
+ set { this . _disableSessionTags = value ; }
151
+ }
152
+
153
+ // Check to see if DisableSessionTags property is set
154
+ internal bool IsSetDisableSessionTags ( )
155
+ {
156
+ return this . _disableSessionTags . HasValue ;
157
+ }
158
+
105
159
/// <summary>
106
160
/// Gets and sets the property Namespace.
107
161
/// <para>
108
- /// The name of the Kubernetes namespace inside the cluster to create the association
109
- /// in. The service account and the pods that use the service account must be in this
110
- /// namespace.
162
+ /// The name of the Kubernetes namespace inside the cluster to create the EKS Pod Identity
163
+ /// association in. The service account and the Pods that use the service account must
164
+ /// be in this namespace.
111
165
/// </para>
112
166
/// </summary>
113
167
[ AWSProperty ( Required = true ) ]
@@ -128,7 +182,7 @@ internal bool IsSetNamespace()
128
182
/// <para>
129
183
/// The Amazon Resource Name (ARN) of the IAM role to associate with the service account.
130
184
/// The EKS Pod Identity agent manages credentials to assume this role for applications
131
- /// in the containers in the pods that use this service account.
185
+ /// in the containers in the Pods that use this service account.
132
186
/// </para>
133
187
/// </summary>
134
188
[ AWSProperty ( Required = true ) ]
@@ -225,5 +279,39 @@ internal bool IsSetTags()
225
279
return this . _tags != null && ( this . _tags . Count > 0 || ! AWSConfigs . InitializeCollections ) ;
226
280
}
227
281
282
+ /// <summary>
283
+ /// Gets and sets the property TargetRoleArn.
284
+ /// <para>
285
+ /// The Amazon Resource Name (ARN) of the target IAM role to associate with the service
286
+ /// account. This role is assumed by using the EKS Pod Identity association role, then
287
+ /// the credentials for this role are injected into the Pod.
288
+ /// </para>
289
+ ///
290
+ /// <para>
291
+ /// When you run applications on Amazon EKS, your application might need to access Amazon
292
+ /// Web Services resources from a different role that exists in the same or different
293
+ /// Amazon Web Services account. For example, your application running in “Account A”
294
+ /// might need to access resources, such as Amazon S3 buckets in “Account B” or within
295
+ /// “Account A” itself. You can create a association to access Amazon Web Services resources
296
+ /// in “Account B” by creating two IAM roles: a role in “Account A” and a role in “Account
297
+ /// B” (which can be the same or different account), each with the necessary trust and
298
+ /// permission policies. After you provide these roles in the <i>IAM role</i> and <i>Target
299
+ /// IAM role</i> fields, EKS will perform role chaining to ensure your application gets
300
+ /// the required permissions. This means Role A will assume Role B, allowing your Pods
301
+ /// to securely access resources like S3 buckets in the target account.
302
+ /// </para>
303
+ /// </summary>
304
+ public string TargetRoleArn
305
+ {
306
+ get { return this . _targetRoleArn ; }
307
+ set { this . _targetRoleArn = value ; }
308
+ }
309
+
310
+ // Check to see if TargetRoleArn property is set
311
+ internal bool IsSetTargetRoleArn ( )
312
+ {
313
+ return this . _targetRoleArn != null ;
314
+ }
315
+
228
316
}
229
317
}
0 commit comments