Skip to main content

target_domains

Creates, updates, deletes, gets or lists a target_domains resource.

Overview​

Nametarget_domains
TypeResource
Idaws.securityagent.target_domains

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
not_foundarrayList of target domain IDs.
target_domainsarrayThe list of target domains that were found.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_target_domainsselectregionRetrieves information about one or more target domains.
list_target_domainsselectregionReturns a paginated list of target domain summaries in your account.
create_target_domaininsertregion, targetDomainName, verificationMethodCreates 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.
update_target_domainupdateregion, targetDomainId, verificationMethodUpdates the verification method for a target domain.
delete_target_domaindeleteregionDeletes a target domain registration. After deletion, the domain can no longer be used for penetration testing.
verify_target_domainexecregion, targetDomainIdInitiates verification of a target domain. This checks whether the domain ownership verification token has been properly configured.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples​

Retrieves information about one or more target domains.

SELECT
not_found,
target_domains
FROM aws.securityagent.target_domains
WHERE region = '{{ region }}' -- required
;

INSERT examples​

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.

INSERT INTO aws.securityagent.target_domains (
targetDomainName,
verificationMethod,
tags,
region
)
SELECT
'{{ targetDomainName }}' /* required */,
'{{ verificationMethod }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
created_at,
domain_name,
target_domain_id,
verification_details,
verification_status,
verification_status_reason,
verified_at
;

UPDATE examples​

Updates the verification method for a target domain.

UPDATE aws.securityagent.target_domains
SET
targetDomainId = '{{ targetDomainId }}',
verificationMethod = '{{ verificationMethod }}'
WHERE
region = '{{ region }}' --required
AND targetDomainId = '{{ targetDomainId }}' --required
AND verificationMethod = '{{ verificationMethod }}' --required
RETURNING
created_at,
domain_name,
target_domain_id,
verification_details,
verification_status,
verification_status_reason,
verified_at;

DELETE examples​

Deletes a target domain registration. After deletion, the domain can no longer be used for penetration testing.

DELETE FROM aws.securityagent.target_domains
WHERE region = '{{ region }}' --required
;

Lifecycle Methods​

Initiates verification of a target domain. This checks whether the domain ownership verification token has been properly configured.

EXEC aws.securityagent.target_domains.verify_target_domain
@region='{{ region }}' --required
@@json=
'{
"targetDomainId": "{{ targetDomainId }}"
}'
;