Show / Hide Table of Contents

Class CloudMapOptions

The options to enabling AWS Cloud Map for an Amazon ECS service.

Inheritance
System.Object
CloudMapOptions
Implements
ICloudMapOptions
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class CloudMapOptions : Object, ICloudMapOptions
Syntax (vb)
Public Class CloudMapOptions
    Inherits Object
    Implements 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

Constructors

CloudMapOptions()

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.

Constructors

CloudMapOptions()

public CloudMapOptions()

Properties

CloudMapNamespace

The service discovery namespace for the Cloud Map service to attach to the ECS service.

public INamespace CloudMapNamespace { get; set; }
Property Value

INamespace

Remarks

Default: - the defaultCloudMapNamespace associated to the cluster

Container

The container to point to for a SRV record.

public ContainerDefinition Container { get; set; }
Property Value

ContainerDefinition

Remarks

Default: - the task definition's default container

ContainerPort

The port to point to for a SRV record.

public Nullable<double> ContainerPort { get; set; }
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.

public Nullable<DnsRecordType> DnsRecordType { get; set; }
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.

public Duration DnsTtl { get; set; }
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.

public Nullable<double> FailureThreshold { get; set; }
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.

public string Name { get; set; }
Property Value

System.String

Remarks

Default: CloudFormation-generated name

Implements

ICloudMapOptions
Back to top Generated by DocFX