@Stability(value=Stable) public static final class ServiceProps.Builder extends Object implements software.amazon.jsii.Builder<ServiceProps>
ServiceProps| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ServiceProps |
build()
Builds the configured instance.
|
ServiceProps.Builder |
clusterIp(String clusterIp)
Sets the value of
ServiceProps#getClusterIp |
ServiceProps.Builder |
externalIPs(List<String> externalIPs)
Sets the value of
ServiceProps.getExternalIPs() |
ServiceProps.Builder |
externalName(String externalName)
Sets the value of
ServiceProps.getExternalName() |
ServiceProps.Builder |
loadBalancerSourceRanges(List<String> loadBalancerSourceRanges)
Sets the value of
ServiceProps.getLoadBalancerSourceRanges() |
ServiceProps.Builder |
metadata(org.cdk8s.ApiObjectMetadata metadata)
Sets the value of
ResourceProps.getMetadata() |
ServiceProps.Builder |
ports(List<? extends ServicePort> ports)
Sets the value of
ServiceProps.getPorts() |
ServiceProps.Builder |
type(ServiceType type)
Sets the value of
ServiceProps.getType() |
@Stability(value=Stable) public ServiceProps.Builder clusterIp(String clusterIp)
ServiceProps#getClusterIpclusterIp - The IP address of the service and is usually assigned randomly by the master.
If an address is specified manually and is not in use by others, it
will be allocated to the service; otherwise, creation of the service will
fail. This field can not be changed through updates. Valid values are
"None", empty string (""), or a valid IP address. "None" can be specified
for headless services when proxying is not required. Only applies to types
ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName.this@Stability(value=Stable) public ServiceProps.Builder externalIPs(List<String> externalIPs)
ServiceProps.getExternalIPs()externalIPs - A list of IP addresses for which nodes in the cluster will also accept traffic for this service.
These IPs are not managed by Kubernetes. The user
is responsible for ensuring that traffic arrives at a node with this IP. A
common example is external load-balancers that are not part of the
Kubernetes system.this@Stability(value=Stable) public ServiceProps.Builder externalName(String externalName)
ServiceProps.getExternalName()externalName - The externalName to be used when ServiceType.EXTERNAL_NAME is set.this@Stability(value=Stable) public ServiceProps.Builder loadBalancerSourceRanges(List<String> loadBalancerSourceRanges)
ServiceProps.getLoadBalancerSourceRanges()loadBalancerSourceRanges - A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs.
More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/this@Stability(value=Stable) public ServiceProps.Builder ports(List<? extends ServicePort> ports)
ServiceProps.getPorts()ports - The port exposed by this service.
More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxiesthis@Stability(value=Stable) public ServiceProps.Builder type(ServiceType type)
ServiceProps.getType()type - Determines how the Service is exposed.
More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-typesthis@Stability(value=Stable) public ServiceProps.Builder metadata(org.cdk8s.ApiObjectMetadata metadata)
ResourceProps.getMetadata()metadata - Metadata that all persisted resources must have, which includes all objects users must create.this@Stability(value=Stable) public ServiceProps build()
build in interface software.amazon.jsii.Builder<ServiceProps>ServicePropsNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.