class AccessPolicy
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.EKS.AccessPolicy |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awseks#AccessPolicy |
![]() | software.amazon.awscdk.services.eks.AccessPolicy |
![]() | aws_cdk.aws_eks.AccessPolicy |
![]() | 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
Access
Policy Name Options
Returns
Import AccessPolicy by name.