AccessPolicyNameOptions

class aws_cdk.aws_eks_v2_alpha.AccessPolicyNameOptions(*, access_scope_type, namespaces=None)

Bases: object

(experimental) Represents the options required to create an Amazon EKS Access Policy using the fromAccessPolicyName() method.

Parameters:
  • access_scope_type (AccessScopeType) – (experimental) The scope of the access policy. This determines the level of access granted by the policy.

  • namespaces (Optional[Sequence[str]]) – (experimental) An optional array of Kubernetes namespaces to which the access policy applies. Default: - no specific namespaces for this scope

Stability:

experimental

ExampleMetadata:

infused

Example:

# cluster: eks.Cluster
# node_role: iam.Role


# Grant access with EC2 type for Auto Mode node role
cluster.grant_access("nodeAccess", node_role.role_arn, [
    eks.AccessPolicy.from_access_policy_name("AmazonEKSAutoNodePolicy",
        access_scope_type=eks.AccessScopeType.CLUSTER
    )
], access_entry_type=eks.AccessEntryType.EC2)

Attributes

access_scope_type

(experimental) The scope of the access policy.

This determines the level of access granted by the policy.

Stability:

experimental

namespaces

(experimental) An optional array of Kubernetes namespaces to which the access policy applies.

Default:
  • no specific namespaces for this scope

Stability:

experimental