Interface CloudMapOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CloudMapOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:14.549Z") @Stability(Stable) public interface CloudMapOptions extends software.amazon.jsii.JsiiSerializable
The options to enabling AWS Cloud Map for an Amazon ECS service.

Example:

 TaskDefinition taskDefinition;
 Cluster cluster;
 Ec2Service service = Ec2Service.Builder.create(this, "Service")
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .cloudMapOptions(CloudMapOptions.builder()
                 // Create A records - useful for AWSVPC network mode.
                 .dnsRecordType(DnsRecordType.A)
                 .build())
         .build();
 
  • Method Details

    • getCloudMapNamespace

      @Stability(Stable) @Nullable default INamespace getCloudMapNamespace()
      The service discovery namespace for the Cloud Map service to attach to the ECS service.

      Default: - the defaultCloudMapNamespace associated to the cluster

    • getContainer

      @Stability(Stable) @Nullable default ContainerDefinition getContainer()
      The container to point to for a SRV record.

      Default: - the task definition's default container

    • getContainerPort

      @Stability(Stable) @Nullable default Number getContainerPort()
      The port to point to for a SRV record.

      Default: - the default port of the task definition's default container

    • getDnsRecordType

      @Stability(Stable) @Nullable default DnsRecordType getDnsRecordType()
      The DNS record type that you want AWS Cloud Map to create.

      The supported record types are A or SRV.

      Default: - DnsRecordType.A if TaskDefinition.networkMode = AWS_VPC, otherwise DnsRecordType.SRV

    • getDnsTtl

      @Stability(Stable) @Nullable default Duration getDnsTtl()
      The amount of time that you want DNS resolvers to cache the settings for this record.

      Default: Duration.minutes(1)

    • getFailureThreshold

      @Stability(Stable) @Nullable default Number getFailureThreshold()
      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.

      NOTE: This is used for HealthCheckCustomConfig

    • getName

      @Stability(Stable) @Nullable default String getName()
      The name of the Cloud Map service to attach to the ECS service.

      Default: CloudFormation-generated name

    • builder

      @Stability(Stable) static CloudMapOptions.Builder builder()
      Returns:
      a CloudMapOptions.Builder of CloudMapOptions