Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::ServiceDiscovery::Service

The AWS::ServiceDiscovery::Service resource defines a template for up to five records and an optional health check that you want Amazon Route 53 to create when you register an instance. For more information, see CreateService in the Amazon Route 53 API Reference.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

Copy
{ "Type" : "AWS::ServiceDiscovery::Service", "Properties" : { "Description" : String, "DnsConfig" : DnsConfig, "HealthCheckConfig" : HealthCheckConfig, "Name" : String } }

YAML

Copy
Type: "AWS::ServiceDiscovery::Service" Properties: Description: String DnsConfig: DnsConfig HealthCheckConfig: HealthCheckConfig Name: String

Properties

Description

A description for the service.

Required: No

Type: String

Update requires: No interruption

DnsConfig

A complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance.

Required: Yes

Type: Amazon Route 53 ServiceDiscovery DnsConfig

Update requires: No interruption

HealthCheckConfig

A complex type that contains settings for an optional health check. If you specify settings for a health check, Amazon Route 53 associates the health check with all the resource record sets that you specify in DnsConfig.

Required: No

Type: Amazon Route 53 ServiceDiscovery HealthCheckConfig

Update requires: No interruption

Name

The name that you want to assign to the service.

Required: No

Type: String

Update requires: Replacement

Return Values

Ref

When you pass the logical ID of an AWS::ServiceDiscovery::Service resource to the intrinsic Ref function, the function returns the value of Id for the service.

For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

Id

The ID of the service.

Arn

The Amazon Resource Name (ARN) of the service.

Name

The name that you assigned to the service.

For more information about using Fn::GetAtt, see Fn::GetAtt.

See Also