AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ServiceDiscovery::Service

CfnService

A complex type that contains information about the specified service.

Import

import { CfnService } from 'aws-cdk-lib/aws-servicediscovery';

Or use the module namespace:

import * as servicediscovery from 'aws-cdk-lib/aws-servicediscovery';
// servicediscovery.CfnService

Properties

Configuration passed to the constructor as CfnServiceProps.

descriptionOptional
string

The description of the service.

dnsConfigOptional
IResolvable | DnsConfigProperty

A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance. > The record types of a service can only be changed by deleting the service and recreating it with a new `Dnsconfig` .

healthCheckConfigOptional
IResolvable | HealthCheckConfigProperty

*Public DNS and HTTP namespaces only.* A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify in `DnsConfig` . For information about the charges for health checks, see [Amazon Route 53 Pricing](https://docs.aws.amazon.com/route53/pricing/) .

healthCheckCustomConfigOptional
IResolvable | HealthCheckCustomConfigProperty

A complex type that contains information about an optional custom health check. > If you specify a health check configuration, you can specify either `HealthCheckCustomConfig` or `HealthCheckConfig` but not both.

nameOptional
string

The name of the service.

namespaceIdOptional
string

The ID or Amazon Resource Name (ARN) of the namespace that you want to use to create the service. For namespaces shared with your AWS account, specify the namespace ARN. For more information about shared namespaces, see [Cross-account AWS Cloud Map namespace sharing](https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html) in the *AWS Cloud Map Developer Guide* .

serviceAttributesOptional
any

A complex type that contains information about attributes associated with a specific service.

tagsOptional
CfnTag[]

The tags for the service. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

typeOptional
string

If present, specifies that the service instances are only discoverable using the `DiscoverInstances` API operation. No DNS records is registered for the service instances. The only valid value is `HTTP` .

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter