Class AccessPolicy

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.eks.AccessPolicy
All Implemented Interfaces:
IAccessPolicy, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:01.371Z") @Stability(Stable) public class AccessPolicy extends software.amazon.jsii.JsiiObject implements IAccessPolicy
Represents an Amazon EKS Access Policy that implements the IAccessPolicy interface.

Example:

 // AmazonEKSClusterAdminPolicy with `cluster` scope
 AccessPolicy.fromAccessPolicyName("AmazonEKSClusterAdminPolicy", AccessPolicyNameOptions.builder()
         .accessScopeType(AccessScopeType.CLUSTER)
         .build());
 // AmazonEKSAdminPolicy with `namespace` scope
 AccessPolicy.fromAccessPolicyName("AmazonEKSAdminPolicy", AccessPolicyNameOptions.builder()
         .accessScopeType(AccessScopeType.NAMESPACE)
         .namespaces(List.of("foo", "bar"))
         .build());
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for AccessPolicy.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.eks.IAccessPolicy

    IAccessPolicy.Jsii$Default, IAccessPolicy.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Constructs a new instance of the AccessPolicy class.
    protected
    AccessPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    AccessPolicy(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Import AccessPolicy by name.
    The scope of the access policy, which determines the level of access granted.
    The access policy itself, which defines the specific permissions.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • AccessPolicy

      protected AccessPolicy(software.amazon.jsii.JsiiObjectRef objRef)
    • AccessPolicy

      protected AccessPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • AccessPolicy

      @Stability(Stable) public AccessPolicy(@NotNull AccessPolicyProps props)
      Constructs a new instance of the AccessPolicy class.

      Parameters:
      props -
      • The properties for configuring the access policy.
      This parameter is required.
  • Method Details

    • fromAccessPolicyName

      @Stability(Stable) @NotNull public static IAccessPolicy fromAccessPolicyName(@NotNull String policyName, @NotNull AccessPolicyNameOptions options)
      Import AccessPolicy by name.

      Parameters:
      policyName - This parameter is required.
      options - This parameter is required.
    • getAccessScope

      @Stability(Stable) @NotNull public AccessScope getAccessScope()
      The scope of the access policy, which determines the level of access granted.
      Specified by:
      getAccessScope in interface IAccessPolicy
    • getPolicy

      @Stability(Stable) @NotNull public String getPolicy()
      The access policy itself, which defines the specific permissions.
      Specified by:
      getPolicy in interface IAccessPolicy