AccessPolicyNameOptions

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

Bases: object

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

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

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

ExampleMetadata:

infused

Example:

# AmazonEKSClusterAdminPolicy with `cluster` scope
eks.AccessPolicy.from_access_policy_name("AmazonEKSClusterAdminPolicy",
    access_scope_type=eks.AccessScopeType.CLUSTER
)
# AmazonEKSAdminPolicy with `namespace` scope
eks.AccessPolicy.from_access_policy_name("AmazonEKSAdminPolicy",
    access_scope_type=eks.AccessScopeType.NAMESPACE,
    namespaces=["foo", "bar"]
)

Attributes

access_scope_type

The scope of the access policy.

This determines the level of access granted by the policy.

namespaces

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

Default:
  • no specific namespaces for this scope