Class: AWSCDK::EKS::EndpointAccess
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::EKS::EndpointAccess
- Defined in:
- eks/endpoint_access.rb
Overview
Endpoint access characteristics.
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.PRIVATE ⇒ AWSCDK::EKS::EndpointAccess
The cluster endpoint is only accessible through your VPC.
-
.PUBLIC ⇒ AWSCDK::EKS::EndpointAccess
The cluster endpoint is accessible from outside of your VPC.
-
.PUBLIC_AND_PRIVATE ⇒ AWSCDK::EKS::EndpointAccess
The cluster endpoint is accessible from outside of your VPC.
Instance Method Summary collapse
-
#initialize(*args) ⇒ EndpointAccess
constructor
A new instance of EndpointAccess.
-
#only_from(*cidr) ⇒ AWSCDK::EKS::EndpointAccess
Restrict public access to specific CIDR blocks.
Constructor Details
#initialize(*args) ⇒ EndpointAccess
Returns a new instance of EndpointAccess.
8 9 10 |
# File 'eks/endpoint_access.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_eks.EndpointAccess does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'eks/endpoint_access.rb', line 12 def self.jsii_overridable_methods { :only_from => { kind: :method, name: "onlyFrom", is_optional: false }, } end |
.PRIVATE ⇒ AWSCDK::EKS::EndpointAccess
The cluster endpoint is only accessible through your VPC.
Worker node traffic to the endpoint will stay within your VPC.
23 24 25 |
# File 'eks/endpoint_access.rb', line 23 def self.PRIVATE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_eks.EndpointAccess", "PRIVATE") end |
.PUBLIC ⇒ AWSCDK::EKS::EndpointAccess
The cluster endpoint is accessible from outside of your VPC.
Worker node traffic will leave your VPC to connect to the endpoint.
By default, the endpoint is exposed to all addresses. You can optionally limit the CIDR blocks that can access the public endpoint using the PUBLIC.onlyFrom method.
If you limit access to specific CIDR blocks, you must ensure that the CIDR blocks that you
specify include the addresses that worker nodes and Fargate pods (if you use them)
access the public endpoint from.
37 38 39 |
# File 'eks/endpoint_access.rb', line 37 def self.PUBLIC() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_eks.EndpointAccess", "PUBLIC") end |
.PUBLIC_AND_PRIVATE ⇒ AWSCDK::EKS::EndpointAccess
The cluster endpoint is accessible from outside of your VPC.
Worker node traffic to the endpoint will stay within your VPC.
By default, the endpoint is exposed to all addresses. You can optionally limit the CIDR blocks that can access the public endpoint using the PUBLIC_AND_PRIVATE.onlyFrom method.
If you limit access to specific CIDR blocks, you must ensure that the CIDR blocks that you
specify include the addresses that worker nodes and Fargate pods (if you use them)
access the public endpoint from.
51 52 53 |
# File 'eks/endpoint_access.rb', line 51 def self.PUBLIC_AND_PRIVATE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_eks.EndpointAccess", "PUBLIC_AND_PRIVATE") end |
Instance Method Details
#only_from(*cidr) ⇒ AWSCDK::EKS::EndpointAccess
Restrict public access to specific CIDR blocks.
If public access is disabled, this method will result in an error.
61 62 63 64 65 66 |
# File 'eks/endpoint_access.rb', line 61 def only_from(*cidr) cidr.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidr[#{index}]") end jsii_call_method("onlyFrom", [*cidr]) end |