Class HttpNamespace
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.servicediscovery.HttpNamespace
- All Implemented Interfaces:
IResource,IHttpNamespace,INamespace,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:48.800Z")
@Stability(Stable)
public class HttpNamespace
extends Resource
implements IHttpNamespace
Define an HTTP Namespace.
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 ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.servicediscovery.IHttpNamespace
IHttpNamespace.Jsii$Default, IHttpNamespace.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpNamespace(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedHttpNamespace(software.amazon.jsii.JsiiObjectRef objRef) HttpNamespace(software.constructs.Construct scope, String id, HttpNamespaceProps props) -
Method Summary
Modifier and TypeMethodDescriptioncreateService(String id) Creates a service within the namespace.createService(String id, BaseServiceProps props) Creates a service within the namespace.static IHttpNamespacefromHttpNamespaceAttributes(software.constructs.Construct scope, String id, HttpNamespaceAttributes attrs) Namespace Arn for the namespace.Namespace Id for the namespace.A name for the namespace.getType()Type of the namespace.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
HttpNamespace
protected HttpNamespace(software.amazon.jsii.JsiiObjectRef objRef) -
HttpNamespace
protected HttpNamespace(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
HttpNamespace
@Stability(Stable) public HttpNamespace(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HttpNamespaceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromHttpNamespaceAttributes
@Stability(Stable) @NotNull public static IHttpNamespace fromHttpNamespaceAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HttpNamespaceAttributes attrs) - Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
createService
@Stability(Stable) @NotNull public Service createService(@NotNull String id, @Nullable BaseServiceProps props) Creates a service within the namespace.- Parameters:
id- This parameter is required.props-
-
createService
Creates a service within the namespace.- Parameters:
id- This parameter is required.
-
getHttpNamespaceArn
-
getHttpNamespaceId
-
getHttpNamespaceName
-
getNamespaceArn
Namespace Arn for the namespace.- Specified by:
getNamespaceArnin interfaceINamespace
-
getNamespaceId
Namespace Id for the namespace.- Specified by:
getNamespaceIdin interfaceINamespace
-
getNamespaceName
A name for the namespace.- Specified by:
getNamespaceNamein interfaceINamespace
-
getType
Type of the namespace.- Specified by:
getTypein interfaceINamespace
-