Class Endpoint.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<Endpoint>
    Enclosing interface:
    Endpoint

    @Stability(Stable)
    public static final class Endpoint.Builder
    extends Object
    implements software.amazon.jsii.Builder<Endpoint>
    A builder for Endpoint
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • addresses

        @Stability(Stable)
        public Endpoint.Builder addresses​(List<String> addresses)
        Sets the value of Endpoint.getAddresses()
        Parameters:
        addresses - addresses of this endpoint. This parameter is required. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267
        Returns:
        this
      • deprecatedTopology

        @Stability(Stable)
        public Endpoint.Builder deprecatedTopology​(Map<String,​String> deprecatedTopology)
        Parameters:
        deprecatedTopology - deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.
        Returns:
        this
      • hostname

        @Stability(Stable)
        public Endpoint.Builder hostname​(String hostname)
        Sets the value of Endpoint.getHostname()
        Parameters:
        hostname - hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.
        Returns:
        this
      • nodeName

        @Stability(Stable)
        public Endpoint.Builder nodeName​(String nodeName)
        Sets the value of Endpoint.getNodeName()
        Parameters:
        nodeName - nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
        Returns:
        this
      • build

        @Stability(Stable)
        public Endpoint build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<Endpoint>
        Returns:
        a new instance of Endpoint
        Throws:
        NullPointerException - if any required attribute was not provided