analyzers
Creates, updates, deletes or gets an analyzer
resource or lists analyzers
in a region
Overview
Name | analyzers |
Type | Resource |
Description | The AWS::AccessAnalyzer::Analyzer type specifies an analyzer of the user's account |
Id | aws.accessanalyzer.analyzers |
Fields
Name | Datatype | Description |
---|---|---|
analyzer_name | string | Analyzer name |
archive_rules | array | |
arn | string | Amazon Resource Name (ARN) of the analyzer |
tags | array | An array of key-value pairs to apply to this resource. |
type | string | The type of the analyzer, must be one of ACCOUNT, ORGANIZATION, ACCOUNT_UNUSED_ACCESS or ORGANIZATION_UNUSED_ACCESS |
analyzer_configuration | object | The configuration for the analyzer |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Type, 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 analyzers
in a region.
SELECT
region,
analyzer_name,
archive_rules,
arn,
tags,
type,
analyzer_configuration
FROM aws.accessanalyzer.analyzers
WHERE region = 'us-east-1';
Gets all properties from an individual analyzer
.
SELECT
region,
analyzer_name,
archive_rules,
arn,
tags,
type,
analyzer_configuration
FROM aws.accessanalyzer.analyzers
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new analyzer
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.accessanalyzer.analyzers (
Type,
region
)
SELECT
'{{ Type }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.accessanalyzer.analyzers (
AnalyzerName,
ArchiveRules,
Tags,
Type,
AnalyzerConfiguration,
region
)
SELECT
'{{ AnalyzerName }}',
'{{ ArchiveRules }}',
'{{ Tags }}',
'{{ Type }}',
'{{ AnalyzerConfiguration }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: analyzer
props:
- name: AnalyzerName
value: '{{ AnalyzerName }}'
- name: ArchiveRules
value:
- Filter:
- Contains:
- '{{ Contains[0] }}'
Eq:
- '{{ Eq[0] }}'
Exists: '{{ Exists }}'
Property: '{{ Property }}'
Neq:
- '{{ Neq[0] }}'
RuleName: '{{ RuleName }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: Type
value: '{{ Type }}'
- name: AnalyzerConfiguration
value:
UnusedAccessConfiguration:
UnusedAccessAge: '{{ UnusedAccessAge }}'
DELETE
example
/*+ delete */
DELETE FROM aws.accessanalyzer.analyzers
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the analyzers
resource, the following permissions are required:
Create
access-analyzer:CreateAnalyzer,
access-analyzer:TagResource,
iam:CreateServiceLinkedRole,
organizations:ListAWSServiceAccessForOrganization,
organizations:ListDelegatedAdministrators
Read
access-analyzer:ListAnalyzers,
access-analyzer:GetAnalyzer,
access-analyzer:ListArchiveRules
Update
access-analyzer:CreateArchiveRule,
access-analyzer:DeleteArchiveRule,
access-analyzer:ListAnalyzers,
access-analyzer:TagResource,
access-analyzer:UntagResource,
access-analyzer:UpdateArchiveRule
Delete
access-analyzer:DeleteAnalyzer
List
access-analyzer:ListAnalyzers