Class HttpNamespace
Define an HTTP Namespace.
Inherited Members
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class HttpNamespace : Resource, IHttpNamespace, INamespace, IResource
Syntax (vb)
Public Class HttpNamespace
Inherits Resource
Implements IHttpNamespace, INamespace, IResource
Remarks
ExampleMetadata: lit=aws-servicediscovery/test/integ.service-with-http-namespace.lit.ts infused
Examples
using Amazon.CDK;
using Amazon.CDK;
var app = new App();
var stack = new Stack(app, "aws-servicediscovery-integ");
var namespace = new HttpNamespace(stack, "MyNamespace", new HttpNamespaceProps {
Name = "MyHTTPNamespace"
});
var service1 = namespace.CreateService("NonIpService", new BaseServiceProps {
Description = "service registering non-ip instances"
});
service1.RegisterNonIpInstance("NonIpInstance", new NonIpInstanceBaseProps {
CustomAttributes = new Dictionary<string, string> { { "arn", "arn:aws:s3:::mybucket" } }
});
var service2 = namespace.CreateService("IpService", new BaseServiceProps {
Description = "service registering ip instances",
HealthCheck = new HealthCheckConfig {
Type = HealthCheckType.HTTP,
ResourcePath = "/check"
}
});
service2.RegisterIpInstance("IpInstance", new IpInstanceBaseProps {
Ipv4 = "54.239.25.192"
});
app.Synth();
Synopsis
Constructors
HttpNamespace(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HttpNamespace(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
HttpNamespace(Construct, String, IHttpNamespaceProps) |
Properties
HttpNamespaceArn | |
HttpNamespaceId | |
HttpNamespaceName | |
NamespaceArn | Namespace Arn for the namespace. |
NamespaceId | Namespace Id for the namespace. |
NamespaceName | A name for the namespace. |
Type | Type of the namespace. |
Methods
CreateService(String, IBaseServiceProps) | Creates a service within the namespace. |
FromHttpNamespaceAttributes(Construct, String, IHttpNamespaceAttributes) |
Constructors
HttpNamespace(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HttpNamespace(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HttpNamespace(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HttpNamespace(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
HttpNamespace(Construct, String, IHttpNamespaceProps)
public HttpNamespace(Construct scope, string id, IHttpNamespaceProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IHttpNamespaceProps
Properties
HttpNamespaceArn
public virtual string HttpNamespaceArn { get; }
Property Value
System.String
Remarks
Attribute: true
HttpNamespaceId
public virtual string HttpNamespaceId { get; }
Property Value
System.String
Remarks
Attribute: true
HttpNamespaceName
public virtual string HttpNamespaceName { get; }
Property Value
System.String
Remarks
Attribute: true
NamespaceArn
Namespace Arn for the namespace.
public virtual string NamespaceArn { get; }
Property Value
System.String
NamespaceId
Namespace Id for the namespace.
public virtual string NamespaceId { get; }
Property Value
System.String
NamespaceName
A name for the namespace.
public virtual string NamespaceName { get; }
Property Value
System.String
Type
Methods
CreateService(String, IBaseServiceProps)
Creates a service within the namespace.
public virtual Service CreateService(string id, IBaseServiceProps props = null)
Parameters
- id System.String
- props IBaseServiceProps
Returns
FromHttpNamespaceAttributes(Construct, String, IHttpNamespaceAttributes)
public static IHttpNamespace FromHttpNamespaceAttributes(Construct scope, string id, IHttpNamespaceAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IHttpNamespaceAttributes
Returns