@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-13T01:13:37.580Z") public class HttpNamespace extends Resource implements IHttpNamespace
Example:
import software.amazon.awscdk.core.*; import software.amazon.awscdk.services.servicediscovery.*; App app = new App(); Stack stack = new Stack(app, "aws-servicediscovery-integ"); HttpNamespace namespace = HttpNamespace.Builder.create(stack, "MyNamespace") .name("covfefe") .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:::mybucket")) .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();
Modifier and Type | Class and Description |
---|---|
static class |
HttpNamespace.Builder
A fluent builder for
HttpNamespace . |
IHttpNamespace.Jsii$Default, IHttpNamespace.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
HttpNamespace(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
HttpNamespace(software.amazon.jsii.JsiiObjectRef objRef) |
|
HttpNamespace(software.constructs.Construct scope,
java.lang.String id,
HttpNamespaceProps props) |
Modifier and Type | Method and Description |
---|---|
Service |
createService(java.lang.String id)
Creates a service within the namespace.
|
Service |
createService(java.lang.String id,
BaseServiceProps props)
Creates a service within the namespace.
|
static IHttpNamespace |
fromHttpNamespaceAttributes(software.constructs.Construct scope,
java.lang.String id,
HttpNamespaceAttributes attrs) |
java.lang.String |
getHttpNamespaceArn() |
java.lang.String |
getHttpNamespaceId() |
java.lang.String |
getHttpNamespaceName() |
java.lang.String |
getNamespaceArn()
Namespace Arn for the namespace.
|
java.lang.String |
getNamespaceId()
Namespace Id for the namespace.
|
java.lang.String |
getNamespaceName()
A name for the namespace.
|
NamespaceType |
getType()
Type of the namespace.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected HttpNamespace(software.amazon.jsii.JsiiObjectRef objRef)
protected HttpNamespace(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public HttpNamespace(software.constructs.Construct scope, java.lang.String id, HttpNamespaceProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static IHttpNamespace fromHttpNamespaceAttributes(software.constructs.Construct scope, java.lang.String id, HttpNamespaceAttributes attrs)
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.public Service createService(java.lang.String id, BaseServiceProps props)
id
- This parameter is required.props
- public Service createService(java.lang.String id)
id
- This parameter is required.public java.lang.String getHttpNamespaceArn()
public java.lang.String getHttpNamespaceId()
public java.lang.String getHttpNamespaceName()
public java.lang.String getNamespaceArn()
getNamespaceArn
in interface INamespace
public java.lang.String getNamespaceId()
getNamespaceId
in interface INamespace
public java.lang.String getNamespaceName()
getNamespaceName
in interface INamespace
public NamespaceType getType()
getType
in interface INamespace