Class IpInstanceBaseProps
Inheritance
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class IpInstanceBaseProps : Object, IIpInstanceBaseProps, IBaseInstanceProps
Syntax (vb)
Public Class IpInstanceBaseProps
Inherits Object
Implements IIpInstanceBaseProps, IBaseInstanceProps
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
IpInstanceBaseProps() |
Properties
CustomAttributes | Custom attributes of the instance. |
InstanceId | The id of the instance resource. |
Ipv4 | If the service that you specify contains a template for an A record, the IPv4 address that you want AWS Cloud Map to use for the value of the A record. |
Ipv6 | If the service that you specify contains a template for an AAAA record, the IPv6 address that you want AWS Cloud Map to use for the value of the AAAA record. |
Port | The port on the endpoint that you want AWS Cloud Map to perform health checks on. |
Constructors
IpInstanceBaseProps()
public IpInstanceBaseProps()
Properties
CustomAttributes
Custom attributes of the instance.
public IDictionary<string, string> CustomAttributes { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: none
InstanceId
The id of the instance resource.
public string InstanceId { get; set; }
Property Value
System.String
Remarks
Default: Automatically generated name
Ipv4
If the service that you specify contains a template for an A record, the IPv4 address that you want AWS Cloud Map to use for the value of the A record.
public string Ipv4 { get; set; }
Property Value
System.String
Remarks
Default: none
Ipv6
If the service that you specify contains a template for an AAAA record, the IPv6 address that you want AWS Cloud Map to use for the value of the AAAA record.
public string Ipv6 { get; set; }
Property Value
System.String
Remarks
Default: none
Port
The port on the endpoint that you want AWS Cloud Map to perform health checks on.
public Nullable<double> Port { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
This value is also used for the port value in an SRV record if the service that you specify includes an SRV record. You can also specify a default port that is applied to all instances in the Service configuration.
Default: 80