Access Analyzer

2023/11/28 - Access Analyzer - 9 updated api methods

Changes  This release adds support for external access findings for S3 directory buckets to help you easily identify cross-account access. Updated service API, documentation, and paginators.

CreateAccessPreview (updated) Link ¶
Changes (request)
{'configurations': {'s3ExpressDirectoryBucket': {'bucketPolicy': 'string'}}}

Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions.

See also: AWS API Documentation

Request Syntax

client.create_access_preview(
    analyzerArn='string',
    configurations={
        'string': {
            'ebsSnapshot': {
                'userIds': [
                    'string',
                ],
                'groups': [
                    'string',
                ],
                'kmsKeyId': 'string'
            },
            'ecrRepository': {
                'repositoryPolicy': 'string'
            },
            'iamRole': {
                'trustPolicy': 'string'
            },
            'efsFileSystem': {
                'fileSystemPolicy': 'string'
            },
            'kmsKey': {
                'keyPolicies': {
                    'string': 'string'
                },
                'grants': [
                    {
                        'operations': [
                            'CreateGrant'|'Decrypt'|'DescribeKey'|'Encrypt'|'GenerateDataKey'|'GenerateDataKeyPair'|'GenerateDataKeyPairWithoutPlaintext'|'GenerateDataKeyWithoutPlaintext'|'GetPublicKey'|'ReEncryptFrom'|'ReEncryptTo'|'RetireGrant'|'Sign'|'Verify',
                        ],
                        'granteePrincipal': 'string',
                        'retiringPrincipal': 'string',
                        'constraints': {
                            'encryptionContextEquals': {
                                'string': 'string'
                            },
                            'encryptionContextSubset': {
                                'string': 'string'
                            }
                        },
                        'issuingAccount': 'string'
                    },
                ]
            },
            'rdsDbClusterSnapshot': {
                'attributes': {
                    'string': {
                        'accountIds': [
                            'string',
                        ]
                    }
                },
                'kmsKeyId': 'string'
            },
            'rdsDbSnapshot': {
                'attributes': {
                    'string': {
                        'accountIds': [
                            'string',
                        ]
                    }
                },
                'kmsKeyId': 'string'
            },
            'secretsManagerSecret': {
                'kmsKeyId': 'string',
                'secretPolicy': 'string'
            },
            's3Bucket': {
                'bucketPolicy': 'string',
                'bucketAclGrants': [
                    {
                        'permission': 'READ'|'WRITE'|'READ_ACP'|'WRITE_ACP'|'FULL_CONTROL',
                        'grantee': {
                            'id': 'string',
                            'uri': 'string'
                        }
                    },
                ],
                'bucketPublicAccessBlock': {
                    'ignorePublicAcls': True|False,
                    'restrictPublicBuckets': True|False
                },
                'accessPoints': {
                    'string': {
                        'accessPointPolicy': 'string',
                        'publicAccessBlock': {
                            'ignorePublicAcls': True|False,
                            'restrictPublicBuckets': True|False
                        },
                        'networkOrigin': {
                            'vpcConfiguration': {
                                'vpcId': 'string'
                            },
                            'internetConfiguration': {}

                        }
                    }
                }
            },
            'snsTopic': {
                'topicPolicy': 'string'
            },
            'sqsQueue': {
                'queuePolicy': 'string'
            },
            's3ExpressDirectoryBucket': {
                'bucketPolicy': 'string'
            }
        }
    },
    clientToken='string'
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the account analyzer used to generate the access preview. You can only create an access preview for analyzers with an Account type and Active status.

type configurations:

dict

param configurations:

[REQUIRED]

Access control configuration for your resource that is used to generate the access preview. The access preview includes findings for external access allowed to the resource with the proposed access control configuration. The configuration must contain exactly one element.

  • (string) --

    • (dict) --

      Access control configuration structures for your resource. You specify the configuration as a type-value pair. You can specify only one type of access control configuration.

      • ebsSnapshot (dict) --

        The access control configuration is for an Amazon EBS volume snapshot.

        • userIds (list) --

          The IDs of the Amazon Web Services accounts that have access to the Amazon EBS volume snapshot.

          • If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the userIds, then the access preview uses the existing shared userIds for the snapshot.

          • If the access preview is for a new resource and you do not specify the userIds, then the access preview considers the snapshot without any userIds.

          • To propose deletion of existing shared accountIds, you can specify an empty list for userIds.

          • (string) --

        • groups (list) --

          The groups that have access to the Amazon EBS volume snapshot. If the value all is specified, then the Amazon EBS volume snapshot is public.

          • If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the groups, then the access preview uses the existing shared groups for the snapshot.

          • If the access preview is for a new resource and you do not specify the groups, then the access preview considers the snapshot without any groups.

          • To propose deletion of existing shared groups, you can specify an empty list for groups.

          • (string) --

        • kmsKeyId (string) --

          The KMS key identifier for an encrypted Amazon EBS volume snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

          • If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the kmsKeyId, or you specify an empty string, then the access preview uses the existing kmsKeyId of the snapshot.

          • If the access preview is for a new resource and you do not specify the kmsKeyId, the access preview considers the snapshot as unencrypted.

      • ecrRepository (dict) --

        The access control configuration is for an Amazon ECR repository.

        • repositoryPolicy (string) --

          The JSON repository policy text to apply to the Amazon ECR repository. For more information, see Private repository policy examples in the Amazon ECR User Guide.

      • iamRole (dict) --

        The access control configuration is for an IAM role.

        • trustPolicy (string) --

          The proposed trust policy for the IAM role.

      • efsFileSystem (dict) --

        The access control configuration is for an Amazon EFS file system.

        • fileSystemPolicy (string) --

          The JSON policy definition to apply to the Amazon EFS file system. For more information on the elements that make up a file system policy, see Amazon EFS Resource-based policies.

      • kmsKey (dict) --

        The access control configuration is for a KMS key.

        • keyPolicies (dict) --

          Resource policy configuration for the KMS key. The only valid value for the name of the key policy is default. For more information, see Default key policy.

          • (string) --

            • (string) --

        • grants (list) --

          A list of proposed grant configurations for the KMS key. If the proposed grant configuration is for an existing key, the access preview uses the proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the key.

          • (dict) --

            A proposed grant configuration for a KMS key. For more information, see CreateGrant.

            • operations (list) -- [REQUIRED]

              A list of operations that the grant permits.

              • (string) --

            • granteePrincipal (string) -- [REQUIRED]

              The principal that is given permission to perform the operations that the grant permits.

            • retiringPrincipal (string) --

              The principal that is given permission to retire the grant by using RetireGrant operation.

            • constraints (dict) --

              Use this structure to propose allowing cryptographic operations in the grant only when the operation request includes the specified encryption context.

              • encryptionContextEquals (dict) --

                A list of key-value pairs that must match the encryption context in the cryptographic operation request. The grant allows the operation only when the encryption context in the request is the same as the encryption context specified in this constraint.

                • (string) --

                  • (string) --

              • encryptionContextSubset (dict) --

                A list of key-value pairs that must be included in the encryption context of the cryptographic operation request. The grant allows the cryptographic operation only when the encryption context in the request includes the key-value pairs specified in this constraint, although it can include additional key-value pairs.

                • (string) --

                  • (string) --

            • issuingAccount (string) -- [REQUIRED]

              The Amazon Web Services account under which the grant was issued. The account is used to propose KMS grants issued by accounts other than the owner of the key.

      • rdsDbClusterSnapshot (dict) --

        The access control configuration is for an Amazon RDS DB cluster snapshot.

        • attributes (dict) --

          The names and values of manual DB cluster snapshot attributes. Manual DB cluster snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB cluster snapshot. The only valid value for AttributeName for the attribute map is restore

          • (string) --

            • (dict) --

              The values for a manual Amazon RDS DB cluster snapshot attribute.

              • accountIds (list) --

                The Amazon Web Services account IDs that have access to the manual Amazon RDS DB cluster snapshot. If the value all is specified, then the Amazon RDS DB cluster snapshot is public and can be copied or restored by all Amazon Web Services accounts.

                • If the configuration is for an existing Amazon RDS DB cluster snapshot and you do not specify the accountIds in RdsDbClusterSnapshotAttributeValue, then the access preview uses the existing shared accountIds for the snapshot.

                • If the access preview is for a new resource and you do not specify the specify the accountIds in RdsDbClusterSnapshotAttributeValue, then the access preview considers the snapshot without any attributes.

                • To propose deletion of existing shared accountIds, you can specify an empty list for accountIds in the RdsDbClusterSnapshotAttributeValue.

                • (string) --

        • kmsKeyId (string) --

          The KMS key identifier for an encrypted Amazon RDS DB cluster snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

          • If the configuration is for an existing Amazon RDS DB cluster snapshot and you do not specify the kmsKeyId, or you specify an empty string, then the access preview uses the existing kmsKeyId of the snapshot.

          • If the access preview is for a new resource and you do not specify the specify the kmsKeyId, then the access preview considers the snapshot as unencrypted.

      • rdsDbSnapshot (dict) --

        The access control configuration is for an Amazon RDS DB snapshot.

        • attributes (dict) --

          The names and values of manual DB snapshot attributes. Manual DB snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB snapshot. The only valid value for attributeName for the attribute map is restore.

          • (string) --

            • (dict) --

              The name and values of a manual Amazon RDS DB snapshot attribute. Manual DB snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB snapshot.

              • accountIds (list) --

                The Amazon Web Services account IDs that have access to the manual Amazon RDS DB snapshot. If the value all is specified, then the Amazon RDS DB snapshot is public and can be copied or restored by all Amazon Web Services accounts.

                • If the configuration is for an existing Amazon RDS DB snapshot and you do not specify the accountIds in RdsDbSnapshotAttributeValue, then the access preview uses the existing shared accountIds for the snapshot.

                • If the access preview is for a new resource and you do not specify the specify the accountIds in RdsDbSnapshotAttributeValue, then the access preview considers the snapshot without any attributes.

                • To propose deletion of an existing shared accountIds, you can specify an empty list for accountIds in the RdsDbSnapshotAttributeValue.

                • (string) --

        • kmsKeyId (string) --

          The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

          • If the configuration is for an existing Amazon RDS DB snapshot and you do not specify the kmsKeyId, or you specify an empty string, then the access preview uses the existing kmsKeyId of the snapshot.

          • If the access preview is for a new resource and you do not specify the specify the kmsKeyId, then the access preview considers the snapshot as unencrypted.

      • secretsManagerSecret (dict) --

        The access control configuration is for a Secrets Manager secret.

        • kmsKeyId (string) --

          The proposed ARN, key ID, or alias of the KMS key.

        • secretPolicy (string) --

          The proposed resource policy defining who can access or manage the secret.

      • s3Bucket (dict) --

        The access control configuration is for an Amazon S3 bucket.

        • bucketPolicy (string) --

          The proposed bucket policy for the Amazon S3 bucket.

        • bucketAclGrants (list) --

          The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. If the proposed grant configuration is for an existing bucket, the access preview uses the proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the bucket.

          • (dict) --

            A proposed access control list grant configuration for an Amazon S3 bucket. For more information, see How to Specify an ACL.

            • permission (string) -- [REQUIRED]

              The permissions being granted.

            • grantee (dict) -- [REQUIRED]

              The grantee to whom you’re assigning access rights.

              • id (string) --

                The value specified is the canonical user ID of an Amazon Web Services account.

              • uri (string) --

                Used for granting permissions to a predefined group.

        • bucketPublicAccessBlock (dict) --

          The proposed block public access configuration for the Amazon S3 bucket.

          • ignorePublicAcls (boolean) -- [REQUIRED]

            Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.

          • restrictPublicBuckets (boolean) -- [REQUIRED]

            Specifies whether Amazon S3 should restrict public bucket policies for this bucket.

        • accessPoints (dict) --

          The configuration of Amazon S3 access points or multi-region access points for the bucket. You can propose up to 10 new access points per bucket.

          • (string) --

            • (dict) --

              The configuration for an Amazon S3 access point or multi-region access point for the bucket. You can propose up to 10 access points or multi-region access points per bucket. If the proposed Amazon S3 access point configuration is for an existing bucket, the access preview uses the proposed access point configuration in place of the existing access points. To propose an access point without a policy, you can provide an empty string as the access point policy. For more information, see Creating access points. For more information about access point policy limits, see Access points restrictions and limitations.

              • accessPointPolicy (string) --

                The access point or multi-region access point policy.

              • publicAccessBlock (dict) --

                The proposed S3PublicAccessBlock configuration to apply to this Amazon S3 access point or multi-region access point.

                • ignorePublicAcls (boolean) -- [REQUIRED]

                  Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.

                • restrictPublicBuckets (boolean) -- [REQUIRED]

                  Specifies whether Amazon S3 should restrict public bucket policies for this bucket.

              • networkOrigin (dict) --

                The proposed Internet and VpcConfiguration to apply to this Amazon S3 access point. VpcConfiguration does not apply to multi-region access points. If the access preview is for a new resource and neither is specified, the access preview uses Internet for the network origin. If the access preview is for an existing resource and neither is specified, the access preview uses the exiting network origin.

                • vpcConfiguration (dict) --

                  The proposed virtual private cloud (VPC) configuration for the Amazon S3 access point. VPC configuration does not apply to multi-region access points. For more information, see VpcConfiguration.

                  • vpcId (string) -- [REQUIRED]

                    If this field is specified, this access point will only allow connections from the specified VPC ID.

                • internetConfiguration (dict) --

                  The configuration for the Amazon S3 access point or multi-region access point with an Internet origin.

      • snsTopic (dict) --

        The access control configuration is for an Amazon SNS topic

      • sqsQueue (dict) --

        The access control configuration is for an Amazon SQS queue.

        • queuePolicy (string) --

          The proposed resource policy for the Amazon SQS queue.

      • s3ExpressDirectoryBucket (dict) --

        The access control configuration is for an Amazon S3 directory bucket.

        • bucketPolicy (string) --

          The proposed bucket policy for the Amazon S3 directory bucket.

type clientToken:

string

param clientToken:

A client token.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The unique ID for the access preview.

GetAccessPreview (updated) Link ¶
Changes (response)
{'accessPreview': {'configurations': {'s3ExpressDirectoryBucket': {'bucketPolicy': 'string'}}}}

Retrieves information about an access preview for the specified analyzer.

See also: AWS API Documentation

Request Syntax

client.get_access_preview(
    accessPreviewId='string',
    analyzerArn='string'
)
type accessPreviewId:

string

param accessPreviewId:

[REQUIRED]

The unique ID for the access preview.

type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer used to generate the access preview.

rtype:

dict

returns:

Response Syntax

{
    'accessPreview': {
        'id': 'string',
        'analyzerArn': 'string',
        'configurations': {
            'string': {
                'ebsSnapshot': {
                    'userIds': [
                        'string',
                    ],
                    'groups': [
                        'string',
                    ],
                    'kmsKeyId': 'string'
                },
                'ecrRepository': {
                    'repositoryPolicy': 'string'
                },
                'iamRole': {
                    'trustPolicy': 'string'
                },
                'efsFileSystem': {
                    'fileSystemPolicy': 'string'
                },
                'kmsKey': {
                    'keyPolicies': {
                        'string': 'string'
                    },
                    'grants': [
                        {
                            'operations': [
                                'CreateGrant'|'Decrypt'|'DescribeKey'|'Encrypt'|'GenerateDataKey'|'GenerateDataKeyPair'|'GenerateDataKeyPairWithoutPlaintext'|'GenerateDataKeyWithoutPlaintext'|'GetPublicKey'|'ReEncryptFrom'|'ReEncryptTo'|'RetireGrant'|'Sign'|'Verify',
                            ],
                            'granteePrincipal': 'string',
                            'retiringPrincipal': 'string',
                            'constraints': {
                                'encryptionContextEquals': {
                                    'string': 'string'
                                },
                                'encryptionContextSubset': {
                                    'string': 'string'
                                }
                            },
                            'issuingAccount': 'string'
                        },
                    ]
                },
                'rdsDbClusterSnapshot': {
                    'attributes': {
                        'string': {
                            'accountIds': [
                                'string',
                            ]
                        }
                    },
                    'kmsKeyId': 'string'
                },
                'rdsDbSnapshot': {
                    'attributes': {
                        'string': {
                            'accountIds': [
                                'string',
                            ]
                        }
                    },
                    'kmsKeyId': 'string'
                },
                'secretsManagerSecret': {
                    'kmsKeyId': 'string',
                    'secretPolicy': 'string'
                },
                's3Bucket': {
                    'bucketPolicy': 'string',
                    'bucketAclGrants': [
                        {
                            'permission': 'READ'|'WRITE'|'READ_ACP'|'WRITE_ACP'|'FULL_CONTROL',
                            'grantee': {
                                'id': 'string',
                                'uri': 'string'
                            }
                        },
                    ],
                    'bucketPublicAccessBlock': {
                        'ignorePublicAcls': True|False,
                        'restrictPublicBuckets': True|False
                    },
                    'accessPoints': {
                        'string': {
                            'accessPointPolicy': 'string',
                            'publicAccessBlock': {
                                'ignorePublicAcls': True|False,
                                'restrictPublicBuckets': True|False
                            },
                            'networkOrigin': {
                                'vpcConfiguration': {
                                    'vpcId': 'string'
                                },
                                'internetConfiguration': {}
                            }
                        }
                    }
                },
                'snsTopic': {
                    'topicPolicy': 'string'
                },
                'sqsQueue': {
                    'queuePolicy': 'string'
                },
                's3ExpressDirectoryBucket': {
                    'bucketPolicy': 'string'
                }
            }
        },
        'createdAt': datetime(2015, 1, 1),
        'status': 'COMPLETED'|'CREATING'|'FAILED',
        'statusReason': {
            'code': 'INTERNAL_ERROR'|'INVALID_CONFIGURATION'
        }
    }
}

Response Structure

  • (dict) --

    • accessPreview (dict) --

      An object that contains information about the access preview.

      • id (string) --

        The unique ID for the access preview.

      • analyzerArn (string) --

        The ARN of the analyzer used to generate the access preview.

      • configurations (dict) --

        A map of resource ARNs for the proposed resource configuration.

        • (string) --

          • (dict) --

            Access control configuration structures for your resource. You specify the configuration as a type-value pair. You can specify only one type of access control configuration.

            • ebsSnapshot (dict) --

              The access control configuration is for an Amazon EBS volume snapshot.

              • userIds (list) --

                The IDs of the Amazon Web Services accounts that have access to the Amazon EBS volume snapshot.

                • If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the userIds, then the access preview uses the existing shared userIds for the snapshot.

                • If the access preview is for a new resource and you do not specify the userIds, then the access preview considers the snapshot without any userIds.

                • To propose deletion of existing shared accountIds, you can specify an empty list for userIds.

                • (string) --

              • groups (list) --

                The groups that have access to the Amazon EBS volume snapshot. If the value all is specified, then the Amazon EBS volume snapshot is public.

                • If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the groups, then the access preview uses the existing shared groups for the snapshot.

                • If the access preview is for a new resource and you do not specify the groups, then the access preview considers the snapshot without any groups.

                • To propose deletion of existing shared groups, you can specify an empty list for groups.

                • (string) --

              • kmsKeyId (string) --

                The KMS key identifier for an encrypted Amazon EBS volume snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

                • If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the kmsKeyId, or you specify an empty string, then the access preview uses the existing kmsKeyId of the snapshot.

                • If the access preview is for a new resource and you do not specify the kmsKeyId, the access preview considers the snapshot as unencrypted.

            • ecrRepository (dict) --

              The access control configuration is for an Amazon ECR repository.

              • repositoryPolicy (string) --

                The JSON repository policy text to apply to the Amazon ECR repository. For more information, see Private repository policy examples in the Amazon ECR User Guide.

            • iamRole (dict) --

              The access control configuration is for an IAM role.

              • trustPolicy (string) --

                The proposed trust policy for the IAM role.

            • efsFileSystem (dict) --

              The access control configuration is for an Amazon EFS file system.

              • fileSystemPolicy (string) --

                The JSON policy definition to apply to the Amazon EFS file system. For more information on the elements that make up a file system policy, see Amazon EFS Resource-based policies.

            • kmsKey (dict) --

              The access control configuration is for a KMS key.

              • keyPolicies (dict) --

                Resource policy configuration for the KMS key. The only valid value for the name of the key policy is default. For more information, see Default key policy.

                • (string) --

                  • (string) --

              • grants (list) --

                A list of proposed grant configurations for the KMS key. If the proposed grant configuration is for an existing key, the access preview uses the proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the key.

                • (dict) --

                  A proposed grant configuration for a KMS key. For more information, see CreateGrant.

                  • operations (list) --

                    A list of operations that the grant permits.

                    • (string) --

                  • granteePrincipal (string) --

                    The principal that is given permission to perform the operations that the grant permits.

                  • retiringPrincipal (string) --

                    The principal that is given permission to retire the grant by using RetireGrant operation.

                  • constraints (dict) --

                    Use this structure to propose allowing cryptographic operations in the grant only when the operation request includes the specified encryption context.

                    • encryptionContextEquals (dict) --

                      A list of key-value pairs that must match the encryption context in the cryptographic operation request. The grant allows the operation only when the encryption context in the request is the same as the encryption context specified in this constraint.

                      • (string) --

                        • (string) --

                    • encryptionContextSubset (dict) --

                      A list of key-value pairs that must be included in the encryption context of the cryptographic operation request. The grant allows the cryptographic operation only when the encryption context in the request includes the key-value pairs specified in this constraint, although it can include additional key-value pairs.

                      • (string) --

                        • (string) --

                  • issuingAccount (string) --

                    The Amazon Web Services account under which the grant was issued. The account is used to propose KMS grants issued by accounts other than the owner of the key.

            • rdsDbClusterSnapshot (dict) --

              The access control configuration is for an Amazon RDS DB cluster snapshot.

              • attributes (dict) --

                The names and values of manual DB cluster snapshot attributes. Manual DB cluster snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB cluster snapshot. The only valid value for AttributeName for the attribute map is restore

                • (string) --

                  • (dict) --

                    The values for a manual Amazon RDS DB cluster snapshot attribute.

                    • accountIds (list) --

                      The Amazon Web Services account IDs that have access to the manual Amazon RDS DB cluster snapshot. If the value all is specified, then the Amazon RDS DB cluster snapshot is public and can be copied or restored by all Amazon Web Services accounts.

                      • If the configuration is for an existing Amazon RDS DB cluster snapshot and you do not specify the accountIds in RdsDbClusterSnapshotAttributeValue, then the access preview uses the existing shared accountIds for the snapshot.

                      • If the access preview is for a new resource and you do not specify the specify the accountIds in RdsDbClusterSnapshotAttributeValue, then the access preview considers the snapshot without any attributes.

                      • To propose deletion of existing shared accountIds, you can specify an empty list for accountIds in the RdsDbClusterSnapshotAttributeValue.

                      • (string) --

              • kmsKeyId (string) --

                The KMS key identifier for an encrypted Amazon RDS DB cluster snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

                • If the configuration is for an existing Amazon RDS DB cluster snapshot and you do not specify the kmsKeyId, or you specify an empty string, then the access preview uses the existing kmsKeyId of the snapshot.

                • If the access preview is for a new resource and you do not specify the specify the kmsKeyId, then the access preview considers the snapshot as unencrypted.

            • rdsDbSnapshot (dict) --

              The access control configuration is for an Amazon RDS DB snapshot.

              • attributes (dict) --

                The names and values of manual DB snapshot attributes. Manual DB snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB snapshot. The only valid value for attributeName for the attribute map is restore.

                • (string) --

                  • (dict) --

                    The name and values of a manual Amazon RDS DB snapshot attribute. Manual DB snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB snapshot.

                    • accountIds (list) --

                      The Amazon Web Services account IDs that have access to the manual Amazon RDS DB snapshot. If the value all is specified, then the Amazon RDS DB snapshot is public and can be copied or restored by all Amazon Web Services accounts.

                      • If the configuration is for an existing Amazon RDS DB snapshot and you do not specify the accountIds in RdsDbSnapshotAttributeValue, then the access preview uses the existing shared accountIds for the snapshot.

                      • If the access preview is for a new resource and you do not specify the specify the accountIds in RdsDbSnapshotAttributeValue, then the access preview considers the snapshot without any attributes.

                      • To propose deletion of an existing shared accountIds, you can specify an empty list for accountIds in the RdsDbSnapshotAttributeValue.

                      • (string) --

              • kmsKeyId (string) --

                The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

                • If the configuration is for an existing Amazon RDS DB snapshot and you do not specify the kmsKeyId, or you specify an empty string, then the access preview uses the existing kmsKeyId of the snapshot.

                • If the access preview is for a new resource and you do not specify the specify the kmsKeyId, then the access preview considers the snapshot as unencrypted.

            • secretsManagerSecret (dict) --

              The access control configuration is for a Secrets Manager secret.

              • kmsKeyId (string) --

                The proposed ARN, key ID, or alias of the KMS key.

              • secretPolicy (string) --

                The proposed resource policy defining who can access or manage the secret.

            • s3Bucket (dict) --

              The access control configuration is for an Amazon S3 bucket.

              • bucketPolicy (string) --

                The proposed bucket policy for the Amazon S3 bucket.

              • bucketAclGrants (list) --

                The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. If the proposed grant configuration is for an existing bucket, the access preview uses the proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the bucket.

                • (dict) --

                  A proposed access control list grant configuration for an Amazon S3 bucket. For more information, see How to Specify an ACL.

                  • permission (string) --

                    The permissions being granted.

                  • grantee (dict) --

                    The grantee to whom you’re assigning access rights.

                    • id (string) --

                      The value specified is the canonical user ID of an Amazon Web Services account.

                    • uri (string) --

                      Used for granting permissions to a predefined group.

              • bucketPublicAccessBlock (dict) --

                The proposed block public access configuration for the Amazon S3 bucket.

                • ignorePublicAcls (boolean) --

                  Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.

                • restrictPublicBuckets (boolean) --

                  Specifies whether Amazon S3 should restrict public bucket policies for this bucket.

              • accessPoints (dict) --

                The configuration of Amazon S3 access points or multi-region access points for the bucket. You can propose up to 10 new access points per bucket.

                • (string) --

                  • (dict) --

                    The configuration for an Amazon S3 access point or multi-region access point for the bucket. You can propose up to 10 access points or multi-region access points per bucket. If the proposed Amazon S3 access point configuration is for an existing bucket, the access preview uses the proposed access point configuration in place of the existing access points. To propose an access point without a policy, you can provide an empty string as the access point policy. For more information, see Creating access points. For more information about access point policy limits, see Access points restrictions and limitations.

                    • accessPointPolicy (string) --

                      The access point or multi-region access point policy.

                    • publicAccessBlock (dict) --

                      The proposed S3PublicAccessBlock configuration to apply to this Amazon S3 access point or multi-region access point.

                      • ignorePublicAcls (boolean) --

                        Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.

                      • restrictPublicBuckets (boolean) --

                        Specifies whether Amazon S3 should restrict public bucket policies for this bucket.

                    • networkOrigin (dict) --

                      The proposed Internet and VpcConfiguration to apply to this Amazon S3 access point. VpcConfiguration does not apply to multi-region access points. If the access preview is for a new resource and neither is specified, the access preview uses Internet for the network origin. If the access preview is for an existing resource and neither is specified, the access preview uses the exiting network origin.

                      • vpcConfiguration (dict) --

                        The proposed virtual private cloud (VPC) configuration for the Amazon S3 access point. VPC configuration does not apply to multi-region access points. For more information, see VpcConfiguration.

                        • vpcId (string) --

                          If this field is specified, this access point will only allow connections from the specified VPC ID.

                      • internetConfiguration (dict) --

                        The configuration for the Amazon S3 access point or multi-region access point with an Internet origin.

            • snsTopic (dict) --

              The access control configuration is for an Amazon SNS topic

            • sqsQueue (dict) --

              The access control configuration is for an Amazon SQS queue.

              • queuePolicy (string) --

                The proposed resource policy for the Amazon SQS queue.

            • s3ExpressDirectoryBucket (dict) --

              The access control configuration is for an Amazon S3 directory bucket.

              • bucketPolicy (string) --

                The proposed bucket policy for the Amazon S3 directory bucket.

      • createdAt (datetime) --

        The time at which the access preview was created.

      • status (string) --

        The status of the access preview.

        • Creating - The access preview creation is in progress.

        • Completed - The access preview is complete. You can preview findings for external access to the resource.

        • Failed - The access preview creation has failed.

      • statusReason (dict) --

        Provides more details about the current status of the access preview.

        For example, if the creation of the access preview fails, a Failed status is returned. This failure can be due to an internal issue with the analysis or due to an invalid resource configuration.

        • code (string) --

          The reason code for the current status of the access preview.

GetAnalyzedResource (updated) Link ¶
Changes (response)
{'resource': {'resourceType': {'AWS::S3Express::DirectoryBucket'}}}

Retrieves information about a resource that was analyzed.

See also: AWS API Documentation

Request Syntax

client.get_analyzed_resource(
    analyzerArn='string',
    resourceArn='string'
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer to retrieve information from.

type resourceArn:

string

param resourceArn:

[REQUIRED]

The ARN of the resource to retrieve information about.

rtype:

dict

returns:

Response Syntax

{
    'resource': {
        'resourceArn': 'string',
        'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket',
        'createdAt': datetime(2015, 1, 1),
        'analyzedAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'isPublic': True|False,
        'actions': [
            'string',
        ],
        'sharedVia': [
            'string',
        ],
        'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
        'resourceOwnerAccount': 'string',
        'error': 'string'
    }
}

Response Structure

  • (dict) --

    The response to the request.

    • resource (dict) --

      An AnalyzedResource object that contains information that IAM Access Analyzer found when it analyzed the resource.

      • resourceArn (string) --

        The ARN of the resource that was analyzed.

      • resourceType (string) --

        The type of the resource that was analyzed.

      • createdAt (datetime) --

        The time at which the finding was created.

      • analyzedAt (datetime) --

        The time at which the resource was analyzed.

      • updatedAt (datetime) --

        The time at which the finding was updated.

      • isPublic (boolean) --

        Indicates whether the policy that generated the finding grants public access to the resource.

      • actions (list) --

        The actions that an external principal is granted permission to use by the policy that generated the finding.

        • (string) --

      • sharedVia (list) --

        Indicates how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

        • (string) --

      • status (string) --

        The current status of the finding generated from the analyzed resource.

      • resourceOwnerAccount (string) --

        The Amazon Web Services account ID that owns the resource.

      • error (string) --

        An error message.

GetFinding (updated) Link ¶
Changes (response)
{'finding': {'resourceType': {'AWS::S3Express::DirectoryBucket'}}}

Retrieves information about the specified finding.

See also: AWS API Documentation

Request Syntax

client.get_finding(
    analyzerArn='string',
    id='string'
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer that generated the finding.

type id:

string

param id:

[REQUIRED]

The ID of the finding to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'finding': {
        'id': 'string',
        'principal': {
            'string': 'string'
        },
        'action': [
            'string',
        ],
        'resource': 'string',
        'isPublic': True|False,
        'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket',
        'condition': {
            'string': 'string'
        },
        'createdAt': datetime(2015, 1, 1),
        'analyzedAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
        'resourceOwnerAccount': 'string',
        'error': 'string',
        'sources': [
            {
                'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                'detail': {
                    'accessPointArn': 'string',
                    'accessPointAccount': 'string'
                }
            },
        ]
    }
}

Response Structure

  • (dict) --

    The response to the request.

    • finding (dict) --

      A finding object that contains finding details.

      • id (string) --

        The ID of the finding.

      • principal (dict) --

        The external principal that has access to a resource within the zone of trust.

        • (string) --

          • (string) --

      • action (list) --

        The action in the analyzed policy statement that an external principal has permission to use.

        • (string) --

      • resource (string) --

        The resource that an external principal has access to.

      • isPublic (boolean) --

        Indicates whether the policy that generated the finding allows public access to the resource.

      • resourceType (string) --

        The type of the resource identified in the finding.

      • condition (dict) --

        The condition in the analyzed policy statement that resulted in a finding.

        • (string) --

          • (string) --

      • createdAt (datetime) --

        The time at which the finding was generated.

      • analyzedAt (datetime) --

        The time at which the resource was analyzed.

      • updatedAt (datetime) --

        The time at which the finding was updated.

      • status (string) --

        The current status of the finding.

      • resourceOwnerAccount (string) --

        The Amazon Web Services account ID that owns the resource.

      • error (string) --

        An error.

      • sources (list) --

        The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

        • (dict) --

          The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

          • type (string) --

            Indicates the type of access that generated the finding.

          • detail (dict) --

            Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

            • accessPointArn (string) --

              The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

            • accessPointAccount (string) --

              The account of the cross-account access point that generated the finding.

GetFindingV2 (updated) Link ¶
Changes (response)
{'resourceType': {'AWS::S3Express::DirectoryBucket'}}

Retrieves information about the specified finding.

See also: AWS API Documentation

Request Syntax

client.get_finding_v2(
    analyzerArn='string',
    id='string',
    maxResults=123,
    nextToken='string'
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer that generated the finding.

type id:

string

param id:

[REQUIRED]

The ID of the finding to retrieve.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

type nextToken:

string

param nextToken:

A token used for pagination of results returned.

rtype:

dict

returns:

Response Syntax

{
    'analyzedAt': datetime(2015, 1, 1),
    'createdAt': datetime(2015, 1, 1),
    'error': 'string',
    'id': 'string',
    'nextToken': 'string',
    'resource': 'string',
    'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket',
    'resourceOwnerAccount': 'string',
    'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
    'updatedAt': datetime(2015, 1, 1),
    'findingDetails': [
        {
            'externalAccessDetails': {
                'action': [
                    'string',
                ],
                'condition': {
                    'string': 'string'
                },
                'isPublic': True|False,
                'principal': {
                    'string': 'string'
                },
                'sources': [
                    {
                        'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                        'detail': {
                            'accessPointArn': 'string',
                            'accessPointAccount': 'string'
                        }
                    },
                ]
            },
            'unusedPermissionDetails': {
                'actions': [
                    {
                        'action': 'string',
                        'lastAccessed': datetime(2015, 1, 1)
                    },
                ],
                'serviceNamespace': 'string',
                'lastAccessed': datetime(2015, 1, 1)
            },
            'unusedIamUserAccessKeyDetails': {
                'accessKeyId': 'string',
                'lastAccessed': datetime(2015, 1, 1)
            },
            'unusedIamRoleDetails': {
                'lastAccessed': datetime(2015, 1, 1)
            },
            'unusedIamUserPasswordDetails': {
                'lastAccessed': datetime(2015, 1, 1)
            }
        },
    ],
    'findingType': 'ExternalAccess'|'UnusedIAMRole'|'UnusedIAMUserAccessKey'|'UnusedIAMUserPassword'|'UnusedPermission'
}

Response Structure

  • (dict) --

    • analyzedAt (datetime) --

      The time at which the resource-based policy or IAM entity that generated the finding was analyzed.

    • createdAt (datetime) --

      The time at which the finding was created.

    • error (string) --

      An error.

    • id (string) --

      The ID of the finding to retrieve.

    • nextToken (string) --

      A token used for pagination of results returned.

    • resource (string) --

      The resource that generated the finding.

    • resourceType (string) --

      The type of the resource identified in the finding.

    • resourceOwnerAccount (string) --

      Tye Amazon Web Services account ID that owns the resource.

    • status (string) --

      The status of the finding.

    • updatedAt (datetime) --

      The time at which the finding was updated.

    • findingDetails (list) --

      A localized message that explains the finding and provides guidance on how to address it.

      • (dict) --

        Contains information about an external access or unused access finding. Only one parameter can be used in a FindingDetails object.

        • externalAccessDetails (dict) --

          The details for an external access analyzer finding.

          • action (list) --

            The action in the analyzed policy statement that an external principal has permission to use.

            • (string) --

          • condition (dict) --

            The condition in the analyzed policy statement that resulted in an external access finding.

            • (string) --

              • (string) --

          • isPublic (boolean) --

            Specifies whether the external access finding is public.

          • principal (dict) --

            The external principal that has access to a resource within the zone of trust.

            • (string) --

              • (string) --

          • sources (list) --

            The sources of the external access finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

            • (dict) --

              The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

              • type (string) --

                Indicates the type of access that generated the finding.

              • detail (dict) --

                Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

                • accessPointArn (string) --

                  The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

                • accessPointAccount (string) --

                  The account of the cross-account access point that generated the finding.

        • unusedPermissionDetails (dict) --

          The details for an unused access analyzer finding with an unused permission finding type.

          • actions (list) --

            A list of unused actions for which the unused access finding was generated.

            • (dict) --

              Contains information about an unused access finding for an action. IAM Access Analyzer charges for unused access analysis based on the number of IAM roles and users analyzed per month. For more details on pricing, see IAM Access Analyzer pricing.

              • action (string) --

                The action for which the unused access finding was generated.

              • lastAccessed (datetime) --

                The time at which the action was last accessed.

          • serviceNamespace (string) --

            The namespace of the Amazon Web Services service that contains the unused actions.

          • lastAccessed (datetime) --

            The time at which the permission last accessed.

        • unusedIamUserAccessKeyDetails (dict) --

          The details for an unused access analyzer finding with an unused IAM user access key finding type.

          • accessKeyId (string) --

            The ID of the access key for which the unused access finding was generated.

          • lastAccessed (datetime) --

            The time at which the access key was last accessed.

        • unusedIamRoleDetails (dict) --

          The details for an unused access analyzer finding with an unused IAM role finding type.

          • lastAccessed (datetime) --

            The time at which the role was last accessed.

        • unusedIamUserPasswordDetails (dict) --

          The details for an unused access analyzer finding with an unused IAM user password finding type.

          • lastAccessed (datetime) --

            The time at which the password was last accessed.

    • findingType (string) --

      The type of the finding. For external access analyzers, the type is ExternalAccess. For unused access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, UnusedIAMUserPassword, or UnusedPermission.

ListAccessPreviewFindings (updated) Link ¶
Changes (response)
{'findings': {'resourceType': {'AWS::S3Express::DirectoryBucket'}}}

Retrieves a list of access preview findings generated by the specified access preview.

See also: AWS API Documentation

Request Syntax

client.list_access_preview_findings(
    accessPreviewId='string',
    analyzerArn='string',
    filter={
        'string': {
            'eq': [
                'string',
            ],
            'neq': [
                'string',
            ],
            'contains': [
                'string',
            ],
            'exists': True|False
        }
    },
    nextToken='string',
    maxResults=123
)
type accessPreviewId:

string

param accessPreviewId:

[REQUIRED]

The unique ID for the access preview.

type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer used to generate the access.

type filter:

dict

param filter:

Criteria to filter the returned findings.

  • (string) --

    • (dict) --

      The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys.

      • eq (list) --

        An "equals" operator to match for the filter used to create the rule.

        • (string) --

      • neq (list) --

        A "not equals" operator to match for the filter used to create the rule.

        • (string) --

      • contains (list) --

        A "contains" operator to match for the filter used to create the rule.

        • (string) --

      • exists (boolean) --

        An "exists" operator to match for the filter used to create the rule.

type nextToken:

string

param nextToken:

A token used for pagination of results returned.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

rtype:

dict

returns:

Response Syntax

{
    'findings': [
        {
            'id': 'string',
            'existingFindingId': 'string',
            'existingFindingStatus': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'principal': {
                'string': 'string'
            },
            'action': [
                'string',
            ],
            'condition': {
                'string': 'string'
            },
            'resource': 'string',
            'isPublic': True|False,
            'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket',
            'createdAt': datetime(2015, 1, 1),
            'changeType': 'CHANGED'|'NEW'|'UNCHANGED',
            'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'resourceOwnerAccount': 'string',
            'error': 'string',
            'sources': [
                {
                    'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                    'detail': {
                        'accessPointArn': 'string',
                        'accessPointAccount': 'string'
                    }
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • findings (list) --

      A list of access preview findings that match the specified filter criteria.

      • (dict) --

        An access preview finding generated by the access preview.

        • id (string) --

          The ID of the access preview finding. This ID uniquely identifies the element in the list of access preview findings and is not related to the finding ID in Access Analyzer.

        • existingFindingId (string) --

          The existing ID of the finding in IAM Access Analyzer, provided only for existing findings.

        • existingFindingStatus (string) --

          The existing status of the finding, provided only for existing findings.

        • principal (dict) --

          The external principal that has access to a resource within the zone of trust.

          • (string) --

            • (string) --

        • action (list) --

          The action in the analyzed policy statement that an external principal has permission to perform.

          • (string) --

        • condition (dict) --

          The condition in the analyzed policy statement that resulted in a finding.

          • (string) --

            • (string) --

        • resource (string) --

          The resource that an external principal has access to. This is the resource associated with the access preview.

        • isPublic (boolean) --

          Indicates whether the policy that generated the finding allows public access to the resource.

        • resourceType (string) --

          The type of the resource that can be accessed in the finding.

        • createdAt (datetime) --

          The time at which the access preview finding was created.

        • changeType (string) --

          Provides context on how the access preview finding compares to existing access identified in IAM Access Analyzer.

          • New - The finding is for newly-introduced access.

          • Unchanged - The preview finding is an existing finding that would remain unchanged.

          • Changed - The preview finding is an existing finding with a change in status.

          For example, a Changed finding with preview status Resolved and existing status Active indicates the existing Active finding would become Resolved as a result of the proposed permissions change.

        • status (string) --

          The preview status of the finding. This is what the status of the finding would be after permissions deployment. For example, a Changed finding with preview status Resolved and existing status Active indicates the existing Active finding would become Resolved as a result of the proposed permissions change.

        • resourceOwnerAccount (string) --

          The Amazon Web Services account ID that owns the resource. For most Amazon Web Services resources, the owning account is the account in which the resource was created.

        • error (string) --

          An error.

        • sources (list) --

          The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

          • (dict) --

            The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

            • type (string) --

              Indicates the type of access that generated the finding.

            • detail (dict) --

              Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

              • accessPointArn (string) --

                The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

              • accessPointAccount (string) --

                The account of the cross-account access point that generated the finding.

    • nextToken (string) --

      A token used for pagination of results returned.

ListAnalyzedResources (updated) Link ¶
Changes (request, response)
Request
{'resourceType': {'AWS::S3Express::DirectoryBucket'}}
Response
{'analyzedResources': {'resourceType': {'AWS::S3Express::DirectoryBucket'}}}

Retrieves a list of resources of the specified type that have been analyzed by the specified analyzer..

See also: AWS API Documentation

Request Syntax

client.list_analyzed_resources(
    analyzerArn='string',
    resourceType='AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket',
    nextToken='string',
    maxResults=123
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer to retrieve a list of analyzed resources from.

type resourceType:

string

param resourceType:

The type of resource.

type nextToken:

string

param nextToken:

A token used for pagination of results returned.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

rtype:

dict

returns:

Response Syntax

{
    'analyzedResources': [
        {
            'resourceArn': 'string',
            'resourceOwnerAccount': 'string',
            'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The response to the request.

    • analyzedResources (list) --

      A list of resources that were analyzed.

      • (dict) --

        Contains the ARN of the analyzed resource.

        • resourceArn (string) --

          The ARN of the analyzed resource.

        • resourceOwnerAccount (string) --

          The Amazon Web Services account ID that owns the resource.

        • resourceType (string) --

          The type of resource that was analyzed.

    • nextToken (string) --

      A token used for pagination of results returned.

ListFindings (updated) Link ¶
Changes (response)
{'findings': {'resourceType': {'AWS::S3Express::DirectoryBucket'}}}

Retrieves a list of findings generated by the specified analyzer.

To learn about filter keys that you can use to retrieve a list of findings, see IAM Access Analyzer filter keys in the IAM User Guide.

See also: AWS API Documentation

Request Syntax

client.list_findings(
    analyzerArn='string',
    filter={
        'string': {
            'eq': [
                'string',
            ],
            'neq': [
                'string',
            ],
            'contains': [
                'string',
            ],
            'exists': True|False
        }
    },
    sort={
        'attributeName': 'string',
        'orderBy': 'ASC'|'DESC'
    },
    nextToken='string',
    maxResults=123
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer to retrieve findings from.

type filter:

dict

param filter:

A filter to match for the findings to return.

  • (string) --

    • (dict) --

      The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys.

      • eq (list) --

        An "equals" operator to match for the filter used to create the rule.

        • (string) --

      • neq (list) --

        A "not equals" operator to match for the filter used to create the rule.

        • (string) --

      • contains (list) --

        A "contains" operator to match for the filter used to create the rule.

        • (string) --

      • exists (boolean) --

        An "exists" operator to match for the filter used to create the rule.

type sort:

dict

param sort:

The sort order for the findings returned.

  • attributeName (string) --

    The name of the attribute to sort on.

  • orderBy (string) --

    The sort order, ascending or descending.

type nextToken:

string

param nextToken:

A token used for pagination of results returned.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

rtype:

dict

returns:

Response Syntax

{
    'findings': [
        {
            'id': 'string',
            'principal': {
                'string': 'string'
            },
            'action': [
                'string',
            ],
            'resource': 'string',
            'isPublic': True|False,
            'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket',
            'condition': {
                'string': 'string'
            },
            'createdAt': datetime(2015, 1, 1),
            'analyzedAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'resourceOwnerAccount': 'string',
            'error': 'string',
            'sources': [
                {
                    'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                    'detail': {
                        'accessPointArn': 'string',
                        'accessPointAccount': 'string'
                    }
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The response to the request.

    • findings (list) --

      A list of findings retrieved from the analyzer that match the filter criteria specified, if any.

      • (dict) --

        Contains information about a finding.

        • id (string) --

          The ID of the finding.

        • principal (dict) --

          The external principal that has access to a resource within the zone of trust.

          • (string) --

            • (string) --

        • action (list) --

          The action in the analyzed policy statement that an external principal has permission to use.

          • (string) --

        • resource (string) --

          The resource that the external principal has access to.

        • isPublic (boolean) --

          Indicates whether the finding reports a resource that has a policy that allows public access.

        • resourceType (string) --

          The type of the resource that the external principal has access to.

        • condition (dict) --

          The condition in the analyzed policy statement that resulted in a finding.

          • (string) --

            • (string) --

        • createdAt (datetime) --

          The time at which the finding was created.

        • analyzedAt (datetime) --

          The time at which the resource-based policy that generated the finding was analyzed.

        • updatedAt (datetime) --

          The time at which the finding was most recently updated.

        • status (string) --

          The status of the finding.

        • resourceOwnerAccount (string) --

          The Amazon Web Services account ID that owns the resource.

        • error (string) --

          The error that resulted in an Error finding.

        • sources (list) --

          The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

          • (dict) --

            The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

            • type (string) --

              Indicates the type of access that generated the finding.

            • detail (dict) --

              Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

              • accessPointArn (string) --

                The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

              • accessPointAccount (string) --

                The account of the cross-account access point that generated the finding.

    • nextToken (string) --

      A token used for pagination of results returned.

ListFindingsV2 (updated) Link ¶
Changes (response)
{'findings': {'resourceType': {'AWS::S3Express::DirectoryBucket'}}}

Retrieves a list of findings generated by the specified analyzer.

To learn about filter keys that you can use to retrieve a list of findings, see IAM Access Analyzer filter keys in the IAM User Guide.

See also: AWS API Documentation

Request Syntax

client.list_findings_v2(
    analyzerArn='string',
    filter={
        'string': {
            'eq': [
                'string',
            ],
            'neq': [
                'string',
            ],
            'contains': [
                'string',
            ],
            'exists': True|False
        }
    },
    maxResults=123,
    nextToken='string',
    sort={
        'attributeName': 'string',
        'orderBy': 'ASC'|'DESC'
    }
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer to retrieve findings from.

type filter:

dict

param filter:

A filter to match for the findings to return.

  • (string) --

    • (dict) --

      The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys.

      • eq (list) --

        An "equals" operator to match for the filter used to create the rule.

        • (string) --

      • neq (list) --

        A "not equals" operator to match for the filter used to create the rule.

        • (string) --

      • contains (list) --

        A "contains" operator to match for the filter used to create the rule.

        • (string) --

      • exists (boolean) --

        An "exists" operator to match for the filter used to create the rule.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

type nextToken:

string

param nextToken:

A token used for pagination of results returned.

type sort:

dict

param sort:

The criteria used to sort.

  • attributeName (string) --

    The name of the attribute to sort on.

  • orderBy (string) --

    The sort order, ascending or descending.

rtype:

dict

returns:

Response Syntax

{
    'findings': [
        {
            'analyzedAt': datetime(2015, 1, 1),
            'createdAt': datetime(2015, 1, 1),
            'error': 'string',
            'id': 'string',
            'resource': 'string',
            'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket',
            'resourceOwnerAccount': 'string',
            'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'updatedAt': datetime(2015, 1, 1),
            'findingType': 'ExternalAccess'|'UnusedIAMRole'|'UnusedIAMUserAccessKey'|'UnusedIAMUserPassword'|'UnusedPermission'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • findings (list) --

      A list of findings retrieved from the analyzer that match the filter criteria specified, if any.

      • (dict) --

        Contains information about a finding.

        • analyzedAt (datetime) --

          The time at which the resource-based policy or IAM entity that generated the finding was analyzed.

        • createdAt (datetime) --

          The time at which the finding was created.

        • error (string) --

          The error that resulted in an Error finding.

        • id (string) --

          The ID of the finding.

        • resource (string) --

          The resource that the external principal has access to.

        • resourceType (string) --

          The type of the resource that the external principal has access to.

        • resourceOwnerAccount (string) --

          The Amazon Web Services account ID that owns the resource.

        • status (string) --

          The status of the finding.

        • updatedAt (datetime) --

          The time at which the finding was most recently updated.

        • findingType (string) --

          The type of the external access or unused access finding.

    • nextToken (string) --

      A token used for pagination of results returned.