Class IpInstanceProps.Builder
java.lang.Object
software.amazon.awscdk.services.servicediscovery.IpInstanceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<IpInstanceProps>
- Enclosing interface:
IpInstanceProps
@Stability(Stable)
public static final class IpInstanceProps.Builder
extends Object
implements software.amazon.jsii.Builder<IpInstanceProps>
A builder for
IpInstanceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.customAttributes
(Map<String, String> customAttributes) Sets the value ofBaseInstanceProps.getCustomAttributes()
instanceId
(String instanceId) Sets the value ofBaseInstanceProps.getInstanceId()
Sets the value ofIpInstanceBaseProps.getIpv4()
Sets the value ofIpInstanceBaseProps.getIpv6()
Sets the value ofIpInstanceBaseProps.getPort()
Sets the value ofIpInstanceProps.getService()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
service
Sets the value ofIpInstanceProps.getService()
- Parameters:
service
- The Cloudmap service this resource is registered to. This parameter is required.- Returns:
this
-
ipv4
Sets the value ofIpInstanceBaseProps.getIpv4()
- Parameters:
ipv4
- If the service that you specify contains a template for an A record, the IPv4 address that you want AWS Cloud Map to use for the value of the A record.- Returns:
this
-
ipv6
Sets the value ofIpInstanceBaseProps.getIpv6()
- Parameters:
ipv6
- If the service that you specify contains a template for an AAAA record, the IPv6 address that you want AWS Cloud Map to use for the value of the AAAA record.- Returns:
this
-
port
Sets the value ofIpInstanceBaseProps.getPort()
- Parameters:
port
- The port on the endpoint that you want AWS Cloud Map to perform health checks on. This value is also used for the port value in an SRV record if the service that you specify includes an SRV record. You can also specify a default port that is applied to all instances in the Service configuration.- Returns:
this
-
customAttributes
@Stability(Stable) public IpInstanceProps.Builder customAttributes(Map<String, String> customAttributes) Sets the value ofBaseInstanceProps.getCustomAttributes()
- Parameters:
customAttributes
- Custom attributes of the instance.- Returns:
this
-
instanceId
Sets the value ofBaseInstanceProps.getInstanceId()
- Parameters:
instanceId
- The id of the instance resource.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<IpInstanceProps>
- Returns:
- a new instance of
IpInstanceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-