ListPodIdentityAssociationsCommand

List the EKS Pod Identity associations in a cluster. You can filter the list by the namespace that the association is in or the service account that the association uses.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EKSClient, ListPodIdentityAssociationsCommand } from "@aws-sdk/client-eks"; // ES Modules import
// const { EKSClient, ListPodIdentityAssociationsCommand } = require("@aws-sdk/client-eks"); // CommonJS import
const client = new EKSClient(config);
const input = { // ListPodIdentityAssociationsRequest
  clusterName: "STRING_VALUE", // required
  namespace: "STRING_VALUE",
  serviceAccount: "STRING_VALUE",
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
};
const command = new ListPodIdentityAssociationsCommand(input);
const response = await client.send(command);
// { // ListPodIdentityAssociationsResponse
//   associations: [ // PodIdentityAssociationSummaries
//     { // PodIdentityAssociationSummary
//       clusterName: "STRING_VALUE",
//       namespace: "STRING_VALUE",
//       serviceAccount: "STRING_VALUE",
//       associationArn: "STRING_VALUE",
//       associationId: "STRING_VALUE",
//       ownerArn: "STRING_VALUE",
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListPodIdentityAssociationsCommand Input

Parameter
Type
Description
clusterName
Required
string | undefined

The name of the cluster that the associations are in.

maxResults
number | undefined

The maximum number of EKS Pod Identity association results returned by ListPodIdentityAssociations in paginated output. When you use this parameter, ListPodIdentityAssociations returns only maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListPodIdentityAssociations request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, ListPodIdentityAssociations returns up to 100 results and a nextToken value if applicable.

namespace
string | undefined

The name of the Kubernetes namespace inside the cluster that the associations are in.

nextToken
string | undefined

The nextToken value returned from a previous paginated ListUpdates request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.

This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.

serviceAccount
string | undefined

The name of the Kubernetes service account that the associations use.

ListPodIdentityAssociationsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
associations
PodIdentityAssociationSummary[] | undefined

The list of summarized descriptions of the associations that are in the cluster and match any filters that you provided.

Each summary is simplified by removing these fields compared to the full PodIdentityAssociation  :

  • The IAM role: roleArn

  • The timestamp that the association was created at: createdAt

  • The most recent timestamp that the association was modified at:. modifiedAt

  • The tags on the association: tags

nextToken
string | undefined

The nextToken value to include in a future ListPodIdentityAssociations request. When the results of a ListPodIdentityAssociations request exceed maxResults, you can use this value to retrieve the next page of results. This value is null when there are no more results to return.

This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.

Throws

Name
Fault
Details
InvalidParameterException
client

The specified parameter is invalid. Review the available parameters for the API request.

InvalidRequestException
client

The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations.

ResourceNotFoundException
client

The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific.

ServerException
server

These errors are usually caused by a server-side issue.

EKSServiceException
Base exception class for all service exceptions from EKS service.