Show / Hide Table of Contents

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.

INamespace? CloudMapNamespace { get; }
Property Value

INamespace

Remarks

Default: - the defaultCloudMapNamespace associated to the cluster

Container

The container to point to for a SRV record.

ContainerDefinition? Container { get; }
Property Value

ContainerDefinition

Remarks

Default: - the task definition's default container

ContainerPort

The port to point to for a SRV record.

double? ContainerPort { get; }
Property Value

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.

DnsRecordType? DnsRecordType { get; }
Property Value

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.

Duration? DnsTtl { get; }
Property Value

Duration

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.

double? FailureThreshold { get; }
Property Value

double?

Remarks

NOTE: This is used for HealthCheckCustomConfig

Name

The name of the Cloud Map service to attach to the ECS service.

string? Name { get; }
Property Value

string

Remarks

Default: CloudFormation-generated name

Back to top Generated by DocFX