target_domains
Creates, updates, deletes, gets or lists a target_domains resource.
Overview
| Name | target_domains |
| Type | Resource |
| Id | aws.securityagent.target_domains |
Fields
The following fields are returned by SELECT queries:
- batch_get_target_domains
- list_target_domains
| Name | Datatype | Description |
|---|---|---|
not_found | array | List of target domain IDs. |
target_domains | array | The list of target domains that were found. |
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The domain name of the target domain. |
target_domain_id | string | Unique identifier of the target domain. |
verification_status | string | The current verification status of the target domain. (PENDING, VERIFIED, FAILED, UNREACHABLE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
batch_get_target_domains | select | region | Retrieves information about one or more target domains. | |
list_target_domains | select | region | Returns a paginated list of target domain summaries in your account. | |
create_target_domain | insert | region, targetDomainName, verificationMethod | 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. | |
update_target_domain | update | region, targetDomainId, verificationMethod | Updates the verification method for a target domain. | |
delete_target_domain | delete | region | Deletes a target domain registration. After deletion, the domain can no longer be used for penetration testing. | |
verify_target_domain | exec | region, targetDomainId | Initiates 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- batch_get_target_domains
- list_target_domains
Retrieves information about one or more target domains.
SELECT
not_found,
target_domains
FROM aws.securityagent.target_domains
WHERE region = '{{ region }}' -- required
;
Returns a paginated list of target domain summaries in your account.
SELECT
domain_name,
target_domain_id,
verification_status
FROM aws.securityagent.target_domains
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_target_domain
- Manifest
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
;
# Description fields are for documentation purposes
- name: target_domains
props:
- name: region
value: "{{ region }}"
description: Required parameter for the target_domains resource.
- name: targetDomainName
value: "{{ targetDomainName }}"
- name: verificationMethod
value: "{{ verificationMethod }}"
description: |
Method used to verify domain ownership.
valid_values: ['DNS_TXT', 'HTTP_ROUTE', 'PRIVATE_VPC']
- name: tags
value: "{{ tags }}"
description: |
Map of tags for a resource.
UPDATE examples
- update_target_domain
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
- delete_target_domain
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
- verify_target_domain
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 }}"
}'
;