AWS SDK Version 3 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 a service, which defines the configuration for the following entities:

After you create the service, you can submit a RegisterInstance request, and Amazon Route 53 uses the values in the configuration to create the specified entities.

For the current limit on the number of instances that you can register using the same namespace and using the same service, see Limits on Auto Naming in the Route 53 Developer Guide.


For .NET Core and PCL this operation is only available in asynchronous form. Please refer to CreateServiceAsync.

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


public virtual CreateServiceResponse CreateService(
         CreateServiceRequest request
Type: Amazon.ServiceDiscovery.Model.CreateServiceRequest

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

Return Value
The response from the CreateService service method, as returned by ServiceDiscovery.


InvalidInputException One or more specified values aren't valid. For example, when you're creating a namespace, the value of Name might not be a valid DNS name.
NamespaceNotFoundException No namespace exists with the specified ID.
ResourceLimitExceededException The resource can't be created because you've reached the limit on the number of resources.
ServiceAlreadyExistsException The service can't be created because a service with the same name already exists.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also