Enum DiscoveryType
- All Implemented Interfaces:
Serializable
,Comparable<DiscoveryType>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)",
date="2024-07-05T20:26:38.883Z")
@Stability(Stable)
public enum DiscoveryType
extends Enum<DiscoveryType>
Specifies information about the discovery type of a service.
Example:
import software.amazon.awscdk.services.ec2.*; import software.amazon.awscdk.services.elasticloadbalancingv2.*; import software.amazon.awscdk.*; import software.amazon.awscdk.*; App app = new App(); Stack stack = new Stack(app, "aws-servicediscovery-integ"); Vpc vpc = Vpc.Builder.create(stack, "Vpc").maxAzs(2).build(); PrivateDnsNamespace namespace = PrivateDnsNamespace.Builder.create(stack, "Namespace") .name("boobar.com") .vpc(vpc) .build(); Service service = namespace.createService("Service", DnsServiceProps.builder() .dnsRecordType(DnsRecordType.A_AAAA) .dnsTtl(Duration.seconds(30)) .loadBalancer(true) .build()); ApplicationLoadBalancer loadbalancer = ApplicationLoadBalancer.Builder.create(stack, "LB").vpc(vpc).internetFacing(true).build(); service.registerLoadBalancer("Loadbalancer", loadbalancer); Service arnService = namespace.createService("ArnService", DnsServiceProps.builder() .discoveryType(DiscoveryType.API) .build()); arnService.registerNonIpInstance("NonIpInstance", NonIpInstanceBaseProps.builder() .customAttributes(Map.of("arn", "arn://")) .build()); app.synth();
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionInstances are discoverable via API only.Instances are discoverable via DNS or API. -
Method Summary
Modifier and TypeMethodDescriptionstatic DiscoveryType
Returns the enum constant of this type with the specified name.static DiscoveryType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
API
Instances are discoverable via API only. -
DNS_AND_API
Instances are discoverable via DNS or API.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-