Skip to content
v2.278.0

AccessPolicyProperty Struct ​

An access policy includes permissions that allow Amazon EKS to authorize an IAM principal to work with Kubernetes objects on your cluster.

The policies are managed by Amazon EKS, but they're not IAM policies. You can't view the permissions in the policies using the API. The permissions for many of the policies are similar to the Kubernetes cluster-admin , admin , edit , and view cluster roles. For more information about these cluster roles, see User-facing roles in the Kubernetes documentation. To view the contents of the policies, see Access policy permissions in the Amazon EKS User Guide .

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 accessPolicyProperty: eks.CfnAccessEntry.AccessPolicyProperty = {
  accessScope: {
    type: 'type',

    // the properties below are optional
    namespaces: ['namespaces'],
  },
  policyArn: 'policyArn',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_eks as eks

access_policy_property = eks.CfnAccessEntry.AccessPolicyProperty(
    access_scope=eks.CfnAccessEntry.AccessScopeProperty(
        type="type",

        # the properties below are optional
        namespaces=["namespaces"]
    ),
    policy_arn="policyArn"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.eks.*;

AccessPolicyProperty accessPolicyProperty = AccessPolicyProperty.builder()
        .accessScope(AccessScopeProperty.builder()
                .type("type")

                // the properties below are optional
                .namespaces(List.of("namespaces"))
                .build())
        .policyArn("policyArn")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EKS;

var accessPolicyProperty = new AccessPolicyProperty {
    AccessScope = new AccessScopeProperty {
        Type = "type",

        // the properties below are optional
        Namespaces = new [] { "namespaces" }
    },
    PolicyArn = "policyArn"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

accessPolicyProperty := &AccessPolicyProperty{
	AccessScope: &AccessScopeProperty{
		Type: jsii.String("type"),

		// the properties below are optional
		Namespaces: []*string{
			jsii.String("namespaces"),
		},
	},
	PolicyArn: jsii.String("policyArn"),
}

Properties ​

accessScopeIResolvable | CfnAccessEntry.AccessScopePropertyaccess_scopetyping.Union[IResolvable, AccessScopeProperty]accessScopeIResolvableAccessScopeIResolvableAccessScopeinterface{} required #
The scope of an `AccessPolicy` that's associated to an `AccessEntry` .
policyArnstringpolicy_arnstrpolicyArnStringPolicyArnstringPolicyArn*string required #
The ARN of the access policy.