CreateTargetDomain - AWS Security Agent

CreateTargetDomain

Creates a new target domain for penetration testing. A target domain is a web domain that must be registered and verified before it can be tested.

Request Syntax

POST /CreateTargetDomain HTTP/1.1 Content-type: application/json { "tags": { "string" : "string" }, "targetDomainName": "string", "verificationMethod": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

tags

The tags to associate with the target domain.

Type: String to string map

Required: No

targetDomainName

The domain name to register as a target domain.

Type: String

Required: Yes

verificationMethod

The method to use for verifying domain ownership. Valid values are DNS_TXT and HTTP_ROUTE.

Type: String

Valid Values: DNS_TXT | HTTP_ROUTE

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "createdAt": "string", "domainName": "string", "targetDomainId": "string", "verificationDetails": { "dnsTxt": { "dnsRecordName": "string", "dnsRecordType": "string", "token": "string" }, "httpRoute": { "routePath": "string", "token": "string" }, "method": "string" }, "verificationStatus": "string", "verifiedAt": "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.

createdAt

The date and time the target domain was created, in UTC format.

Type: Timestamp

domainName

The domain name of the target domain.

Type: String

targetDomainId

The unique identifier of the created target domain.

Type: String

verificationDetails

The verification details for the target domain, including the verification token and instructions.

Type: VerificationDetails object

verificationStatus

The current verification status of the target domain.

Type: String

Valid Values: PENDING | VERIFIED | FAILED | UNREACHABLE

verifiedAt

The date and time the target domain was verified, in UTC format.

Type: Timestamp

Errors

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

See Also

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