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 | awscc.detective.graphs |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Detective graph ARN |
region | string | AWS region. |
For more information, see AWS::Detective::Graph.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | graphs | INSERT | region |
delete_resource | graphs | DELETE | Identifier, region |
update_resource | graphs | UPDATE | Identifier, PatchDocument, region |
list_resources | graphs_list_only | SELECT | region |
get_resource | graphs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all graphs in a region.
SELECT
region,
arn
FROM awscc.detective.graphs_list_only
WHERE
region = 'us-east-1';
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 awscc.detective.graphs (
Tags,
AutoEnableMembers,
region
)
SELECT
'{{ tags }}',
'{{ auto_enable_members }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.detective.graphs (
Tags,
AutoEnableMembers,
region
)
SELECT
'{{ tags }}',
'{{ auto_enable_members }}',
'{{ 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: auto_enable_members
value: '{{ auto_enable_members }}'
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:
- Create
- Update
- Read
- Delete
- List
detective:CreateGraph,
detective:ListGraphs,
detective:TagResource,
detective:UpdateOrganizationConfiguration,
organizations:DescribeOrganization
detective:ListGraphs,
detective:UntagResource,
detective:TagResource,
detective:ListTagsForResource,
detective:UpdateOrganizationConfiguration,
organizations:DescribeOrganization
detective:ListGraphs,
detective:ListTagsForResource,
detective:DescribeOrganizationConfiguration,
organizations:DescribeOrganization
detective:DeleteGraph,
detective:ListGraphs
detective:ListGraphs,
detective:ListTagsForResource,
detective:DescribeOrganizationConfiguration,
organizations:DescribeOrganization