assume_role_for_pod_identity
¶
assume_role_for_pod_identity(
cluster_name: ClusterName,
token: JwtToken,
*,
config_overrides: Optional[EKSAuthClientConfig] = None,
eks_node_name: Optional[str] = None,
instance_id: Optional[str] = None,
zone: Optional[str] = None,
) -> AssumeRoleForPodIdentityResponse
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.
Parameters:
-
cluster_name(ClusterName) –The name of the cluster for the request.
-
token(JwtToken) –The token of the Kubernetes service account for the pod.
-
eks_node_name(Optional[str], default:None) –The Kubernetes node name of the worker node where the pod is running.
-
instance_id(Optional[str], default:None) –The Amazon EC2 instance ID of the worker node where the pod is running.
-
zone(Optional[str], default:None) –The Availability Zone ID of the worker node where the pod is running.
Raises:
-
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.
-
ExpiredTokenException–The specified Kubernetes service account token is expired.
-
InternalServerException–These errors are usually caused by a server-side issue.
-
InvalidParameterException–The specified parameter is invalid. Review the available parameters for the API request.
-
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.
-
InvalidTokenException–The specified Kubernetes service account token is invalid.
-
ResourceNotFoundException–The specified resource could not be found.
-
ServiceUnavailableException–The service is unavailable. Back off and retry the operation.
-
ThrottlingException–The request was denied because your request rate is too high. Reduce the frequency of requests.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_eks_auth/_services/eks_auth.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |