associate_access_policy
¶
associate_access_policy(
cluster_name: String,
principal_arn: String,
policy_arn: String,
access_scope: AccessScope,
*,
config_overrides: Optional[EKSClientConfig] = None,
) -> AssociateAccessPolicyResponse
Associates an access policy and its scope to an access entry. For more information about associating access policies, see Associating and disassociating access policies to and from access entries in the Amazon EKS User Guide.
Parameters:
-
cluster_name(String) –The name of your cluster.
-
principal_arn(String) –The Amazon Resource Name (ARN) of the IAM user or role for the
AccessEntrythat you're associating the access policy to. -
policy_arn(String) –The ARN of the
AccessPolicythat you're associating. For a list of ARNs, useListAccessPolicies. -
access_scope(AccessScope) –The scope for the
AccessPolicy. You can scope access policies to an entire cluster or to specific Kubernetes namespaces.
Raises:
-
InvalidParameterException–The specified parameter is invalid. Review the available parameters for the API request.
-
InvalidRequestException–The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations.
-
ResourceNotFoundException–The specified resource could not be found. You can view your available clusters with
ListClusters. You can view your available managed node groups withListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific. -
ServerException–These errors are usually caused by a server-side issue.
-
UnknownServiceError–The service returned an error code this client does not model.