# AccessScope

Represents the scope of an access policy.

The scope defines the namespaces or cluster-level access granted by the policy.

- Source: [`aws-eks/lib/access-entry.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-eks/lib/access-entry.ts#L79)
- Type last changed: v2.146.0 · 13 Jun 2024

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_eks as eks } from 'aws-cdk-lib';
const accessScope: eks.AccessScope = {
  type: eks.AccessScopeType.NAMESPACE,

  // the properties below are optional
  namespaces: ['namespaces'],
};
```

## Properties

- `namespaces`: string[] — A Kubernetes namespace that an access policy is scoped to.

  **Default:** no specific namespaces for this scope.

  A value is required if you specified
  namespace for Type.

- `type`: [AccessScopeType](/cdk/api/v2/docs/aws-cdk-lib.aws_eks.AccessScopeType.html) (required) — The scope type of the policy, either 'namespace' or 'cluster'.
