aws-cdk-lib.aws_servicediscovery.CfnServiceProps

interface CfnServiceProps

LanguageType name
.NETAmazon.CDK.AWS.ServiceDiscovery.CfnServiceProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsservicediscovery#CfnServiceProps
Javasoftware.amazon.awscdk.services.servicediscovery.CfnServiceProps
Pythonaws_cdk.aws_servicediscovery.CfnServiceProps
TypeScript aws-cdk-lib » aws_servicediscovery » CfnServiceProps

Properties for defining a CfnService.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_servicediscovery as servicediscovery } from 'aws-cdk-lib';
const cfnServiceProps: servicediscovery.CfnServiceProps = {
  description: 'description',
  dnsConfig: {
    dnsRecords: [{
      ttl: 123,
      type: 'type',
    }],

    // the properties below are optional
    namespaceId: 'namespaceId',
    routingPolicy: 'routingPolicy',
  },
  healthCheckConfig: {
    type: 'type',

    // the properties below are optional
    failureThreshold: 123,
    resourcePath: 'resourcePath',
  },
  healthCheckCustomConfig: {
    failureThreshold: 123,
  },
  name: 'name',
  namespaceId: 'namespaceId',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  type: 'type',
};

Properties

NameTypeDescription
description?stringThe description of the service.
dnsConfig?IResolvable | DnsConfigPropertyA complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
healthCheckConfig?IResolvable | HealthCheckConfigPropertyPublic 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 .
healthCheckCustomConfig?IResolvable | HealthCheckCustomConfigPropertyA complex type that contains information about an optional custom health check.
name?stringThe name of the service.
namespaceId?stringThe ID of the namespace that was used to create the service.
tags?CfnTag[]The tags for the service.
type?stringIf present, specifies that the service instances are only discoverable using the DiscoverInstances API operation.

description?

Type: string (optional)

The description of the service.


dnsConfig?

Type: IResolvable | DnsConfigProperty (optional)

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 .


healthCheckConfig?

Type: IResolvable | HealthCheckConfigProperty (optional)

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 .


healthCheckCustomConfig?

Type: IResolvable | HealthCheckCustomConfigProperty (optional)

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.


name?

Type: string (optional)

The name of the service.


namespaceId?

Type: string (optional)

The ID of the namespace that was used to create the service.

You must specify a value for NamespaceId either for the service properties or for DnsConfig . Don't specify a value in both places.


tags?

Type: CfnTag[] (optional)

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.


type?

Type: string (optional)

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 .