ServiceProps

class aws_cdk.aws_servicediscovery.ServiceProps(*, custom_health_check=None, description=None, health_check=None, name=None, dns_record_type=None, dns_ttl=None, load_balancer=None, routing_policy=None, namespace)

Bases: aws_cdk.aws_servicediscovery.DnsServiceProps

Parameters
  • custom_health_check (Optional[HealthCheckCustomConfig]) – Structure containing failure threshold for a custom health checker. Only one of healthCheckConfig or healthCheckCustomConfig can be specified. See: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html Default: none

  • description (Optional[str]) – A description of the service. Default: none

  • health_check (Optional[HealthCheckConfig]) – Settings for an optional health check. If you specify health check settings, AWS Cloud Map associates the health check with the records that you specify in DnsConfig. Only one of healthCheckConfig or healthCheckCustomConfig can be specified. Not valid for PrivateDnsNamespaces. If you use healthCheck, you can only register IP instances to this service. Default: none

  • name (Optional[str]) – A name for the Service. Default: CloudFormation-generated name

  • dns_record_type (Optional[DnsRecordType]) – The DNS type of the record that you want AWS Cloud Map to create. Supported record types include A, AAAA, A and AAAA (A_AAAA), CNAME, and SRV. Default: A

  • dns_ttl (Optional[Duration]) – The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record. Default: Duration.minutes(1)

  • load_balancer (Optional[bool]) – Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance. Setting this to true correctly configures the routingPolicy and performs some additional validation. Default: false

  • routing_policy (Optional[RoutingPolicy]) – The routing policy that you want to apply to all DNS records that AWS Cloud Map creates when you register an instance and specify this service. Default: WEIGHTED for CNAME records and when loadBalancer is true, MULTIVALUE otherwise

  • namespace (INamespace) – The namespace that you want to use for DNS configuration.

Attributes

custom_health_check

Structure containing failure threshold for a custom health checker.

Only one of healthCheckConfig or healthCheckCustomConfig can be specified. See: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html

Default

none

Return type

Optional[HealthCheckCustomConfig]

description

A description of the service.

Default

none

Return type

Optional[str]

dns_record_type

The DNS type of the record that you want AWS Cloud Map to create.

Supported record types include A, AAAA, A and AAAA (A_AAAA), CNAME, and SRV.

Default

A

Return type

Optional[DnsRecordType]

dns_ttl

The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.

Default

Duration.minutes(1)

Return type

Optional[Duration]

health_check

Settings for an optional health check.

If you specify health check settings, AWS Cloud Map associates the health check with the records that you specify in DnsConfig. Only one of healthCheckConfig or healthCheckCustomConfig can be specified. Not valid for PrivateDnsNamespaces. If you use healthCheck, you can only register IP instances to this service.

Default

none

Return type

Optional[HealthCheckConfig]

load_balancer

Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance.

Setting this to true correctly configures the routingPolicy and performs some additional validation.

Default

false

Return type

Optional[bool]

name

A name for the Service.

Default

CloudFormation-generated name

Return type

Optional[str]

namespace

The namespace that you want to use for DNS configuration.

Return type

INamespace

routing_policy

The routing policy that you want to apply to all DNS records that AWS Cloud Map creates when you register an instance and specify this service.

Default

WEIGHTED for CNAME records and when loadBalancer is true, MULTIVALUE otherwise

Return type

Optional[RoutingPolicy]