Amazon EKS Auth 2023-11-26
- Client: Aws\EKSAuth\EKSAuthClient
- Service ID: eks-auth
- Version: 2023-11-26
This page describes the parameters and results for the operations of the Amazon EKS Auth (2023-11-26), and shows how to use the Aws\EKSAuth\EKSAuthClient object to call the described operations. This documentation is specific to the 2023-11-26 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- AssumeRoleForPodIdentity ( array $params = [] )
- The Amazon EKS Auth API and the AssumeRoleForPodIdentity action are only used by the EKS Pod Identity Agent.
Operations
AssumeRoleForPodIdentity
$result = $client->assumeRoleForPodIdentity
([/* ... */]); $promise = $client->assumeRoleForPodIdentityAsync
([/* ... */]);
The Amazon EKS Auth API and the AssumeRoleForPodIdentity
action are only used by the EKS Pod Identity Agent.
We recommend that applications use the Amazon Web Services SDKs to connect to Amazon Web Services services; if credentials from an EKS Pod Identity association are available in the pod, the latest versions of the SDKs use them automatically.
Parameter Syntax
$result = $client->assumeRoleForPodIdentity([ 'clusterName' => '<string>', // REQUIRED 'token' => '<string>', // REQUIRED ]);
Parameter Details
Members
- clusterName
-
- Required: Yes
- Type: string
The name of the cluster for the request.
- token
-
- Required: Yes
- Type: string
The token of the Kubernetes service account for the pod.
Result Syntax
[ 'assumedRoleUser' => [ 'arn' => '<string>', 'assumeRoleId' => '<string>', ], 'audience' => '<string>', 'credentials' => [ 'accessKeyId' => '<string>', 'expiration' => <DateTime>, 'secretAccessKey' => '<string>', 'sessionToken' => '<string>', ], 'podIdentityAssociation' => [ 'associationArn' => '<string>', 'associationId' => '<string>', ], 'subject' => [ 'namespace' => '<string>', 'serviceAccount' => '<string>', ], ]
Result Details
Members
- assumedRoleUser
-
- Required: Yes
- Type: AssumedRoleUser structure
An object with the permanent IAM role identity and the temporary session name.
The ARN of the IAM role that the temporary credentials authenticate to.
The session name of the temporary session requested to STS. The value is a unique identifier that contains the role ID, a colon (
:
), and the role session name of the role that is being assumed. The role ID is generated by IAM when the role is created. The role session name part of the value follows this format:eks-clustername-podname-random UUID
- audience
-
- Required: Yes
- Type: string
The identity that is allowed to use the credentials. This value is always
pods.eks.amazonaws.com
. - credentials
-
- Required: Yes
- Type: Credentials structure
The Amazon Web Services Signature Version 4 type of temporary credentials.
- podIdentityAssociation
-
- Required: Yes
- Type: PodIdentityAssociation structure
The Amazon Resource Name (ARN) and ID of the EKS Pod Identity association.
- subject
-
- Required: Yes
- Type: Subject structure
The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.
Errors
- ThrottlingException:
The request was denied because your request rate is too high. Reduce the frequency of requests.
- InvalidRequestException:
This exception is thrown if the request contains a semantic error. The precise meaning will depend on the API, and will be documented in the error message.
- AccessDeniedException:
You don't have permissions to perform the requested operation. The IAM principal making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access management in the IAM User Guide.
- InternalServerException:
These errors are usually caused by a server-side issue.
- InvalidTokenException:
The specified Kubernetes service account token is invalid.
- InvalidParameterException:
The specified parameter is invalid. Review the available parameters for the API request.
- ExpiredTokenException:
The specified Kubernetes service account token is expired.
- ResourceNotFoundException:
The specified resource could not be found.
- ServiceUnavailableException:
The service is unavailable. Back off and retry the operation.
Shapes
AccessDeniedException
Description
You don't have permissions to perform the requested operation. The IAM principal making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access management in the IAM User Guide.
Members
- message
-
- Type: string
AssumedRoleUser
Description
An object with the permanent IAM role identity and the temporary session name.
Members
- arn
-
- Required: Yes
- Type: string
The ARN of the IAM role that the temporary credentials authenticate to.
- assumeRoleId
-
- Required: Yes
- Type: string
The session name of the temporary session requested to STS. The value is a unique identifier that contains the role ID, a colon (
:
), and the role session name of the role that is being assumed. The role ID is generated by IAM when the role is created. The role session name part of the value follows this format:eks-clustername-podname-random UUID
Credentials
Description
The Amazon Web Services Signature Version 4 type of temporary credentials.
Members
- accessKeyId
-
- Required: Yes
- Type: string
The access key ID that identifies the temporary security credentials.
- expiration
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The Unix epoch timestamp in seconds when the current credentials expire.
- secretAccessKey
-
- Required: Yes
- Type: string
The secret access key that applications inside the pods use to sign requests.
- sessionToken
-
- Required: Yes
- Type: string
The token that applications inside the pods must pass to any service API to use the temporary credentials.
ExpiredTokenException
Description
The specified Kubernetes service account token is expired.
Members
- message
-
- Type: string
InternalServerException
Description
These errors are usually caused by a server-side issue.
Members
- message
-
- Type: string
InvalidParameterException
Description
The specified parameter is invalid. Review the available parameters for the API request.
Members
- message
-
- Type: string
InvalidRequestException
Description
This exception is thrown if the request contains a semantic error. The precise meaning will depend on the API, and will be documented in the error message.
Members
- message
-
- Type: string
InvalidTokenException
Description
The specified Kubernetes service account token is invalid.
Members
- message
-
- Type: string
PodIdentityAssociation
Description
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.
Members
- associationArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the EKS Pod Identity association.
- associationId
-
- Required: Yes
- Type: string
The ID of the association.
ResourceNotFoundException
Description
The specified resource could not be found.
Members
- message
-
- Type: string
ServiceUnavailableException
Description
The service is unavailable. Back off and retry the operation.
Members
- message
-
- Type: string
Subject
Description
An object containing the name of the Kubernetes service account inside the cluster to associate the IAM credentials with.
Members
- namespace
-
- Required: Yes
- Type: string
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
- serviceAccount
-
- Required: Yes
- Type: string
The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.
ThrottlingException
Description
The request was denied because your request rate is too high. Reduce the frequency of requests.
Members
- message
-
- Type: string