AccessScope Struct
Represents the scope of an access policy.
The scope defines the namespaces or cluster-level access granted by the policy.
| Source | aws-eks-v2/lib/access-entry.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_eks_v2 as eks_v2 } from 'aws-cdk-lib';
const accessScope: eks_v2.AccessScope = {
type: eks_v2.AccessScopeType.NAMESPACE,
// the properties below are optional
namespaces: ['namespaces'],
};
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_v2 as eks_v2
access_scope = eks_v2.AccessScope(
type=eks_v2.AccessScopeType.NAMESPACE,
# the properties below are optional
namespaces=["namespaces"]
)
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_v2.*;
AccessScope accessScope = AccessScope.builder()
.type(AccessScopeType.NAMESPACE)
// the properties below are optional
.namespaces(List.of("namespaces"))
.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.EKSv2;
var accessScope = new AccessScope {
Type = AccessScopeType.NAMESPACE,
// the properties below are optional
Namespaces = new [] { "namespaces" }
};
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"
accessScope := &AccessScope{
Type: awscdk.Aws_eks_v2.AccessScopeType_NAMESPACE,
// the properties below are optional
Namespaces: []*string{
jsii.String("namespaces"),
},
}
Properties
namespacesoptionalstring[]namespacesoptionaltyping.List[str]namespacesoptionalList<String>Namespacesoptionalstring[]Namespacesoptional*[]*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.
typeAccessScopeTypetypeAccessScopeTypetypeAccessScopeTypeTypeAccessScopeTypeTypeAccessScopeType required #The scope type of the policy, either 'namespace' or 'cluster'.