Skip to main content

threat_models

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

Overview

Namethreat_models
TypeResource
Idaws.securityagent.threat_models

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
not_foundarrayList of threat model IDs.
threat_modelsarrayThe list of threat models that were found.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_threat_modelsselectregionRetrieves information about one or more threat models in an agent space.
list_threat_modelsselectregionReturns a paginated list of threat model summaries for the specified agent space.
create_threat_modelinsertregion, title, agentSpaceId, serviceRoleCreates a new threat model configuration in an agent space. A threat model defines the parameters for automated threat analysis.
update_threat_modelupdateregion, threatModelId, agentSpaceIdUpdates an existing threat model configuration.
batch_delete_threat_modelsexecregion, threatModelIds, agentSpaceIdDeletes one or more threat models from an agent space.
start_threat_model_jobexecregion, agentSpaceId, threatModelIdStarts a new threat model job for a threat model configuration.
stop_threat_model_jobexecregion, agentSpaceId, threatModelJobIdStops a running threat model job.

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 threat models in an agent space.

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

INSERT examples

Creates a new threat model configuration in an agent space. A threat model defines the parameters for automated threat analysis.

INSERT INTO aws.securityagent.threat_models (
title,
agentSpaceId,
description,
assets,
scopeDocs,
serviceRole,
logConfig,
reportDestination,
region
)
SELECT
'{{ title }}' /* required */,
'{{ agentSpaceId }}' /* required */,
'{{ description }}',
'{{ assets }}',
'{{ scopeDocs }}',
'{{ serviceRole }}' /* required */,
'{{ logConfig }}',
'{{ reportDestination }}',
'{{ region }}'
RETURNING
agent_space_id,
assets,
created_at,
description,
log_config,
scope_docs,
service_role,
threat_model_id,
title_,
updated_at
;

UPDATE examples

Updates an existing threat model configuration.

UPDATE aws.securityagent.threat_models
SET
threatModelId = '{{ threatModelId }}',
agentSpaceId = '{{ agentSpaceId }}',
title = '{{ title }}',
description = '{{ description }}',
assets = '{{ assets }}',
scopeDocs = '{{ scopeDocs }}',
serviceRole = '{{ serviceRole }}',
logConfig = '{{ logConfig }}'
WHERE
region = '{{ region }}' --required
AND threatModelId = '{{ threatModelId }}' --required
AND agentSpaceId = '{{ agentSpaceId }}' --required
RETURNING
agent_space_id,
assets,
created_at,
description,
log_config,
scope_docs,
service_role,
threat_model_id,
title_,
updated_at;

Lifecycle Methods

Deletes one or more threat models from an agent space.

EXEC aws.securityagent.threat_models.batch_delete_threat_models
@region='{{ region }}' --required
@@json=
'{
"threatModelIds": "{{ threatModelIds }}",
"agentSpaceId": "{{ agentSpaceId }}"
}'
;