AWS::ServiceDiscovery::HttpNamespace - AWS CloudFormation

AWS::ServiceDiscovery::HttpNamespace

The HttpNamespace resource is an AWS Cloud Map resource type that contains information about an HTTP namespace. Service instances that you register using an HTTP namespace can be discovered using a DiscoverInstances request but can't be discovered using DNS.

For the current quota on the number of namespaces that you can create using the same AWS account, see AWS Cloud Map quotas in the AWS Cloud Map Developer Guide .

Syntax

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

JSON

{ "Type" : "AWS::ServiceDiscovery::HttpNamespace", "Properties" : { "Description" : String, "Name" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::ServiceDiscovery::HttpNamespace Properties: Description: String Name: String Tags: - Tag

Properties

Description

A description for the namespace.

Required: No

Type: String

Maximum: 1024

Update requires: No interruption

Name

The name that you want to assign to this namespace.

Required: Yes

Type: String

Pattern: ^[!-~]{1,1024}$

Maximum: 1024

Update requires: Replacement

Tags

The tags for the namespace. 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.

Required: No

Type: Array of Tag

Minimum: 0

Maximum: 200

Update requires: Updates are not supported.

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Id for the namespace, such as ns-e4anhexample0004.

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

Fn::GetAtt

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

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The Amazon Resource Name (ARN) of the namespace, such as arn:aws:service-discovery:us-east-1:123456789012:http-namespace/http-namespace-a1bzhi.

Id

The ID of the namespace.

Examples

Create an HTTP namespace

The following example creates an HTTP namespace named example-namespace.

JSON

{ "Resources": { "HttpNamespace": { "Type": "AWS::ServiceDiscovery::HttpNamespace", "Properties": { "Description": "AWS Cloud Map HTTP namespace for resources for example.com website", "Name": "example-namespace" } } } }

YAML

Resources: HttpNamespace: Type: AWS::ServiceDiscovery::HttpNamespace Properties: Description: AWS Cloud Map HTTP namespace for resources for example.com website Name: example-namespace

See also