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.104.0 (build e79254c)",
date="2024-11-21T06:34:16.241Z")
@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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.servicediscovery.IHttpNamespace
IHttpNamespace.Jsii$Default, IHttpNamespace.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
HttpNamespace
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
HttpNamespace
(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 IHttpNamespace
fromHttpNamespaceAttributes
(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, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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:
getNamespaceArn
in interfaceINamespace
-
getNamespaceId
Namespace Id for the namespace.- Specified by:
getNamespaceId
in interfaceINamespace
-
getNamespaceName
A name for the namespace.- Specified by:
getNamespaceName
in interfaceINamespace
-
getType
Type of the namespace.- Specified by:
getType
in interfaceINamespace
-