Show / Hide Table of Contents

Interface IHttpNamespaceProps

Inherited Members
IBaseNamespaceProps.Name
IBaseNamespaceProps.Description
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IHttpNamespaceProps : IBaseNamespaceProps
Syntax (vb)
Public Interface IHttpNamespaceProps Inherits 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:::amzn-s3-demo-bucket" } }
            });

            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

Back to top Generated by DocFX