Menu
Amazon Route 53
API Reference

RegisterInstance

Creates one or more resource record sets and optionally a health check based on the settings in a specified service. When you submit a RegisterInstance request, Amazon Route 53 does the following:

  • Creates a resource record set for each resource record set template in the service

  • Creates a health check based on the settings in the health check template in the service, if any

  • Associates the health check, if any, with each of the resource record sets

Important

One RegisterInstance request must complete before you can submit another request and specify the same service and instance ID.

For more information, see CreateService.

When Amazon Route 53 receives a DNS query for the specified DNS name, it returns the applicable value:

  • If the health check is healthy: returns all the resource record sets

  • If the health check is unhealthy: returns the IP address of the last healthy instance

  • If you didn't specify a health check template: returns all the resource record sets

Request Syntax

{ "Attributes": { "string" : "string" }, "CreatorRequestId": "string", "InstanceId": "string", "ServiceId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Attributes

A string map that contain attribute keys and values. Supported attribute keys include the following:

  • AWS_INSTANCE_PORT: The port on the endpoint that you want Amazon Route 53 to perform health checks on. This value is also used for the port value in an SRV record if the service that you specify includes an SRV record. For more information, see CreateService.

  • AWS_INSTANCE_IPV4: If the service that you specify contains a resource record set template for an A record, the IPv4 address that you want Amazon Route 53 to use for the value of the A record.

  • AWS_INSTANCE_IPV6: If the service that you specify contains a resource record set template for an AAAA record, the IPv6 address that you want Amazon Route 53 to use for the value of the AAAA record.

Type: String to string map

Key Length Constraints: Maximum length of 255.

Value Length Constraints: Maximum length of 255.

Required: Yes

CreatorRequestId

An optional parameter that you can use to resolve concurrent creation requests. CreatorRequestId helps to determine if a specific client owns the namespace.

Type: String

Length Constraints: Maximum length of 64.

Required: No

InstanceId

An identifier that you want to associate with the instance. Note the following:

  • You can use this value to update an existing instance.

  • To register a new instance, you must specify a value that is unique among instances that you register by using the same service.

Type: String

Length Constraints: Maximum length of 64.

Required: Yes

ServiceId

The ID of the service that you want to use for settings for the resource record sets and health check that Amazon Route 53 will create.

Type: String

Length Constraints: Maximum length of 64.

Required: Yes

Response Syntax

{ "OperationId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

OperationId

A value that you can use to determine whether the request completed successfully. To get the status of the operation, see GetOperation.

Type: String

Length Constraints: Maximum length of 255.

Errors

For information about the errors that are common to all actions, see Common Errors.

DuplicateRequest

This request tried to create an object that already exists.

HTTP Status Code: 400

InvalidInput

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.

HTTP Status Code: 400

ResourceInUse

The specified resource can't be deleted because it contains other resources. For example, you can't delete a service that contains any instances.

HTTP Status Code: 400

ResourceLimitExceeded

The resource can't be created because you've reached the limit on the number of resources.

HTTP Status Code: 400

ServiceNotFound

No service exists with the specified ID.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: