AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Creates an HTTP namespace. Service instances registered 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 Amazon Web Services account, see Cloud Map quotas in the Cloud Map Developer Guide.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to CreateHttpNamespaceAsync.

Namespace: Amazon.ServiceDiscovery
Assembly: AWSSDK.ServiceDiscovery.dll
Version: 3.x.y.z

Syntax

C#
public virtual CreateHttpNamespaceResponse CreateHttpNamespace(
         CreateHttpNamespaceRequest request
)

Parameters

request
Type: Amazon.ServiceDiscovery.Model.CreateHttpNamespaceRequest

Container for the necessary parameters to execute the CreateHttpNamespace service method.

Return Value


The response from the CreateHttpNamespace service method, as returned by ServiceDiscovery.

Exceptions

ExceptionCondition
DuplicateRequestException The operation is already in progress.
InvalidInputException One or more specified values aren't valid. For example, a required value might be missing, a numeric value might be outside the allowed range, or a string value might exceed length constraints.
NamespaceAlreadyExistsException The namespace that you're trying to create already exists.
ResourceLimitExceededException The resource can't be created because you've reached the quota on the number of resources.
TooManyTagsException The list of tags on the resource is over the quota. The maximum number of tags that can be applied to a resource is 50.

Examples

This example creates an HTTP namespace.

CreateHttpNamespace example


var client = new AmazonServiceDiscoveryClient();
var response = client.CreateHttpNamespace(new CreateHttpNamespaceRequest 
{
    CreatorRequestId = "example-creator-request-id-0001",
    Description = "Example.com AWS Cloud Map HTTP Namespace",
    Name = "example-http.com"
});

string operationId = response.OperationId;

            

Version Information

.NET Framework:
Supported in: 4.7.2 and newer

See Also