Class CfnServiceProps
Properties for defining a CfnService
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnServiceProps : Object, ICfnServiceProps
Syntax (vb)
Public Class CfnServiceProps
Inherits Object
Implements ICfnServiceProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ServiceDiscovery;
var serviceAttributes;
var cfnServiceProps = new CfnServiceProps {
Description = "description",
DnsConfig = new DnsConfigProperty {
DnsRecords = new [] { new DnsRecordProperty {
Ttl = 123,
Type = "type"
} },
// the properties below are optional
NamespaceId = "namespaceId",
RoutingPolicy = "routingPolicy"
},
HealthCheckConfig = new HealthCheckConfigProperty {
Type = "type",
// the properties below are optional
FailureThreshold = 123,
ResourcePath = "resourcePath"
},
HealthCheckCustomConfig = new HealthCheckCustomConfigProperty {
FailureThreshold = 123
},
Name = "name",
NamespaceId = "namespaceId",
ServiceAttributes = serviceAttributes,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
Type = "type"
};
Synopsis
Constructors
Cfn |
Properties
Description | The description of the service. |
Dns |
A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance. |
Health |
Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify in |
Health |
A complex type that contains information about an optional custom health check. |
Name | The name of the service. |
Namespace |
The ID of the namespace that was used to create the service. |
Service |
A string map that contains the following information for the service:. |
Tags | The tags for the service. |
Type | If present, specifies that the service instances are only discoverable using the |
Constructors
CfnServiceProps()
public CfnServiceProps()
Properties
Description
The description of the service.
public string Description { get; set; }
Property Value
System.
Remarks
DnsConfig
A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
public object DnsConfig { get; set; }
Property Value
System.
Remarks
The record types of a service can only be changed by deleting the service and recreating it with a new Dnsconfig
.
HealthCheckConfig
Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify in DnsConfig
.
public object HealthCheckConfig { get; set; }
Property Value
System.
Remarks
For information about the charges for health checks, see Amazon Route 53 Pricing .
HealthCheckCustomConfig
A complex type that contains information about an optional custom health check.
public object HealthCheckCustomConfig { get; set; }
Property Value
System.
Remarks
If you specify a health check configuration, you can specify either HealthCheckCustomConfig
or HealthCheckConfig
but not both.
Name
The name of the service.
public string Name { get; set; }
Property Value
System.
Remarks
NamespaceId
The ID of the namespace that was used to create the service.
public string NamespaceId { get; set; }
Property Value
System.
Remarks
You must specify a value for NamespaceId
either for the service properties or for DnsConfig . Don't specify a value in both places.
ServiceAttributes
A string map that contains the following information for the service:.
public object ServiceAttributes { get; set; }
Property Value
System.
Remarks
You can specify a total of 30 attributes.
Tags
The tags for the service.
public ICfnTag[] Tags { get; set; }
Property Value
ICfn
Remarks
Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
Type
If present, specifies that the service instances are only discoverable using the DiscoverInstances
API operation.
public string Type { get; set; }
Property Value
System.
Remarks
No DNS records is registered for the service instances. The only valid value is HTTP
.