Interface BaseServiceProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
DnsServiceProps,ServiceProps
- All Known Implementing Classes:
BaseServiceProps.Jsii$Proxy,DnsServiceProps.Jsii$Proxy,ServiceProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:30.329Z")
@Stability(Stable)
public interface BaseServiceProps
extends software.amazon.jsii.JsiiSerializable
Basic props needed to create a service in a given namespace.
Used by HttpNamespace.createService
Example:
import software.amazon.awscdk.*;
import software.amazon.awscdk.*;
App app = new App();
Stack stack = new Stack(app, "aws-servicediscovery-integ");
HttpNamespace namespace = HttpNamespace.Builder.create(stack, "MyNamespace")
.name("MyHTTPNamespace")
.build();
Service service1 = namespace.createService("NonIpService", BaseServiceProps.builder()
.description("service registering non-ip instances")
.build());
service1.registerNonIpInstance("NonIpInstance", NonIpInstanceBaseProps.builder()
.customAttributes(Map.of("arn", "arn:aws:s3:::amzn-s3-demo-bucket"))
.build());
Service service2 = namespace.createService("IpService", BaseServiceProps.builder()
.description("service registering ip instances")
.healthCheck(HealthCheckConfig.builder()
.type(HealthCheckType.HTTP)
.resourcePath("/check")
.build())
.build());
service2.registerIpInstance("IpInstance", IpInstanceBaseProps.builder()
.ipv4("54.239.25.192")
.build());
app.synth();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forBaseServicePropsstatic final classAn implementation forBaseServiceProps -
Method Summary
Modifier and TypeMethodDescriptionstatic BaseServiceProps.Builderbuilder()default HealthCheckCustomConfigStructure containing failure threshold for a custom health checker.default StringA description of the service.default HealthCheckConfigSettings for an optional health check.default StringgetName()A name for the Service.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCustomHealthCheck
Structure containing failure threshold for a custom health checker.Only one of healthCheckConfig or healthCheckCustomConfig can be specified. See: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html
Default: none
-
getDescription
A description of the service.Default: none
-
getHealthCheck
Settings for an optional health check.If you specify health check settings, AWS Cloud Map associates the health check with the records that you specify in DnsConfig. Only one of healthCheckConfig or healthCheckCustomConfig can be specified. Not valid for PrivateDnsNamespaces. If you use healthCheck, you can only register IP instances to this service.
Default: none
-
getName
A name for the Service.Default: CloudFormation-generated name
-
builder
- Returns:
- a
BaseServiceProps.BuilderofBaseServiceProps
-