import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class AccessAnalyzer extends PolicyStatement { public servicePrefix = 'access-analyzer' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to apply an archive rule
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_ApplyArchiveRule.html
     */ public toApplyArchiveRule ( ) { return this . to ( 'ApplyArchiveRule' ) ; } /**
     * Grants permission to cancel a policy generation
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_CancelPolicyGeneration.html
     */ public toCancelPolicyGeneration ( ) { return this . to ( 'CancelPolicyGeneration' ) ; } /**
     * Grants permission to create an access preview for the specified analyzer
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_CreateAccessPreview.html
     */ public toCreateAccessPreview ( ) { return this . to ( 'CreateAccessPreview' ) ; } /**
     * Grants permission to create an analyzer
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * Dependent actions:
     * - iam:CreateServiceLinkedRole
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_CreateAnalyzer.html
     */ public toCreateAnalyzer ( ) { return this . to ( 'CreateAnalyzer' ) ; } /**
     * Grants permission to create an archive rule for the specified analyzer
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_CreateArchiveRule.html
     */ public toCreateArchiveRule ( ) { return this . to ( 'CreateArchiveRule' ) ; } /**
     * Grants permission to delete the specified analyzer
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_DeleteAnalyzer.html
     */ public toDeleteAnalyzer ( ) { return this . to ( 'DeleteAnalyzer' ) ; } /**
     * Grants permission to delete archive rules for the specified analyzer
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_DeleteArchiveRule.html
     */ public toDeleteArchiveRule ( ) { return this . to ( 'DeleteArchiveRule' ) ; } /**
     * Grants permission to retrieve information about an access preview
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_GetAccessPreview.html
     */ public toGetAccessPreview ( ) { return this . to ( 'GetAccessPreview' ) ; } /**
     * Grants permission to retrieve information about an analyzed resource
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_GetAnalyzedResource.html
     */ public toGetAnalyzedResource ( ) { return this . to ( 'GetAnalyzedResource' ) ; } /**
     * Grants permission to retrieve information about analyzers
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_GetAnalyzer.html
     */ public toGetAnalyzer ( ) { return this . to ( 'GetAnalyzer' ) ; } /**
     * Grants permission to retrieve information about archive rules for the specified analyzer
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_GetArchiveRule.html
     */ public toGetArchiveRule ( ) { return this . to ( 'GetArchiveRule' ) ; } /**
     * Grants permission to retrieve findings
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_GetFinding.html
     */ public toGetFinding ( ) { return this . to ( 'GetFinding' ) ; } /**
     * Grants permission to retrieve a policy that was generated using StartPolicyGeneration
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_GetGeneratedPolicy.html
     */ public toGetGeneratedPolicy ( ) { return this . to ( 'GetGeneratedPolicy' ) ; } /**
     * Grants permission to retrieve a list of findings from an access preview
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_ListAccessPreviewFindings.html
     */ public toListAccessPreviewFindings ( ) { return this . to ( 'ListAccessPreviewFindings' ) ; } /**
     * Grants permission to retrieve a list of access previews
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_ListAccessPreviews.html
     */ public toListAccessPreviews ( ) { return this . to ( 'ListAccessPreviews' ) ; } /**
     * Grants permission to retrieve a list of resources that have been analyzed
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_ListAnalyzedResources.html
     */ public toListAnalyzedResources ( ) { return this . to ( 'ListAnalyzedResources' ) ; } /**
     * Grants permission to retrieves a list of analyzers
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_ListAnalyzers.html
     */ public toListAnalyzers ( ) { return this . to ( 'ListAnalyzers' ) ; } /**
     * Grants permission to retrieve a list of archive rules from an analyzer
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_ListArchiveRules.html
     */ public toListArchiveRules ( ) { return this . to ( 'ListArchiveRules' ) ; } /**
     * Grants permission to retrieve a list of findings from an analyzer
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_ListFindings.html
     */ public toListFindings ( ) { return this . to ( 'ListFindings' ) ; } /**
     * Grants permission to list all the recently started policy generations
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_ListPolicyGenerations.html
     */ public toListPolicyGenerations ( ) { return this . to ( 'ListPolicyGenerations' ) ; } /**
     * Grants permission to retrieve a list of tags applied to a resource
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_ListTagsForResource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to start a policy generation
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_StartPolicyGeneration.html
     */ public toStartPolicyGeneration ( ) { return this . to ( 'StartPolicyGeneration' ) ; } /**
     * Grants permission to start a scan of the policies applied to a resource
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_StartResourceScan.html
     */ public toStartResourceScan ( ) { return this . to ( 'StartResourceScan' ) ; } /**
     * Grants permission to add a tag to a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to remove a tag from a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to modify an archive rule
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_UpdateArchiveRule.html
     */ public toUpdateArchiveRule ( ) { return this . to ( 'UpdateArchiveRule' ) ; } /**
     * Grants permission to modify findings
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_UpdateFindings.html
     */ public toUpdateFindings ( ) { return this . to ( 'UpdateFindings' ) ; } /**
     * Grants permission to validate a policy
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/access-analyzer/latest/APIReference/API_ValidatePolicy.html
     */ public toValidatePolicy ( ) { return this . to ( 'ValidatePolicy' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'ApplyArchiveRule' , 'CancelPolicyGeneration' , 'CreateAccessPreview' , 'CreateAnalyzer' , 'CreateArchiveRule' , 'DeleteAnalyzer' , 'DeleteArchiveRule' , 'StartPolicyGeneration' , 'StartResourceScan' , 'UpdateArchiveRule' , 'UpdateFindings' ] , Read : [ 'GetAccessPreview' , 'GetAnalyzedResource' , 'GetAnalyzer' , 'GetArchiveRule' , 'GetFinding' , 'GetGeneratedPolicy' , 'ListAccessPreviewFindings' , 'ListAnalyzedResources' , 'ListFindings' , 'ListPolicyGenerations' , 'ListTagsForResource' , 'ValidatePolicy' ] , List : [ 'ListAccessPreviews' , 'ListAnalyzers' , 'ListArchiveRules' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param analyzerName param account param region param partition public onAnalyzer ( analyzerName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:access-analyzer:${ region || '*' }:${ account || '*' }:analyzer/${ analyzerName }` ) ; } param analyzerName param ruleName param account param region param partition public onArchiveRule ( analyzerName , ruleName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:access-analyzer:${ region || '*' }:${ account || '*' }:analyzer/${ analyzerName }/archive-rule/${ ruleName }` ) ; } }