AWS::ServiceDiscovery::Service
The AWS::ServiceDiscovery::Service resource defines a template that your application uses to register service instances.
For more information, see CreateService
in the AWS Cloud Map API Reference.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ServiceDiscovery::Service", "Properties" : { "Description" :String, "DnsConfig" : DnsConfig, "HealthCheckConfig" : HealthCheckConfig, "HealthCheckCustomConfig" : HealthCheckCustomConfig, "Name" :String, "NamespaceId" :String} }
YAML
Type: "AWS::ServiceDiscovery::Service" Properties: Description:StringDnsConfig: DnsConfig HealthCheckConfig: HealthCheckConfig HealthCheckCustomConfig: HealthCheckCustomConfig Name:String, NamespaceId:String
Properties
Description-
A description for the service.
Required: No
Type: String
Update requires: No interruption
DnsConfig-
An optional complex type that contains information about the DNS records that you want AWS Cloud Map to create when you register an instance.
Required: Yes
Type: DnsConfig
Update requires: No interruption
HealthCheckConfig-
A complex type that contains settings for an optional Route 53 health check. If you specify settings for a health check, AWS Cloud Map associates the health check with all the records that you specify in
DnsConfig.If you specify a health check configuration, you can specify either
HealthCheckCustomConfigorHealthCheckConfigbut not both.Required: No
Type: HealthCheckConfig
Update requires: No interruption
HealthCheckCustomConfig-
Specifies information about an optional custom health check.
If you specify a health check configuration, you can specify either
HealthCheckCustomConfigorHealthCheckConfigbut not both.Required: No
Type: HealthCheckCustomConfig
Update requires: No interruption
Name-
The name that you want to assign to the service.
Required: No
Type: String
Update requires: Replacement
NamespaceId-
The ID of the namespace that you want to use to create 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.
Arn-
The Amazon Resource Name (ARN) of the service.
Id-
The ID of the service.
Name-
The name that you assigned to the service.
For more information about using Fn::GetAtt, see
Fn::GetAtt.
See Also
-
CreateService in the AWS Cloud Map API Reference
