agent_spaces
Creates, updates, deletes, gets or lists an agent_spaces resource.
Overview
| Name | agent_spaces |
| Type | Resource |
| Id | aws.securityagent.agent_spaces |
Fields
The following fields are returned by SELECT queries:
- batch_get_agent_spaces
- list_agent_spaces
| Name | Datatype | Description |
|---|---|---|
agent_spaces | array | The list of agent spaces that were found. |
not_found | array | The list of agent space identifiers that were not found. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the agent space. |
agent_space_id | string | Unique identifier of the agent space. |
created_at | string (date-time) | The date and time the agent space was created, in UTC format. |
updated_at | string (date-time) | The date and time the agent space was last updated, in UTC format. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
batch_get_agent_spaces | select | region | Retrieves information about one or more agent spaces. | |
list_agent_spaces | select | region | Returns a paginated list of agent space summaries in your account. | |
create_agent_space | insert | region, name | Creates a new agent space. An agent space is a dedicated workspace for securing a specific application. | |
update_agent_space | update | region, agentSpaceId | Updates the configuration of an existing agent space, including its name, description, AWS resources, target domains, and code review settings. | |
delete_agent_space | delete | region | Deletes an agent space and all of its associated resources, including pentests, findings, and artifacts. | |
start_code_remediation | exec | region, agentSpaceId, findingIds | Initiates 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- batch_get_agent_spaces
- list_agent_spaces
Retrieves information about one or more agent spaces.
SELECT
agent_spaces,
not_found
FROM aws.securityagent.agent_spaces
WHERE region = '{{ region }}' -- required
;
Returns a paginated list of agent space summaries in your account.
SELECT
name,
agent_space_id,
created_at,
updated_at
FROM aws.securityagent.agent_spaces
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_agent_space
- Manifest
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
;
# Description fields are for documentation purposes
- name: agent_spaces
props:
- name: region
value: "{{ region }}"
description: Required parameter for the agent_spaces resource.
- name: name
value: "{{ name }}"
description: |
Name of an agent space.
- name: description
value: "{{ description }}"
- name: awsResources
description: |
The AWS resources associated with an agent space, including VPCs, log groups, S3 buckets, secrets, Lambda functions, and IAM roles.
value:
vpcs:
- vpcArn: "{{ vpcArn }}"
securityGroupArns: "{{ securityGroupArns }}"
subnetArns: "{{ subnetArns }}"
logGroups:
- "{{ logGroups }}"
s3Buckets:
- "{{ s3Buckets }}"
secretArns:
- "{{ secretArns }}"
lambdaFunctionArns:
- "{{ lambdaFunctionArns }}"
iamRoles:
- "{{ iamRoles }}"
- name: targetDomainIds
value:
- "{{ targetDomainIds }}"
description: |
List of target domain IDs.
- name: codeReviewSettings
description: |
The code review settings for an agent space, controlling which types of scanning are enabled.
value:
controlsScanning: {{ controlsScanning }}
generalPurposeScanning: {{ generalPurposeScanning }}
- name: kmsKeyId
value: "{{ kmsKeyId }}"
description: |
Identifier of a KMS key. Can be a key ID, key ARN, alias name, or alias ARN.
- name: tags
value: "{{ tags }}"
description: |
Map of tags for a resource.
UPDATE examples
- update_agent_space
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
- delete_agent_space
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
- start_code_remediation
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 }}"
}'
;