Skip to main content

graphs

Creates, updates, deletes or gets a graph resource or lists graphs in a region

Overview

Namegraphs
TypeResource
DescriptionResource schema for AWS::Detective::Graph
Idaws.detective.graphs

Fields

NameDatatypeDescription
arnstringThe Detective graph ARN
tagsarray
auto_enable_membersbooleanIndicates whether to automatically enable new organization accounts as member accounts in the organization behavior graph.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all graphs in a region.

SELECT
region,
arn,
tags,
auto_enable_members
FROM aws.detective.graphs
WHERE region = 'us-east-1';

Gets all properties from an individual graph.

SELECT
region,
arn,
tags,
auto_enable_members
FROM aws.detective.graphs
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new graph resource, using stack-deploy.

/*+ create */
INSERT INTO aws.detective.graphs (
Tags,
AutoEnableMembers,
region
)
SELECT
'{{ Tags }}',
'{{ AutoEnableMembers }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.detective.graphs
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the graphs resource, the following permissions are required:

Create

detective:CreateGraph,
detective:UpdateOrganizationConfiguration,
organizations:DescribeOrganization

Update

detective:UntagResource,
detective:TagResource,
detective:ListTagsForResource,
detective:UpdateOrganizationConfiguration,
organizations:DescribeOrganization

Read

detective:ListGraphs,
detective:ListTagsForResource,
detective:DescribeOrganizationConfiguration,
organizations:DescribeOrganization

Delete

detective:DeleteGraph

List

detective:ListGraphs,
detective:ListTagsForResource,
detective:DescribeOrganizationConfiguration,
organizations:DescribeOrganization