AccessEntryProps Struct
Represents the properties required to create an Amazon EKS access entry.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_eks as eks } from 'aws-cdk-lib';
declare const accessPolicy: eks.AccessPolicy;
declare const cluster: eks.Cluster;
const accessEntryProps: eks.AccessEntryProps = {
accessPolicies: [accessPolicy],
cluster: cluster,
principal: 'principal',
// the properties below are optional
accessEntryName: 'accessEntryName',
accessEntryType: eks.AccessEntryType.STANDARD,
removalPolicy: cdk.RemovalPolicy.DESTROY,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_eks as eks
# access_policy: eks.AccessPolicy
# cluster: eks.Cluster
access_entry_props = eks.AccessEntryProps(
access_policies=[access_policy],
cluster=cluster,
principal="principal",
# the properties below are optional
access_entry_name="accessEntryName",
access_entry_type=eks.AccessEntryType.STANDARD,
removal_policy=cdk.RemovalPolicy.DESTROY
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.eks.*;
AccessPolicy accessPolicy;
Cluster cluster;
AccessEntryProps accessEntryProps = AccessEntryProps.builder()
.accessPolicies(List.of(accessPolicy))
.cluster(cluster)
.principal("principal")
// the properties below are optional
.accessEntryName("accessEntryName")
.accessEntryType(AccessEntryType.STANDARD)
.removalPolicy(RemovalPolicy.DESTROY)
.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;
using Amazon.CDK.AWS.EKS;
AccessPolicy accessPolicy;
Cluster cluster;
var accessEntryProps = new AccessEntryProps {
AccessPolicies = new [] { accessPolicy },
Cluster = cluster,
Principal = "principal",
// the properties below are optional
AccessEntryName = "accessEntryName",
AccessEntryType = AccessEntryType.STANDARD,
RemovalPolicy = RemovalPolicy.DESTROY
};
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 cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var accessPolicy AccessPolicy
var cluster Cluster
accessEntryProps := &AccessEntryProps{
AccessPolicies: []IAccessPolicy{
accessPolicy,
},
Cluster: cluster,
Principal: jsii.String("principal"),
// the properties below are optional
AccessEntryName: jsii.String("accessEntryName"),
AccessEntryType: awscdk.Aws_eks.AccessEntryType_STANDARD,
RemovalPolicy: cdk.RemovalPolicy_DESTROY,
}
Properties
accessEntryNameoptionalstringaccess_entry_nameoptionalstraccessEntryNameoptionalStringAccessEntryNameoptionalstringAccessEntryNameoptional*string#The name of the AccessEntry.
Default: No access entry name is provided
accessEntryTypeoptionalAccessEntryTypeaccess_entry_typeoptionalAccessEntryTypeaccessEntryTypeoptionalAccessEntryTypeAccessEntryTypeoptionalAccessEntryTypeAccessEntryTypeoptionalAccessEntryType= STANDARD#The type of the AccessEntry.
accessPoliciesIAccessPolicy[]access_policiestyping.List[IAccessPolicy]accessPoliciesList<IAccessPolicy>AccessPoliciesIAccessPolicy[]AccessPolicies*[]IAccessPolicyrequired#The access policies that define the permissions and scope for the access entry.
The Amazon EKS cluster to which the access entry applies.
The Amazon Resource Name (ARN) of the principal (user or role) to associate the access entry with.
removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy= RemovalPolicy.DESTROY#The removal policy applied to the access entry.
notes
The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations:
- The resource is removed from the template, so CloudFormation stops managing it
- A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
- The stack is deleted, so CloudFormation stops managing all resources in it