View a markdown version of this page

CreatePublisher - AgentRegistry Control Plane API Reference

CreatePublisher

Creates a publisher for a domain that you control. A publisher lets you assign public identifiers under your domain to registry records. The publisher starts in ACTION_REQUIRED, and the response includes a domainChallenge. To verify that you control the domain, create a Domain Name System (DNS) TXT record with the challenge's recordName and recordValue. When the registry finds the record, the publisher becomes ACTIVE and you can associate registry records with it by calling AssociatePublisher.

Your account can have one publisher for each domain. Creating a second publisher for the same domain fails with ConflictException, unless the request repeats the original clientToken, which returns the existing publisher. The request also fails with ConflictException if another account has already verified the domain. If your account has reached its publisher quota, the request fails with ServiceQuotaExceededException. Delete an unused publisher or request a quota increase.

Request Syntax

POST /publishers HTTP/1.1 Content-type: application/json { "clientToken": "string", "tags": { "string" : "string" }, "value": { ... } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request with the same client token, the operation returns the original publisher instead of creating another one.

Type: String

Length Constraints: Minimum length of 33. Maximum length of 256.

Pattern: [a-zA-Z0-9](-*[a-zA-Z0-9]){0,256}

Required: No

tags

The tags to attach to the publisher. Each tag is a key-value pair. You can attach up to 50 tags.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9\s._:/=+@-]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9\s._:/=+@-]*

Required: No

value

The domain that the publisher represents.

Type: Identifier object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: Yes

Response Syntax

HTTP/1.1 201 Content-type: application/json { "createdAt": number, "domainChallenge": { "recordName": "string", "recordValue": "string" }, "identifierType": "string", "publisherArn": "string", "status": "string", "statusReason": "string", "tags": { "string" : "string" }, "updatedAt": number, "value": { ... } }

Response Elements

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

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

createdAt

The date and time that the publisher was created.

Type: Timestamp

domainChallenge

The DNS TXT record to create to verify that you control the publisher's domain.

Type: DomainChallenge object

identifierType

The type of the publisher's identifier. DOMAIN is the only supported value.

Type: String

Valid Values: DOMAIN

publisherArn

The Amazon Resource Name (ARN) of the publisher.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: arn:(aws|aws-cn|aws-us-gov):[a-z0-9-]+::[0-9]{12}:[a-zA-Z0-9._/-]+

status

The domain verification status of the publisher. A newly created publisher is ACTION_REQUIRED. A retry with the original clientToken returns the publisher's current status.

Type: String

Valid Values: ACTION_REQUIRED | ACTIVE | FAILED | SUSPENDED | DELETING

statusReason

The reason for the publisher's current status. Present only when a reason is available.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 255.

Pattern: [\P{C}\t\r\n]*

tags

The tags attached to the publisher.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9\s._:/=+@-]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9\s._:/=+@-]*

updatedAt

The date and time that the publisher was last updated.

Type: Timestamp

value

The domain that the publisher represents.

Type: Identifier object

Note: This object is a Union. Only one member of this object can be specified or returned.

Errors

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

AccessDeniedException

The caller is not authorized to perform the requested action.

HTTP Status Code: 403

ConflictException

The request conflicts with the current state of the resource.

HTTP Status Code: 409

InternalServerException

The request failed due to an unexpected internal error; the caller may retry.

HTTP Status Code: 500

ServiceQuotaExceededException

The request would exceed a service quota.

HTTP Status Code: 402

ThrottlingException

The request was denied due to request throttling; the caller may retry after a delay.

HTTP Status Code: 429

ValidationException

The request failed validation of one or more input fields.

fieldList

The list of input fields that failed validation.

reason

The reason the request failed validation.

HTTP Status Code: 400

See Also

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