Skip to main content

analyzers

Creates, updates, deletes or gets an analyzer resource or lists analyzers in a region

Overview

Nameanalyzers
TypeResource
DescriptionThe AWS::AccessAnalyzer::Analyzer type specifies an analyzer of the user's account
Idaws.accessanalyzer.analyzers

Fields

NameDatatypeDescription
analyzer_namestringAnalyzer name
archive_rulesarray
arnstringAmazon Resource Name (ARN) of the analyzer
tagsarrayAn array of key-value pairs to apply to this resource.
typestringThe type of the analyzer, must be one of ACCOUNT, ORGANIZATION, ACCOUNT_UNUSED_ACCESS or ORGANIZATION_UNUSED_ACCESS
analyzer_configurationobjectThe configuration for the analyzer
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTType, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.accessanalyzer.analyzers (
Type,
region
)
SELECT
'{{ Type }}',
'{{ region }}';

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