Skip to main content

pod_identity_associations

Creates, updates, deletes or gets a pod_identity_association resource or lists pod_identity_associations in a region

Overview

Namepod_identity_associations
TypeResource
DescriptionAn object representing an Amazon EKS PodIdentityAssociation.
Idawscc.eks.pod_identity_associations

Fields

NameDatatypeDescription
cluster_namestringThe cluster that the pod identity association is created for.
role_arnstringThe IAM role ARN that the pod identity association is created for.
namespacestringThe Kubernetes namespace that the pod identity association is created for.
service_accountstringThe Kubernetes service account that the pod identity association is created for.
association_arnstringThe ARN of the pod identity association.
association_idstringThe ID of the pod identity association.
target_role_arnstringThe Target Role Arn of the pod identity association.
external_idstringThe External Id of the pod identity association.
disable_session_tagsbooleanThe Disable Session Tags of the pod identity association.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::EKS::PodIdentityAssociation.

Methods

NameResourceAccessible byRequired Params
create_resourcepod_identity_associationsINSERTClusterName, RoleArn, Namespace, ServiceAccount, region
delete_resourcepod_identity_associationsDELETEIdentifier, region
update_resourcepod_identity_associationsUPDATEIdentifier, PatchDocument, region
list_resourcespod_identity_associations_list_onlySELECTregion
get_resourcepod_identity_associationsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual pod_identity_association.

SELECT
region,
cluster_name,
role_arn,
namespace,
service_account,
association_arn,
association_id,
target_role_arn,
external_id,
disable_session_tags,
tags
FROM awscc.eks.pod_identity_associations
WHERE
region = '{{ region }}' AND
Identifier = '{{ association_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new pod_identity_association resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.eks.pod_identity_associations (
ClusterName,
RoleArn,
Namespace,
ServiceAccount,
region
)
SELECT
'{{ cluster_name }}',
'{{ role_arn }}',
'{{ namespace }}',
'{{ service_account }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a pod_identity_association resource, using stack-deploy.

/*+ update */
UPDATE awscc.eks.pod_identity_associations
SET PatchDocument = string('{{ {
"RoleArn": role_arn,
"TargetRoleArn": target_role_arn,
"DisableSessionTags": disable_session_tags,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ association_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.eks.pod_identity_associations
WHERE
Identifier = '{{ association_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the pod_identity_associations resource, the following permissions are required:

eks:CreatePodIdentityAssociation,
eks:DescribePodIdentityAssociation,
eks:TagResource,
iam:PassRole,
iam:GetRole