class AccessPolicy
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.EKS.AccessPolicy |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awseks#AccessPolicy |
Java | software.amazon.awscdk.services.eks.AccessPolicy |
Python | aws_cdk.aws_eks.AccessPolicy |
TypeScript (source) | aws-cdk-lib » aws_eks » AccessPolicy |
Implements
IAccess
Represents an Amazon EKS Access Policy that implements the IAccessPolicy interface.
Example
// AmazonEKSClusterAdminPolicy with `cluster` scope
eks.AccessPolicy.fromAccessPolicyName('AmazonEKSClusterAdminPolicy', {
accessScopeType: eks.AccessScopeType.CLUSTER,
});
// AmazonEKSAdminPolicy with `namespace` scope
eks.AccessPolicy.fromAccessPolicyName('AmazonEKSAdminPolicy', {
accessScopeType: eks.AccessScopeType.NAMESPACE,
namespaces: ['foo', 'bar'] } );
Initializer
new AccessPolicy(props: AccessPolicyProps)
Parameters
- props
Access— - The properties for configuring the access policy.Policy Props
Constructs a new instance of the AccessPolicy class.
Properties
| Name | Type | Description |
|---|---|---|
| access | Access | The scope of the access policy, which determines the level of access granted. |
| policy | string | The access policy itself, which defines the specific permissions. |
accessScope
Type:
Access
The scope of the access policy, which determines the level of access granted.
policy
Type:
string
The access policy itself, which defines the specific permissions.
Methods
| Name | Description |
|---|---|
| static from | Import AccessPolicy by name. |
static fromAccessPolicyName(policyName, options)
public static fromAccessPolicyName(policyName: string, options: AccessPolicyNameOptions): IAccessPolicy
Parameters
- policyName
string - options
AccessPolicy Name Options
Returns
Import AccessPolicy by name.

.NET
Go
Java
Python
TypeScript (