/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.eks.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The Kubernetes network configuration for the cluster. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class KubernetesNetworkConfigRequest implements Serializable, Cloneable, StructuredPojo { /** *
* Don't specify a value if you select ipv6
for ipFamily. The CIDR block to assign Kubernetes
* service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from either the
* 10.100.0.0/16
or 172.20.0.0/16
CIDR blocks. We recommend that you specify a block that
* does not overlap with resources in other networks that are peered or connected to your VPC. The block must meet
* the following requirements:
*
* Within one of the following private IP address blocks: 10.0.0.0/8
, 172.16.0.0/12
, or
* 192.168.0.0/16
.
*
* Doesn't overlap with any CIDR block assigned to the VPC that you selected for VPC. *
** Between /24 and /12. *
** You can only specify a custom CIDR block when you create a cluster and can't change this value once the cluster * is created. *
*
* Specify which IP family is used to assign Kubernetes pod and service IP addresses. If you don't specify a value,
* ipv4
is used by default. You can only specify an IP family when you create a cluster and can't
* change this value once the cluster is created. If you specify ipv6
, the VPC and subnets that you
* specify for cluster creation must have both IPv4
and IPv6
CIDR blocks assigned to them.
* You can't specify ipv6
for clusters in China Regions.
*
* You can only specify ipv6
for 1.21
and later clusters that use version
* 1.10.1
or later of the Amazon VPC CNI add-on. If you specify ipv6
, then ensure that
* your VPC meets the requirements listed in the considerations listed in Assigning IPv6 addresses to pods and
* services in the Amazon EKS User Guide. Kubernetes assigns services IPv6
addresses from the
* unique local address range (fc00::/7)
. You can't specify a custom IPv6
CIDR block. Pod
* addresses are assigned from the subnet's IPv6
CIDR.
*
* Don't specify a value if you select ipv6
for ipFamily. The CIDR block to assign Kubernetes
* service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from either the
* 10.100.0.0/16
or 172.20.0.0/16
CIDR blocks. We recommend that you specify a block that
* does not overlap with resources in other networks that are peered or connected to your VPC. The block must meet
* the following requirements:
*
* Within one of the following private IP address blocks: 10.0.0.0/8
, 172.16.0.0/12
, or
* 192.168.0.0/16
.
*
* Doesn't overlap with any CIDR block assigned to the VPC that you selected for VPC. *
** Between /24 and /12. *
** You can only specify a custom CIDR block when you create a cluster and can't change this value once the cluster * is created. *
*ipv6
for ipFamily. The CIDR block to assign
* Kubernetes service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from
* either the 10.100.0.0/16
or 172.20.0.0/16
CIDR blocks. We recommend that you
* specify a block that does not overlap with resources in other networks that are peered or connected to
* your VPC. The block must meet the following requirements:
*
* Within one of the following private IP address blocks: 10.0.0.0/8
, 172.16.0.0/12
* , or 192.168.0.0/16
.
*
* Doesn't overlap with any CIDR block assigned to the VPC that you selected for VPC. *
** Between /24 and /12. *
** You can only specify a custom CIDR block when you create a cluster and can't change this value once the * cluster is created. *
*/ public void setServiceIpv4Cidr(String serviceIpv4Cidr) { this.serviceIpv4Cidr = serviceIpv4Cidr; } /** *
* Don't specify a value if you select ipv6
for ipFamily. The CIDR block to assign Kubernetes
* service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from either the
* 10.100.0.0/16
or 172.20.0.0/16
CIDR blocks. We recommend that you specify a block that
* does not overlap with resources in other networks that are peered or connected to your VPC. The block must meet
* the following requirements:
*
* Within one of the following private IP address blocks: 10.0.0.0/8
, 172.16.0.0/12
, or
* 192.168.0.0/16
.
*
* Doesn't overlap with any CIDR block assigned to the VPC that you selected for VPC. *
** Between /24 and /12. *
** You can only specify a custom CIDR block when you create a cluster and can't change this value once the cluster * is created. *
*ipv6
for ipFamily. The CIDR block to assign
* Kubernetes service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from
* either the 10.100.0.0/16
or 172.20.0.0/16
CIDR blocks. We recommend that you
* specify a block that does not overlap with resources in other networks that are peered or connected to
* your VPC. The block must meet the following requirements:
*
* Within one of the following private IP address blocks: 10.0.0.0/8
,
* 172.16.0.0/12
, or 192.168.0.0/16
.
*
* Doesn't overlap with any CIDR block assigned to the VPC that you selected for VPC. *
** Between /24 and /12. *
** You can only specify a custom CIDR block when you create a cluster and can't change this value once the * cluster is created. *
*/ public String getServiceIpv4Cidr() { return this.serviceIpv4Cidr; } /** *
* Don't specify a value if you select ipv6
for ipFamily. The CIDR block to assign Kubernetes
* service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from either the
* 10.100.0.0/16
or 172.20.0.0/16
CIDR blocks. We recommend that you specify a block that
* does not overlap with resources in other networks that are peered or connected to your VPC. The block must meet
* the following requirements:
*
* Within one of the following private IP address blocks: 10.0.0.0/8
, 172.16.0.0/12
, or
* 192.168.0.0/16
.
*
* Doesn't overlap with any CIDR block assigned to the VPC that you selected for VPC. *
** Between /24 and /12. *
** You can only specify a custom CIDR block when you create a cluster and can't change this value once the cluster * is created. *
*ipv6
for ipFamily. The CIDR block to assign
* Kubernetes service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from
* either the 10.100.0.0/16
or 172.20.0.0/16
CIDR blocks. We recommend that you
* specify a block that does not overlap with resources in other networks that are peered or connected to
* your VPC. The block must meet the following requirements:
*
* Within one of the following private IP address blocks: 10.0.0.0/8
, 172.16.0.0/12
* , or 192.168.0.0/16
.
*
* Doesn't overlap with any CIDR block assigned to the VPC that you selected for VPC. *
** Between /24 and /12. *
** You can only specify a custom CIDR block when you create a cluster and can't change this value once the * cluster is created. *
* @return Returns a reference to this object so that method calls can be chained together. */ public KubernetesNetworkConfigRequest withServiceIpv4Cidr(String serviceIpv4Cidr) { setServiceIpv4Cidr(serviceIpv4Cidr); return this; } /** *
* Specify which IP family is used to assign Kubernetes pod and service IP addresses. If you don't specify a value,
* ipv4
is used by default. You can only specify an IP family when you create a cluster and can't
* change this value once the cluster is created. If you specify ipv6
, the VPC and subnets that you
* specify for cluster creation must have both IPv4
and IPv6
CIDR blocks assigned to them.
* You can't specify ipv6
for clusters in China Regions.
*
* You can only specify ipv6
for 1.21
and later clusters that use version
* 1.10.1
or later of the Amazon VPC CNI add-on. If you specify ipv6
, then ensure that
* your VPC meets the requirements listed in the considerations listed in Assigning IPv6 addresses to pods and
* services in the Amazon EKS User Guide. Kubernetes assigns services IPv6
addresses from the
* unique local address range (fc00::/7)
. You can't specify a custom IPv6
CIDR block. Pod
* addresses are assigned from the subnet's IPv6
CIDR.
*
ipv4
is used by default. You can only specify an IP family when you create a cluster
* and can't change this value once the cluster is created. If you specify ipv6
, the VPC and
* subnets that you specify for cluster creation must have both IPv4
and IPv6
CIDR
* blocks assigned to them. You can't specify ipv6
for clusters in China Regions.
*
* You can only specify ipv6
for 1.21
and later clusters that use version
* 1.10.1
or later of the Amazon VPC CNI add-on. If you specify ipv6
, then ensure
* that your VPC meets the requirements listed in the considerations listed in Assigning IPv6 addresses to pods and
* services in the Amazon EKS User Guide. Kubernetes assigns services IPv6
addresses from
* the unique local address range (fc00::/7)
. You can't specify a custom IPv6
CIDR
* block. Pod addresses are assigned from the subnet's IPv6
CIDR.
* @see IpFamily
*/
public void setIpFamily(String ipFamily) {
this.ipFamily = ipFamily;
}
/**
*
* Specify which IP family is used to assign Kubernetes pod and service IP addresses. If you don't specify a value,
* ipv4
is used by default. You can only specify an IP family when you create a cluster and can't
* change this value once the cluster is created. If you specify ipv6
, the VPC and subnets that you
* specify for cluster creation must have both IPv4
and IPv6
CIDR blocks assigned to them.
* You can't specify ipv6
for clusters in China Regions.
*
* You can only specify ipv6
for 1.21
and later clusters that use version
* 1.10.1
or later of the Amazon VPC CNI add-on. If you specify ipv6
, then ensure that
* your VPC meets the requirements listed in the considerations listed in Assigning IPv6 addresses to pods and
* services in the Amazon EKS User Guide. Kubernetes assigns services IPv6
addresses from the
* unique local address range (fc00::/7)
. You can't specify a custom IPv6
CIDR block. Pod
* addresses are assigned from the subnet's IPv6
CIDR.
*
ipv4
is used by default. You can only specify an IP family when you create a cluster
* and can't change this value once the cluster is created. If you specify ipv6
, the VPC and
* subnets that you specify for cluster creation must have both IPv4
and IPv6
CIDR
* blocks assigned to them. You can't specify ipv6
for clusters in China Regions.
*
* You can only specify ipv6
for 1.21
and later clusters that use version
* 1.10.1
or later of the Amazon VPC CNI add-on. If you specify ipv6
, then ensure
* that your VPC meets the requirements listed in the considerations listed in Assigning IPv6 addresses to pods
* and services in the Amazon EKS User Guide. Kubernetes assigns services IPv6
addresses
* from the unique local address range (fc00::/7)
. You can't specify a custom IPv6
* CIDR block. Pod addresses are assigned from the subnet's IPv6
CIDR.
* @see IpFamily
*/
public String getIpFamily() {
return this.ipFamily;
}
/**
*
* Specify which IP family is used to assign Kubernetes pod and service IP addresses. If you don't specify a value,
* ipv4
is used by default. You can only specify an IP family when you create a cluster and can't
* change this value once the cluster is created. If you specify ipv6
, the VPC and subnets that you
* specify for cluster creation must have both IPv4
and IPv6
CIDR blocks assigned to them.
* You can't specify ipv6
for clusters in China Regions.
*
* You can only specify ipv6
for 1.21
and later clusters that use version
* 1.10.1
or later of the Amazon VPC CNI add-on. If you specify ipv6
, then ensure that
* your VPC meets the requirements listed in the considerations listed in Assigning IPv6 addresses to pods and
* services in the Amazon EKS User Guide. Kubernetes assigns services IPv6
addresses from the
* unique local address range (fc00::/7)
. You can't specify a custom IPv6
CIDR block. Pod
* addresses are assigned from the subnet's IPv6
CIDR.
*
ipv4
is used by default. You can only specify an IP family when you create a cluster
* and can't change this value once the cluster is created. If you specify ipv6
, the VPC and
* subnets that you specify for cluster creation must have both IPv4
and IPv6
CIDR
* blocks assigned to them. You can't specify ipv6
for clusters in China Regions.
*
* You can only specify ipv6
for 1.21
and later clusters that use version
* 1.10.1
or later of the Amazon VPC CNI add-on. If you specify ipv6
, then ensure
* that your VPC meets the requirements listed in the considerations listed in Assigning IPv6 addresses to pods and
* services in the Amazon EKS User Guide. Kubernetes assigns services IPv6
addresses from
* the unique local address range (fc00::/7)
. You can't specify a custom IPv6
CIDR
* block. Pod addresses are assigned from the subnet's IPv6
CIDR.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpFamily
*/
public KubernetesNetworkConfigRequest withIpFamily(String ipFamily) {
setIpFamily(ipFamily);
return this;
}
/**
*
* Specify which IP family is used to assign Kubernetes pod and service IP addresses. If you don't specify a value,
* ipv4
is used by default. You can only specify an IP family when you create a cluster and can't
* change this value once the cluster is created. If you specify ipv6
, the VPC and subnets that you
* specify for cluster creation must have both IPv4
and IPv6
CIDR blocks assigned to them.
* You can't specify ipv6
for clusters in China Regions.
*
* You can only specify ipv6
for 1.21
and later clusters that use version
* 1.10.1
or later of the Amazon VPC CNI add-on. If you specify ipv6
, then ensure that
* your VPC meets the requirements listed in the considerations listed in Assigning IPv6 addresses to pods and
* services in the Amazon EKS User Guide. Kubernetes assigns services IPv6
addresses from the
* unique local address range (fc00::/7)
. You can't specify a custom IPv6
CIDR block. Pod
* addresses are assigned from the subnet's IPv6
CIDR.
*
ipv4
is used by default. You can only specify an IP family when you create a cluster
* and can't change this value once the cluster is created. If you specify ipv6
, the VPC and
* subnets that you specify for cluster creation must have both IPv4
and IPv6
CIDR
* blocks assigned to them. You can't specify ipv6
for clusters in China Regions.
*
* You can only specify ipv6
for 1.21
and later clusters that use version
* 1.10.1
or later of the Amazon VPC CNI add-on. If you specify ipv6
, then ensure
* that your VPC meets the requirements listed in the considerations listed in Assigning IPv6 addresses to pods and
* services in the Amazon EKS User Guide. Kubernetes assigns services IPv6
addresses from
* the unique local address range (fc00::/7)
. You can't specify a custom IPv6
CIDR
* block. Pod addresses are assigned from the subnet's IPv6
CIDR.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpFamily
*/
public KubernetesNetworkConfigRequest withIpFamily(IpFamily ipFamily) {
this.ipFamily = ipFamily.toString();
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getServiceIpv4Cidr() != null)
sb.append("ServiceIpv4Cidr: ").append(getServiceIpv4Cidr()).append(",");
if (getIpFamily() != null)
sb.append("IpFamily: ").append(getIpFamily());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof KubernetesNetworkConfigRequest == false)
return false;
KubernetesNetworkConfigRequest other = (KubernetesNetworkConfigRequest) obj;
if (other.getServiceIpv4Cidr() == null ^ this.getServiceIpv4Cidr() == null)
return false;
if (other.getServiceIpv4Cidr() != null && other.getServiceIpv4Cidr().equals(this.getServiceIpv4Cidr()) == false)
return false;
if (other.getIpFamily() == null ^ this.getIpFamily() == null)
return false;
if (other.getIpFamily() != null && other.getIpFamily().equals(this.getIpFamily()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getServiceIpv4Cidr() == null) ? 0 : getServiceIpv4Cidr().hashCode());
hashCode = prime * hashCode + ((getIpFamily() == null) ? 0 : getIpFamily().hashCode());
return hashCode;
}
@Override
public KubernetesNetworkConfigRequest clone() {
try {
return (KubernetesNetworkConfigRequest) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.eks.model.transform.KubernetesNetworkConfigRequestMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}