Class HttpNamespaceProps
Inheritance
System.Object
HttpNamespaceProps
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class HttpNamespaceProps : Object, IHttpNamespaceProps, IBaseNamespaceProps
Syntax (vb)
Public Class HttpNamespaceProps
Inherits Object
Implements IHttpNamespaceProps, IBaseNamespaceProps
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
HttpNamespaceProps() |
Properties
Description | A description of the Namespace. |
Name | A name for the Namespace. |
Constructors
HttpNamespaceProps()
public HttpNamespaceProps()
Properties
Description
A description of the Namespace.
public string Description { get; set; }
Property Value
System.String
Remarks
Default: none
Name
A name for the Namespace.
public string Name { get; set; }
Property Value
System.String