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
Idawscc.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.

For more information, see AWS::Detective::Graph.

Methods

NameResourceAccessible byRequired Params
create_resourcegraphsINSERTregion
delete_resourcegraphsDELETEIdentifier, region
update_resourcegraphsUPDATEIdentifier, PatchDocument, region
list_resourcesgraphs_list_onlySELECTregion
get_resourcegraphsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual graph.

SELECT
region,
arn,
tags,
auto_enable_members
FROM awscc.detective.graphs
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.detective.graphs
SET PatchDocument = string('{{ {
"Tags": tags,
"AutoEnableMembers": auto_enable_members
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.detective.graphs
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

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

detective:CreateGraph,
detective:ListGraphs,
detective:TagResource,
detective:UpdateOrganizationConfiguration,
organizations:DescribeOrganization