AccessScopeType

class aws_cdk.aws_eks_v2.AccessScopeType(*values)

Bases: Enum

Represents the scope type of an access policy.

The scope type determines the level of access granted by the policy.

Enum:

true

Export:

true

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

CLUSTER

The policy applies to the entire cluster.

NAMESPACE

The policy applies to a specific namespace within the cluster.