Interface ICloudMapOptions
The options to enabling AWS Cloud Map for an Amazon ECS service.
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICloudMapOptions
Syntax (vb)
Public Interface ICloudMapOptions
Remarks
ExampleMetadata: infused
Examples
TaskDefinition taskDefinition;
Cluster cluster;
var service = new Ec2Service(this, "Service", new Ec2ServiceProps {
Cluster = cluster,
TaskDefinition = taskDefinition,
CloudMapOptions = new CloudMapOptions {
// Create A records - useful for AWSVPC network mode.
DnsRecordType = DnsRecordType.A
}
});
Synopsis
Properties
CloudMapNamespace | The service discovery namespace for the Cloud Map service to attach to the ECS service. |
Container | The container to point to for a SRV record. |
ContainerPort | The port to point to for a SRV record. |
DnsRecordType | The DNS record type that you want AWS Cloud Map to create. |
DnsTtl | The amount of time that you want DNS resolvers to cache the settings for this record. |
FailureThreshold | The number of 30-second intervals that you want Cloud Map to wait after receiving an UpdateInstanceCustomHealthStatus request before it changes the health status of a service instance. |
Name | The name of the Cloud Map service to attach to the ECS service. |
Properties
CloudMapNamespace
The service discovery namespace for the Cloud Map service to attach to the ECS service.
virtual INamespace CloudMapNamespace { get; }
Property Value
Remarks
Default: - the defaultCloudMapNamespace associated to the cluster
Container
The container to point to for a SRV record.
virtual ContainerDefinition Container { get; }
Property Value
Remarks
Default: - the task definition's default container
ContainerPort
The port to point to for a SRV record.
virtual Nullable<double> ContainerPort { get; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - the default port of the task definition's default container
DnsRecordType
The DNS record type that you want AWS Cloud Map to create.
virtual Nullable<DnsRecordType> DnsRecordType { get; }
Property Value
System.Nullable<DnsRecordType>
Remarks
The supported record types are A or SRV.
Default: - DnsRecordType.A if TaskDefinition.networkMode = AWS_VPC, otherwise DnsRecordType.SRV
DnsTtl
The amount of time that you want DNS resolvers to cache the settings for this record.
virtual Duration DnsTtl { get; }
Property Value
Remarks
Default: Duration.minutes(1)
FailureThreshold
The number of 30-second intervals that you want Cloud Map to wait after receiving an UpdateInstanceCustomHealthStatus request before it changes the health status of a service instance.
virtual Nullable<double> FailureThreshold { get; }
Property Value
System.Nullable<System.Double>
Remarks
NOTE: This is used for HealthCheckCustomConfig
Name
The name of the Cloud Map service to attach to the ECS service.
virtual string Name { get; }
Property Value
System.String
Remarks
Default: CloudFormation-generated name