Skip to main content

agent_spaces

Creates, updates, deletes, gets or lists an agent_spaces resource.

Overview

Nameagent_spaces
TypeResource
Idaws.securityagent.agent_spaces

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_spacesarrayThe list of agent spaces that were found.
not_foundarrayThe list of agent space identifiers that were not found.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_agent_spacesselectregionRetrieves information about one or more agent spaces.
list_agent_spacesselectregionReturns a paginated list of agent space summaries in your account.
create_agent_spaceinsertregion, nameCreates a new agent space. An agent space is a dedicated workspace for securing a specific application.
update_agent_spaceupdateregion, agentSpaceIdUpdates the configuration of an existing agent space, including its name, description, AWS resources, target domains, and code review settings.
delete_agent_spacedeleteregionDeletes an agent space and all of its associated resources, including pentests, findings, and artifacts.
start_code_remediationexecregion, agentSpaceId, findingIdsInitiates code remediation for one or more security findings. This creates pull requests in integrated repositories to fix the identified vulnerabilities.

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 agent spaces.

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

INSERT examples

Creates a new agent space. An agent space is a dedicated workspace for securing a specific application.

INSERT INTO aws.securityagent.agent_spaces (
name,
description,
awsResources,
targetDomainIds,
codeReviewSettings,
kmsKeyId,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ awsResources }}',
'{{ targetDomainIds }}',
'{{ codeReviewSettings }}',
'{{ kmsKeyId }}',
'{{ tags }}',
'{{ region }}'
RETURNING
name,
agent_space_id,
aws_resources,
code_review_settings,
created_at,
description,
kms_key_id,
target_domain_ids,
updated_at
;

UPDATE examples

Updates the configuration of an existing agent space, including its name, description, AWS resources, target domains, and code review settings.

UPDATE aws.securityagent.agent_spaces
SET
agentSpaceId = '{{ agentSpaceId }}',
name = '{{ name }}',
description = '{{ description }}',
awsResources = '{{ awsResources }}',
targetDomainIds = '{{ targetDomainIds }}',
codeReviewSettings = '{{ codeReviewSettings }}'
WHERE
region = '{{ region }}' --required
AND agentSpaceId = '{{ agentSpaceId }}' --required
RETURNING
name,
agent_space_id,
aws_resources,
code_review_settings,
created_at,
description,
target_domain_ids,
updated_at;

DELETE examples

Deletes an agent space and all of its associated resources, including pentests, findings, and artifacts.

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

Lifecycle Methods

Initiates code remediation for one or more security findings. This creates pull requests in integrated repositories to fix the identified vulnerabilities.

EXEC aws.securityagent.agent_spaces.start_code_remediation
@region='{{ region }}' --required
@@json=
'{
"agentSpaceId": "{{ agentSpaceId }}",
"pentestJobId": "{{ pentestJobId }}",
"codeReviewJobId": "{{ codeReviewJobId }}",
"findingIds": "{{ findingIds }}"
}'
;