graphs
Creates, updates, deletes or gets a graph resource or lists graphs in a region
Overview
| Name | graphs |
| Type | Resource |
| Description | Resource schema for AWS::Detective::Graph |
| Id | aws.detective.graphs |
Fields
| Name | Datatype | Description |
|---|---|---|
arn | string | The Detective graph ARN |
tags | array | |
auto_enable_members | boolean | Indicates whether to automatically enable new organization accounts as member accounts in the organization behavior graph. |
region | string | AWS region. |
For more information, see AWS::Detective::Graph.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.detective.graphs (
Tags,
AutoEnableMembers,
region
)
SELECT
'{{ Tags }}',
'{{ AutoEnableMembers }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.detective.graphs (
Tags,
AutoEnableMembers,
region
)
SELECT
'{{ Tags }}',
'{{ AutoEnableMembers }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: graph
props:
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: AutoEnableMembers
value: '{{ AutoEnableMembers }}'
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