We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.AccessAnalyzer

Inherits:
AWS.Service show all
Identifier:
accessanalyzer
API Version:
2019-11-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Identity and Access Management Access Analyzer helps you to set, verify, and refine your IAM policies by providing a suite of capabilities. Its features include findings for external and unused access, basic and custom policy checks for validating policies, and policy generation to generate fine-grained policies. To start using IAM Access Analyzer to identify external or unused access, you first need to create an analyzer.

External access analyzers help identify potential risks of accessing resources by enabling you to identify any resource policies that grant access to an external principal. It does this by using logic-based reasoning to analyze resource-based policies in your Amazon Web Services environment. An external principal can be another Amazon Web Services account, a root user, an IAM user or role, a federated user, an Amazon Web Services service, or an anonymous user. You can also use IAM Access Analyzer to preview public and cross-account access to your resources before deploying permissions changes.

Unused access analyzers help identify potential identity access risks by enabling you to identify unused IAM roles, unused access keys, unused console passwords, and IAM principals with unused service and action-level permissions.

Beyond findings, IAM Access Analyzer provides basic and custom policy checks to validate IAM policies before deploying permissions changes. You can use policy generation to refine permissions by attaching a policy generated using access activity logged in CloudTrail logs.

This guide describes the IAM Access Analyzer operations that you can call programmatically. For general information about IAM Access Analyzer, see Identity and Access Management Access Analyzer in the IAM User Guide.

Sending a Request Using AccessAnalyzer

var accessanalyzer = new AWS.AccessAnalyzer();
accessanalyzer.applyArchiveRule(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the AccessAnalyzer object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var accessanalyzer = new AWS.AccessAnalyzer({apiVersion: '2019-11-01'});

You can also set the API version globally in AWS.config.apiVersions using the accessanalyzer service identifier:

AWS.config.apiVersions = {
  accessanalyzer: '2019-11-01',
  // other service API versions
};

var accessanalyzer = new AWS.AccessAnalyzer();

Version:

  • 2019-11-01

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.AccessAnalyzer(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a AccessAnalyzer object

var accessanalyzer = new AWS.AccessAnalyzer({apiVersion: '2019-11-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.AccessAnalyzer.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.AccessAnalyzer.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.AccessAnalyzer.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

applyArchiveRule(params = {}, callback) ⇒ AWS.Request

Retroactively applies the archive rule to existing findings that meet the archive rule criteria.

Service Reference:

Examples:

Calling the applyArchiveRule operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  ruleName: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
accessanalyzer.applyArchiveRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

      The Amazon resource name (ARN) of the analyzer.

    • ruleName — (String)

      The name of the rule to apply.

    • clientToken — (String)

      A client token.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelPolicyGeneration(params = {}, callback) ⇒ AWS.Request

Cancels the requested policy generation.

Service Reference:

Examples:

Calling the cancelPolicyGeneration operation

var params = {
  jobId: 'STRING_VALUE' /* required */
};
accessanalyzer.cancelPolicyGeneration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The JobId that is returned by the StartPolicyGeneration operation. The JobId can be used with GetGeneratedPolicy to retrieve the generated policies or used with CancelPolicyGeneration to cancel the policy generation request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

checkAccessNotGranted(params = {}, callback) ⇒ AWS.Request

Checks whether the specified access isn't allowed by a policy.

Service Reference:

Examples:

Calling the checkAccessNotGranted operation

var params = {
  access: [ /* required */
    {
      actions: [ /* required */
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  policyDocument: 'STRING_VALUE', /* required */
  policyType: IDENTITY_POLICY | RESOURCE_POLICY /* required */
};
accessanalyzer.checkAccessNotGranted(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyDocument — (String)

      The JSON policy document to use as the content for the policy.

    • access — (Array<map>)

      An access object containing the permissions that shouldn't be granted by the specified policy.

      • actionsrequired — (Array<String>)

        A list of actions for the access permissions. Any strings that can be used as an action in an IAM policy can be used in the list of actions to check.

    • policyType — (String)

      The type of policy. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups.

      Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy.

      Possible values include:
      • "IDENTITY_POLICY"
      • "RESOURCE_POLICY"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • result — (String)

        The result of the check for whether the access is allowed. If the result is PASS, the specified policy doesn't allow any of the specified permissions in the access object. If the result is FAIL, the specified policy might allow some or all of the permissions in the access object.

        Possible values include:
        • "PASS"
        • "FAIL"
      • message — (String)

        The message indicating whether the specified access is allowed.

      • reasons — (Array<map>)

        A description of the reasoning of the result.

        • description — (String)

          A description of the reasoning of a result of checking for access.

        • statementIndex — (Integer)

          The index number of the reason statement.

        • statementId — (String)

          The identifier for the reason statement.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

checkNoNewAccess(params = {}, callback) ⇒ AWS.Request

Checks whether new access is allowed for an updated policy when compared to the existing policy.

You can find examples for reference policies and learn how to set up and run a custom policy check for new access in the IAM Access Analyzer custom policy checks samples repository on GitHub. The reference policies in this repository are meant to be passed to the existingPolicyDocument request parameter.

Service Reference:

Examples:

Calling the checkNoNewAccess operation

var params = {
  existingPolicyDocument: 'STRING_VALUE', /* required */
  newPolicyDocument: 'STRING_VALUE', /* required */
  policyType: IDENTITY_POLICY | RESOURCE_POLICY /* required */
};
accessanalyzer.checkNoNewAccess(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • newPolicyDocument — (String)

      The JSON policy document to use as the content for the updated policy.

    • existingPolicyDocument — (String)

      The JSON policy document to use as the content for the existing policy.

    • policyType — (String)

      The type of policy to compare. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups.

      Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy.

      Possible values include:
      • "IDENTITY_POLICY"
      • "RESOURCE_POLICY"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • result — (String)

        The result of the check for new access. If the result is PASS, no new access is allowed by the updated policy. If the result is FAIL, the updated policy might allow new access.

        Possible values include:
        • "PASS"
        • "FAIL"
      • message — (String)

        The message indicating whether the updated policy allows new access.

      • reasons — (Array<map>)

        A description of the reasoning of the result.

        • description — (String)

          A description of the reasoning of a result of checking for access.

        • statementIndex — (Integer)

          The index number of the reason statement.

        • statementId — (String)

          The identifier for the reason statement.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createAccessPreview(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createAccessPreview operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  configurations: { /* required */
    '<ConfigurationsMapKey>': {
      dynamodbStream: {
        streamPolicy: 'STRING_VALUE'
      },
      dynamodbTable: {
        tablePolicy: 'STRING_VALUE'
      },
      ebsSnapshot: {
        groups: [
          'STRING_VALUE',
          /* more items */
        ],
        kmsKeyId: 'STRING_VALUE',
        userIds: [
          'STRING_VALUE',
          /* more items */
        ]
      },
      ecrRepository: {
        repositoryPolicy: 'STRING_VALUE'
      },
      efsFileSystem: {
        fileSystemPolicy: 'STRING_VALUE'
      },
      iamRole: {
        trustPolicy: 'STRING_VALUE'
      },
      kmsKey: {
        grants: [
          {
            granteePrincipal: 'STRING_VALUE', /* required */
            issuingAccount: 'STRING_VALUE', /* required */
            operations: [ /* required */
              CreateGrant | Decrypt | DescribeKey | Encrypt | GenerateDataKey | GenerateDataKeyPair | GenerateDataKeyPairWithoutPlaintext | GenerateDataKeyWithoutPlaintext | GetPublicKey | ReEncryptFrom | ReEncryptTo | RetireGrant | Sign | Verify,
              /* more items */
            ],
            constraints: {
              encryptionContextEquals: {
                '<KmsConstraintsKey>': 'STRING_VALUE',
                /* '<KmsConstraintsKey>': ... */
              },
              encryptionContextSubset: {
                '<KmsConstraintsKey>': 'STRING_VALUE',
                /* '<KmsConstraintsKey>': ... */
              }
            },
            retiringPrincipal: 'STRING_VALUE'
          },
          /* more items */
        ],
        keyPolicies: {
          '<PolicyName>': 'STRING_VALUE',
          /* '<PolicyName>': ... */
        }
      },
      rdsDbClusterSnapshot: {
        attributes: {
          '<RdsDbClusterSnapshotAttributeName>': {
            accountIds: [
              'STRING_VALUE',
              /* more items */
            ]
          },
          /* '<RdsDbClusterSnapshotAttributeName>': ... */
        },
        kmsKeyId: 'STRING_VALUE'
      },
      rdsDbSnapshot: {
        attributes: {
          '<RdsDbSnapshotAttributeName>': {
            accountIds: [
              'STRING_VALUE',
              /* more items */
            ]
          },
          /* '<RdsDbSnapshotAttributeName>': ... */
        },
        kmsKeyId: 'STRING_VALUE'
      },
      s3Bucket: {
        accessPoints: {
          '<AccessPointArn>': {
            accessPointPolicy: 'STRING_VALUE',
            networkOrigin: {
              internetConfiguration: {
              },
              vpcConfiguration: {
                vpcId: 'STRING_VALUE' /* required */
              }
            },
            publicAccessBlock: {
              ignorePublicAcls: true || false, /* required */
              restrictPublicBuckets: true || false /* required */
            }
          },
          /* '<AccessPointArn>': ... */
        },
        bucketAclGrants: [
          {
            grantee: { /* required */
              id: 'STRING_VALUE',
              uri: 'STRING_VALUE'
            },
            permission: READ | WRITE | READ_ACP | WRITE_ACP | FULL_CONTROL /* required */
          },
          /* more items */
        ],
        bucketPolicy: 'STRING_VALUE',
        bucketPublicAccessBlock: {
          ignorePublicAcls: true || false, /* required */
          restrictPublicBuckets: true || false /* required */
        }
      },
      s3ExpressDirectoryBucket: {
        bucketPolicy: 'STRING_VALUE'
      },
      secretsManagerSecret: {
        kmsKeyId: 'STRING_VALUE',
        secretPolicy: 'STRING_VALUE'
      },
      snsTopic: {
        topicPolicy: 'STRING_VALUE'
      },
      sqsQueue: {
        queuePolicy: 'STRING_VALUE'
      }
    },
    /* '<ConfigurationsMapKey>': ... */
  },
  clientToken: 'STRING_VALUE'
};
accessanalyzer.createAccessPreview(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

      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.

    • configurations — (map<map>)

      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.

      • ebsSnapshot — (map)

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

        • userIds — (Array<String>)

          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.

        • groups — (Array<String>)

          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.

        • 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 — (map)

        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 — (map)

        The access control configuration is for an IAM role.

        • trustPolicy — (String)

          The proposed trust policy for the IAM role.

      • efsFileSystem — (map)

        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 — (map)

        The access control configuration is for a KMS key.

        • keyPolicies — (map<String>)

          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.

        • grants — (Array<map>)

          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.

          • operationsrequired — (Array<String>)

            A list of operations that the grant permits.

          • granteePrincipalrequired — (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 — (map)

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

            • encryptionContextEquals — (map<String>)

              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.

            • encryptionContextSubset — (map<String>)

              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.

          • issuingAccountrequired — (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 — (map)

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

        • attributes — (map<map>)

          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

          • accountIds — (Array<String>)

            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.

        • 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 — (map)

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

        • attributes — (map<map>)

          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.

          • accountIds — (Array<String>)

            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.

        • 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 — (map)

        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 — (map)

        The access control configuration is for an Amazon S3 bucket.

        • bucketPolicy — (String)

          The proposed bucket policy for the Amazon S3 bucket.

        • bucketAclGrants — (Array<map>)

          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.

          • permissionrequired — (String)

            The permissions being granted.

            Possible values include:
            • "READ"
            • "WRITE"
            • "READ_ACP"
            • "WRITE_ACP"
            • "FULL_CONTROL"
          • granteerequired — (map)

            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 — (map)

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

          • ignorePublicAclsrequired — (Boolean)

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

          • restrictPublicBucketsrequired — (Boolean)

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

        • accessPoints — (map<map>)

          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.

          • accessPointPolicy — (String)

            The access point or multi-region access point policy.

          • publicAccessBlock — (map)

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

            • ignorePublicAclsrequired — (Boolean)

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

            • restrictPublicBucketsrequired — (Boolean)

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

          • networkOrigin — (map)

            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 — (map)

              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.

              • vpcIdrequired — (String)

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

            • internetConfiguration — (map)

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

      • snsTopic — (map)

        The access control configuration is for an Amazon SNS topic

      • sqsQueue — (map)

        The access control configuration is for an Amazon SQS queue.

        • queuePolicy — (String)

          The proposed resource policy for the Amazon SQS queue.

      • s3ExpressDirectoryBucket — (map)

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

        • bucketPolicy — (String)

          The proposed bucket policy for the Amazon S3 directory bucket.

      • dynamodbStream — (map)

        The access control configuration is for a DynamoDB stream.

        • streamPolicy — (String)

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

      • dynamodbTable — (map)

        The access control configuration is for a DynamoDB table or index.

        • tablePolicy — (String)

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

    • clientToken — (String)

      A client token.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • id — (String)

        The unique ID for the access preview.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createAnalyzer(params = {}, callback) ⇒ AWS.Request

Creates an analyzer for your account.

Service Reference:

Examples:

Calling the createAnalyzer operation

var params = {
  analyzerName: 'STRING_VALUE', /* required */
  type: ACCOUNT | ORGANIZATION | ACCOUNT_UNUSED_ACCESS | ORGANIZATION_UNUSED_ACCESS, /* required */
  archiveRules: [
    {
      filter: { /* required */
        '<String>': {
          contains: [
            'STRING_VALUE',
            /* more items */
          ],
          eq: [
            'STRING_VALUE',
            /* more items */
          ],
          exists: true || false,
          neq: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        /* '<String>': ... */
      },
      ruleName: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  clientToken: 'STRING_VALUE',
  configuration: {
    unusedAccess: {
      unusedAccessAge: 'NUMBER_VALUE'
    }
  },
  tags: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
accessanalyzer.createAnalyzer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerName — (String)

      The name of the analyzer to create.

    • type — (String)

      The type of analyzer to create. Only ACCOUNT, ORGANIZATION, ACCOUNT_UNUSED_ACCESS, and ORGANIZATION_UNUSED_ACCESS analyzers are supported. You can create only one analyzer per account per Region. You can create up to 5 analyzers per organization per Region.

      Possible values include:
      • "ACCOUNT"
      • "ORGANIZATION"
      • "ACCOUNT_UNUSED_ACCESS"
      • "ORGANIZATION_UNUSED_ACCESS"
    • archiveRules — (Array<map>)

      Specifies the archive rules to add for the analyzer. Archive rules automatically archive findings that meet the criteria you define for the rule.

      • ruleNamerequired — (String)

        The name of the rule.

      • filterrequired — (map<map>)

        The condition and values for a criterion.

        • eq — (Array<String>)

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

        • neq — (Array<String>)

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

        • contains — (Array<String>)

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

        • exists — (Boolean)

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

    • tags — (map<String>)

      An array of key-value pairs to apply to the analyzer.

    • clientToken — (String)

      A client token.

      If a token is not provided, the SDK will use a version 4 UUID.
    • configuration — (map)

      Specifies the configuration of the analyzer. If the analyzer is an unused access analyzer, the specified scope of unused access is used for the configuration. If the analyzer is an external access analyzer, this field is not used.

      • unusedAccess — (map)

        Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account. External access analyzers do not support any configuration.

        • unusedAccessAge — (Integer)

          The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 180 days.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • arn — (String)

        The ARN of the analyzer that was created by the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createArchiveRule(params = {}, callback) ⇒ AWS.Request

Creates an archive rule for the specified analyzer. Archive rules automatically archive new findings that meet the criteria you define when you create the rule.

To learn about filter keys that you can use to create an archive rule, see IAM Access Analyzer filter keys in the IAM User Guide.

Service Reference:

Examples:

Calling the createArchiveRule operation

var params = {
  analyzerName: 'STRING_VALUE', /* required */
  filter: { /* required */
    '<String>': {
      contains: [
        'STRING_VALUE',
        /* more items */
      ],
      eq: [
        'STRING_VALUE',
        /* more items */
      ],
      exists: true || false,
      neq: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* '<String>': ... */
  },
  ruleName: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
accessanalyzer.createArchiveRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerName — (String)

      The name of the created analyzer.

    • ruleName — (String)

      The name of the rule to create.

    • filter — (map<map>)

      The criteria for the rule.

      • eq — (Array<String>)

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

      • neq — (Array<String>)

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

      • contains — (Array<String>)

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

      • exists — (Boolean)

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

    • clientToken — (String)

      A client token.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteAnalyzer(params = {}, callback) ⇒ AWS.Request

Deletes the specified analyzer. When you delete an analyzer, IAM Access Analyzer is disabled for the account or organization in the current or specific Region. All findings that were generated by the analyzer are deleted. You cannot undo this action.

Service Reference:

Examples:

Calling the deleteAnalyzer operation

var params = {
  analyzerName: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
accessanalyzer.deleteAnalyzer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerName — (String)

      The name of the analyzer to delete.

    • clientToken — (String)

      A client token.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteArchiveRule(params = {}, callback) ⇒ AWS.Request

Deletes the specified archive rule.

Service Reference:

Examples:

Calling the deleteArchiveRule operation

var params = {
  analyzerName: 'STRING_VALUE', /* required */
  ruleName: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
accessanalyzer.deleteArchiveRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerName — (String)

      The name of the analyzer that associated with the archive rule to delete.

    • ruleName — (String)

      The name of the rule to delete.

    • clientToken — (String)

      A client token.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAccessPreview(params = {}, callback) ⇒ AWS.Request

Retrieves information about an access preview for the specified analyzer.

Service Reference:

Examples:

Calling the getAccessPreview operation

var params = {
  accessPreviewId: 'STRING_VALUE', /* required */
  analyzerArn: 'STRING_VALUE' /* required */
};
accessanalyzer.getAccessPreview(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • accessPreviewId — (String)

      The unique ID for the access preview.

    • analyzerArn — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • accessPreview — (map)

        An object that contains information about the access preview.

        • idrequired — (String)

          The unique ID for the access preview.

        • analyzerArnrequired — (String)

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

        • configurationsrequired — (map<map>)

          A map of resource ARNs for the proposed resource configuration.

          • ebsSnapshot — (map)

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

            • userIds — (Array<String>)

              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.

            • groups — (Array<String>)

              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.

            • 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 — (map)

            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 — (map)

            The access control configuration is for an IAM role.

            • trustPolicy — (String)

              The proposed trust policy for the IAM role.

          • efsFileSystem — (map)

            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 — (map)

            The access control configuration is for a KMS key.

            • keyPolicies — (map<String>)

              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.

            • grants — (Array<map>)

              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.

              • operationsrequired — (Array<String>)

                A list of operations that the grant permits.

              • granteePrincipalrequired — (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 — (map)

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

                • encryptionContextEquals — (map<String>)

                  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.

                • encryptionContextSubset — (map<String>)

                  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.

              • issuingAccountrequired — (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 — (map)

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

            • attributes — (map<map>)

              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

              • accountIds — (Array<String>)

                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.

            • 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 — (map)

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

            • attributes — (map<map>)

              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.

              • accountIds — (Array<String>)

                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.

            • 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 — (map)

            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 — (map)

            The access control configuration is for an Amazon S3 bucket.

            • bucketPolicy — (String)

              The proposed bucket policy for the Amazon S3 bucket.

            • bucketAclGrants — (Array<map>)

              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.

              • permissionrequired — (String)

                The permissions being granted.

                Possible values include:
                • "READ"
                • "WRITE"
                • "READ_ACP"
                • "WRITE_ACP"
                • "FULL_CONTROL"
              • granteerequired — (map)

                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 — (map)

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

              • ignorePublicAclsrequired — (Boolean)

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

              • restrictPublicBucketsrequired — (Boolean)

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

            • accessPoints — (map<map>)

              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.

              • accessPointPolicy — (String)

                The access point or multi-region access point policy.

              • publicAccessBlock — (map)

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

                • ignorePublicAclsrequired — (Boolean)

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

                • restrictPublicBucketsrequired — (Boolean)

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

              • networkOrigin — (map)

                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 — (map)

                  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.

                  • vpcIdrequired — (String)

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

                • internetConfiguration — (map)

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

          • snsTopic — (map)

            The access control configuration is for an Amazon SNS topic

          • sqsQueue — (map)

            The access control configuration is for an Amazon SQS queue.

            • queuePolicy — (String)

              The proposed resource policy for the Amazon SQS queue.

          • s3ExpressDirectoryBucket — (map)

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

            • bucketPolicy — (String)

              The proposed bucket policy for the Amazon S3 directory bucket.

          • dynamodbStream — (map)

            The access control configuration is for a DynamoDB stream.

            • streamPolicy — (String)

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

          • dynamodbTable — (map)

            The access control configuration is for a DynamoDB table or index.

            • tablePolicy — (String)

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

        • createdAtrequired — (Date)

          The time at which the access preview was created.

        • statusrequired — (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.

          Possible values include:
          • "COMPLETED"
          • "CREATING"
          • "FAILED"
        • statusReason — (map)

          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.

          • coderequired — (String)

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

            Possible values include:
            • "INTERNAL_ERROR"
            • "INVALID_CONFIGURATION"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAnalyzedResource(params = {}, callback) ⇒ AWS.Request

Retrieves information about a resource that was analyzed.

Service Reference:

Examples:

Calling the getAnalyzedResource operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  resourceArn: 'STRING_VALUE' /* required */
};
accessanalyzer.getAnalyzedResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

      The ARN of the analyzer to retrieve information from.

    • resourceArn — (String)

      The ARN of the resource to retrieve information about.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • resource — (map)

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

        • resourceArnrequired — (String)

          The ARN of the resource that was analyzed.

        • resourceTyperequired — (String)

          The type of the resource that was analyzed.

          Possible values include:
          • "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"
          • "AWS::DynamoDB::Table"
          • "AWS::DynamoDB::Stream"
        • createdAtrequired — (Date)

          The time at which the finding was created.

        • analyzedAtrequired — (Date)

          The time at which the resource was analyzed.

        • updatedAtrequired — (Date)

          The time at which the finding was updated.

        • isPublicrequired — (Boolean)

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

        • actions — (Array<String>)

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

        • sharedVia — (Array<String>)

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

        • status — (String)

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

          Possible values include:
          • "ACTIVE"
          • "ARCHIVED"
          • "RESOLVED"
        • resourceOwnerAccountrequired — (String)

          The Amazon Web Services account ID that owns the resource.

        • error — (String)

          An error message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAnalyzer(params = {}, callback) ⇒ AWS.Request

Retrieves information about the specified analyzer.

Service Reference:

Examples:

Calling the getAnalyzer operation

var params = {
  analyzerName: 'STRING_VALUE' /* required */
};
accessanalyzer.getAnalyzer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerName — (String)

      The name of the analyzer retrieved.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • analyzer — (map)

        An AnalyzerSummary object that contains information about the analyzer.

        • arnrequired — (String)

          The ARN of the analyzer.

        • namerequired — (String)

          The name of the analyzer.

        • typerequired — (String)

          The type of analyzer, which corresponds to the zone of trust chosen for the analyzer.

          Possible values include:
          • "ACCOUNT"
          • "ORGANIZATION"
          • "ACCOUNT_UNUSED_ACCESS"
          • "ORGANIZATION_UNUSED_ACCESS"
        • createdAtrequired — (Date)

          A timestamp for the time at which the analyzer was created.

        • lastResourceAnalyzed — (String)

          The resource that was most recently analyzed by the analyzer.

        • lastResourceAnalyzedAt — (Date)

          The time at which the most recently analyzed resource was analyzed.

        • tags — (map<String>)

          The tags added to the analyzer.

        • statusrequired — (String)

          The status of the analyzer. An Active analyzer successfully monitors supported resources and generates new findings. The analyzer is Disabled when a user action, such as removing trusted access for Identity and Access Management Access Analyzer from Organizations, causes the analyzer to stop generating new findings. The status is Creating when the analyzer creation is in progress and Failed when the analyzer creation has failed.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DISABLED"
          • "FAILED"
        • statusReason — (map)

          The statusReason provides more details about the current status of the analyzer. For example, if the creation for the analyzer fails, a Failed status is returned. For an analyzer with organization as the type, this failure can be due to an issue with creating the service-linked roles required in the member accounts of the Amazon Web Services organization.

          • coderequired — (String)

            The reason code for the current status of the analyzer.

            Possible values include:
            • "AWS_SERVICE_ACCESS_DISABLED"
            • "DELEGATED_ADMINISTRATOR_DEREGISTERED"
            • "ORGANIZATION_DELETED"
            • "SERVICE_LINKED_ROLE_CREATION_FAILED"
        • configuration — (map)

          Specifies whether the analyzer is an external access or unused access analyzer.

          • unusedAccess — (map)

            Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account. External access analyzers do not support any configuration.

            • unusedAccessAge — (Integer)

              The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 180 days.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getArchiveRule(params = {}, callback) ⇒ AWS.Request

Retrieves information about an archive rule.

To learn about filter keys that you can use to create an archive rule, see IAM Access Analyzer filter keys in the IAM User Guide.

Service Reference:

Examples:

Calling the getArchiveRule operation

var params = {
  analyzerName: 'STRING_VALUE', /* required */
  ruleName: 'STRING_VALUE' /* required */
};
accessanalyzer.getArchiveRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerName — (String)

      The name of the analyzer to retrieve rules from.

    • ruleName — (String)

      The name of the rule to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • archiveRule — (map)

        Contains information about an archive rule.

        • ruleNamerequired — (String)

          The name of the archive rule.

        • filterrequired — (map<map>)

          A filter used to define the archive rule.

          • eq — (Array<String>)

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

          • neq — (Array<String>)

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

          • contains — (Array<String>)

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

          • exists — (Boolean)

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

        • createdAtrequired — (Date)

          The time at which the archive rule was created.

        • updatedAtrequired — (Date)

          The time at which the archive rule was last updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getFinding(params = {}, callback) ⇒ AWS.Request

Retrieves information about the specified finding. GetFinding and GetFindingV2 both use access-analyzer:GetFinding in the Action element of an IAM policy statement. You must have permission to perform the access-analyzer:GetFinding action.

Service Reference:

Examples:

Calling the getFinding operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  id: 'STRING_VALUE' /* required */
};
accessanalyzer.getFinding(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

      The ARN of the analyzer that generated the finding.

    • id — (String)

      The ID of the finding to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • finding — (map)

        A finding object that contains finding details.

        • idrequired — (String)

          The ID of the finding.

        • principal — (map<String>)

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

        • action — (Array<String>)

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

        • 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.

        • resourceTyperequired — (String)

          The type of the resource identified in the finding.

          Possible values include:
          • "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"
          • "AWS::DynamoDB::Table"
          • "AWS::DynamoDB::Stream"
        • conditionrequired — (map<String>)

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

        • createdAtrequired — (Date)

          The time at which the finding was generated.

        • analyzedAtrequired — (Date)

          The time at which the resource was analyzed.

        • updatedAtrequired — (Date)

          The time at which the finding was updated.

        • statusrequired — (String)

          The current status of the finding.

          Possible values include:
          • "ACTIVE"
          • "ARCHIVED"
          • "RESOLVED"
        • resourceOwnerAccountrequired — (String)

          The Amazon Web Services account ID that owns the resource.

        • error — (String)

          An error.

        • sources — (Array<map>)

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

          • typerequired — (String)

            Indicates the type of access that generated the finding.

            Possible values include:
            • "POLICY"
            • "BUCKET_ACL"
            • "S3_ACCESS_POINT"
            • "S3_ACCESS_POINT_ACCOUNT"
          • detail — (map)

            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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getFindingV2(params = {}, callback) ⇒ AWS.Request

Retrieves information about the specified finding. GetFinding and GetFindingV2 both use access-analyzer:GetFinding in the Action element of an IAM policy statement. You must have permission to perform the access-analyzer:GetFinding action.

Service Reference:

Examples:

Calling the getFindingV2 operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  id: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
accessanalyzer.getFindingV2(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

      The ARN of the analyzer that generated the finding.

    • id — (String)

      The ID of the finding to retrieve.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

    • nextToken — (String)

      A token used for pagination of results returned.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • analyzedAt — (Date)

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

      • createdAt — (Date)

        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.

        Possible values include:
        • "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"
        • "AWS::DynamoDB::Table"
        • "AWS::DynamoDB::Stream"
      • resourceOwnerAccount — (String)

        Tye Amazon Web Services account ID that owns the resource.

      • status — (String)

        The status of the finding.

        Possible values include:
        • "ACTIVE"
        • "ARCHIVED"
        • "RESOLVED"
      • updatedAt — (Date)

        The time at which the finding was updated.

      • findingDetails — (Array<map>)

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

        • externalAccessDetails — (map)

          The details for an external access analyzer finding.

          • action — (Array<String>)

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

          • conditionrequired — (map<String>)

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

          • isPublic — (Boolean)

            Specifies whether the external access finding is public.

          • principal — (map<String>)

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

          • sources — (Array<map>)

            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.

            • typerequired — (String)

              Indicates the type of access that generated the finding.

              Possible values include:
              • "POLICY"
              • "BUCKET_ACL"
              • "S3_ACCESS_POINT"
              • "S3_ACCESS_POINT_ACCOUNT"
            • detail — (map)

              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 — (map)

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

          • actions — (Array<map>)

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

            • actionrequired — (String)

              The action for which the unused access finding was generated.

            • lastAccessed — (Date)

              The time at which the action was last accessed.

          • serviceNamespacerequired — (String)

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

          • lastAccessed — (Date)

            The time at which the permission last accessed.

        • unusedIamUserAccessKeyDetails — (map)

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

          • accessKeyIdrequired — (String)

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

          • lastAccessed — (Date)

            The time at which the access key was last accessed.

        • unusedIamRoleDetails — (map)

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

          • lastAccessed — (Date)

            The time at which the role was last accessed.

        • unusedIamUserPasswordDetails — (map)

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

          • lastAccessed — (Date)

            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.

        Possible values include:
        • "ExternalAccess"
        • "UnusedIAMRole"
        • "UnusedIAMUserAccessKey"
        • "UnusedIAMUserPassword"
        • "UnusedPermission"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGeneratedPolicy(params = {}, callback) ⇒ AWS.Request

Retrieves the policy that was generated using StartPolicyGeneration.

Service Reference:

Examples:

Calling the getGeneratedPolicy operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  includeResourcePlaceholders: true || false,
  includeServiceLevelTemplate: true || false
};
accessanalyzer.getGeneratedPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The JobId that is returned by the StartPolicyGeneration operation. The JobId can be used with GetGeneratedPolicy to retrieve the generated policies or used with CancelPolicyGeneration to cancel the policy generation request.

    • includeResourcePlaceholders — (Boolean)

      The level of detail that you want to generate. You can specify whether to generate policies with placeholders for resource ARNs for actions that support resource level granularity in policies.

      For example, in the resource section of a policy, you can receive a placeholder such as "Resource":"arn:aws:s3:::${BucketName}" instead of "*".

    • includeServiceLevelTemplate — (Boolean)

      The level of detail that you want to generate. You can specify whether to generate service-level policies.

      IAM Access Analyzer uses iam:servicelastaccessed to identify services that have been used recently to create this service-level template.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobDetails — (map)

        A GeneratedPolicyDetails object that contains details about the generated policy.

        • jobIdrequired — (String)

          The JobId that is returned by the StartPolicyGeneration operation. The JobId can be used with GetGeneratedPolicy to retrieve the generated policies or used with CancelPolicyGeneration to cancel the policy generation request.

        • statusrequired — (String)

          The status of the job request.

          Possible values include:
          • "IN_PROGRESS"
          • "SUCCEEDED"
          • "FAILED"
          • "CANCELED"
        • startedOnrequired — (Date)

          A timestamp of when the job was started.

        • completedOn — (Date)

          A timestamp of when the job was completed.

        • jobError — (map)

          The job error for the policy generation request.

          • coderequired — (String)

            The job error code.

            Possible values include:
            • "AUTHORIZATION_ERROR"
            • "RESOURCE_NOT_FOUND_ERROR"
            • "SERVICE_QUOTA_EXCEEDED_ERROR"
            • "SERVICE_ERROR"
          • messagerequired — (String)

            Specific information about the error. For example, which service quota was exceeded or which resource was not found.

      • generatedPolicyResult — (map)

        A GeneratedPolicyResult object that contains the generated policies and associated details.

        • propertiesrequired — (map)

          A GeneratedPolicyProperties object that contains properties of the generated policy.

          • isComplete — (Boolean)

            This value is set to true if the generated policy contains all possible actions for a service that IAM Access Analyzer identified from the CloudTrail trail that you specified, and false otherwise.

          • principalArnrequired — (String)

            The ARN of the IAM entity (user or role) for which you are generating a policy.

          • cloudTrailProperties — (map)

            Lists details about the Trail used to generated policy.

            • trailPropertiesrequired — (Array<map>)

              A TrailProperties object that contains settings for trail properties.

              • cloudTrailArnrequired — (String)

                Specifies the ARN of the trail. The format of a trail ARN is arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail.

              • regions — (Array<String>)

                A list of regions to get CloudTrail data from and analyze to generate a policy.

              • allRegions — (Boolean)

                Possible values are true or false. If set to true, IAM Access Analyzer retrieves CloudTrail data from all regions to analyze and generate a policy.

            • startTimerequired — (Date)

              The start of the time range for which IAM Access Analyzer reviews your CloudTrail events. Events with a timestamp before this time are not considered to generate a policy.

            • endTimerequired — (Date)

              The end of the time range for which IAM Access Analyzer reviews your CloudTrail events. Events with a timestamp after this time are not considered to generate a policy. If this is not included in the request, the default value is the current time.

        • generatedPolicies — (Array<map>)

          The text to use as the content for the new policy. The policy is created using the CreatePolicy action.

          • policyrequired — (String)

            The text to use as the content for the new policy. The policy is created using the CreatePolicy action.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAccessPreviewFindings(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listAccessPreviewFindings operation

var params = {
  accessPreviewId: 'STRING_VALUE', /* required */
  analyzerArn: 'STRING_VALUE', /* required */
  filter: {
    '<String>': {
      contains: [
        'STRING_VALUE',
        /* more items */
      ],
      eq: [
        'STRING_VALUE',
        /* more items */
      ],
      exists: true || false,
      neq: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* '<String>': ... */
  },
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
accessanalyzer.listAccessPreviewFindings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • accessPreviewId — (String)

      The unique ID for the access preview.

    • analyzerArn — (String)

      The ARN of the analyzer used to generate the access.

    • filter — (map<map>)

      Criteria to filter the returned findings.

      • eq — (Array<String>)

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

      • neq — (Array<String>)

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

      • contains — (Array<String>)

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

      • exists — (Boolean)

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

    • nextToken — (String)

      A token used for pagination of results returned.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • findings — (Array<map>)

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

        • idrequired — (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.

          Possible values include:
          • "ACTIVE"
          • "ARCHIVED"
          • "RESOLVED"
        • principal — (map<String>)

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

        • action — (Array<String>)

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

        • condition — (map<String>)

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

        • 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.

        • resourceTyperequired — (String)

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

          Possible values include:
          • "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"
          • "AWS::DynamoDB::Table"
          • "AWS::DynamoDB::Stream"
        • createdAtrequired — (Date)

          The time at which the access preview finding was created.

        • changeTyperequired — (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.

          Possible values include:
          • "CHANGED"
          • "NEW"
          • "UNCHANGED"
        • statusrequired — (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.

          Possible values include:
          • "ACTIVE"
          • "ARCHIVED"
          • "RESOLVED"
        • resourceOwnerAccountrequired — (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 — (Array<map>)

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

          • typerequired — (String)

            Indicates the type of access that generated the finding.

            Possible values include:
            • "POLICY"
            • "BUCKET_ACL"
            • "S3_ACCESS_POINT"
            • "S3_ACCESS_POINT_ACCOUNT"
          • detail — (map)

            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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAccessPreviews(params = {}, callback) ⇒ AWS.Request

Retrieves a list of access previews for the specified analyzer.

Service Reference:

Examples:

Calling the listAccessPreviews operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
accessanalyzer.listAccessPreviews(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

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

    • nextToken — (String)

      A token used for pagination of results returned.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • accessPreviews — (Array<map>)

        A list of access previews retrieved for the analyzer.

        • idrequired — (String)

          The unique ID for the access preview.

        • analyzerArnrequired — (String)

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

        • createdAtrequired — (Date)

          The time at which the access preview was created.

        • statusrequired — (String)

          The status of the access preview.

          • Creating - The access preview creation is in progress.

          • Completed - The access preview is complete and previews the findings for external access to the resource.

          • Failed - The access preview creation has failed.

          Possible values include:
          • "COMPLETED"
          • "CREATING"
          • "FAILED"
        • statusReason — (map)

          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 proposed resource configuration.

          • coderequired — (String)

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

            Possible values include:
            • "INTERNAL_ERROR"
            • "INVALID_CONFIGURATION"
      • nextToken — (String)

        A token used for pagination of results returned.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAnalyzedResources(params = {}, callback) ⇒ AWS.Request

Retrieves a list of resources of the specified type that have been analyzed by the specified external access analyzer. This action is not supported for unused access analyzers.

Service Reference:

Examples:

Calling the listAnalyzedResources operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  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 | AWS::DynamoDB::Table | AWS::DynamoDB::Stream
};
accessanalyzer.listAnalyzedResources(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

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

    • resourceType — (String)

      The type of resource.

      Possible values include:
      • "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"
      • "AWS::DynamoDB::Table"
      • "AWS::DynamoDB::Stream"
    • nextToken — (String)

      A token used for pagination of results returned.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • analyzedResources — (Array<map>)

        A list of resources that were analyzed.

        • resourceArnrequired — (String)

          The ARN of the analyzed resource.

        • resourceOwnerAccountrequired — (String)

          The Amazon Web Services account ID that owns the resource.

        • resourceTyperequired — (String)

          The type of resource that was analyzed.

          Possible values include:
          • "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"
          • "AWS::DynamoDB::Table"
          • "AWS::DynamoDB::Stream"
      • nextToken — (String)

        A token used for pagination of results returned.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAnalyzers(params = {}, callback) ⇒ AWS.Request

Retrieves a list of analyzers.

Service Reference:

Examples:

Calling the listAnalyzers operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  type: ACCOUNT | ORGANIZATION | ACCOUNT_UNUSED_ACCESS | ORGANIZATION_UNUSED_ACCESS
};
accessanalyzer.listAnalyzers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      A token used for pagination of results returned.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

    • type — (String)

      The type of analyzer.

      Possible values include:
      • "ACCOUNT"
      • "ORGANIZATION"
      • "ACCOUNT_UNUSED_ACCESS"
      • "ORGANIZATION_UNUSED_ACCESS"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • analyzers — (Array<map>)

        The analyzers retrieved.

        • arnrequired — (String)

          The ARN of the analyzer.

        • namerequired — (String)

          The name of the analyzer.

        • typerequired — (String)

          The type of analyzer, which corresponds to the zone of trust chosen for the analyzer.

          Possible values include:
          • "ACCOUNT"
          • "ORGANIZATION"
          • "ACCOUNT_UNUSED_ACCESS"
          • "ORGANIZATION_UNUSED_ACCESS"
        • createdAtrequired — (Date)

          A timestamp for the time at which the analyzer was created.

        • lastResourceAnalyzed — (String)

          The resource that was most recently analyzed by the analyzer.

        • lastResourceAnalyzedAt — (Date)

          The time at which the most recently analyzed resource was analyzed.

        • tags — (map<String>)

          The tags added to the analyzer.

        • statusrequired — (String)

          The status of the analyzer. An Active analyzer successfully monitors supported resources and generates new findings. The analyzer is Disabled when a user action, such as removing trusted access for Identity and Access Management Access Analyzer from Organizations, causes the analyzer to stop generating new findings. The status is Creating when the analyzer creation is in progress and Failed when the analyzer creation has failed.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DISABLED"
          • "FAILED"
        • statusReason — (map)

          The statusReason provides more details about the current status of the analyzer. For example, if the creation for the analyzer fails, a Failed status is returned. For an analyzer with organization as the type, this failure can be due to an issue with creating the service-linked roles required in the member accounts of the Amazon Web Services organization.

          • coderequired — (String)

            The reason code for the current status of the analyzer.

            Possible values include:
            • "AWS_SERVICE_ACCESS_DISABLED"
            • "DELEGATED_ADMINISTRATOR_DEREGISTERED"
            • "ORGANIZATION_DELETED"
            • "SERVICE_LINKED_ROLE_CREATION_FAILED"
        • configuration — (map)

          Specifies whether the analyzer is an external access or unused access analyzer.

          • unusedAccess — (map)

            Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account. External access analyzers do not support any configuration.

            • unusedAccessAge — (Integer)

              The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 180 days.

      • nextToken — (String)

        A token used for pagination of results returned.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listArchiveRules(params = {}, callback) ⇒ AWS.Request

Retrieves a list of archive rules created for the specified analyzer.

Service Reference:

Examples:

Calling the listArchiveRules operation

var params = {
  analyzerName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
accessanalyzer.listArchiveRules(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerName — (String)

      The name of the analyzer to retrieve rules from.

    • nextToken — (String)

      A token used for pagination of results returned.

    • maxResults — (Integer)

      The maximum number of results to return in the request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • archiveRules — (Array<map>)

        A list of archive rules created for the specified analyzer.

        • ruleNamerequired — (String)

          The name of the archive rule.

        • filterrequired — (map<map>)

          A filter used to define the archive rule.

          • eq — (Array<String>)

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

          • neq — (Array<String>)

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

          • contains — (Array<String>)

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

          • exists — (Boolean)

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

        • createdAtrequired — (Date)

          The time at which the archive rule was created.

        • updatedAtrequired — (Date)

          The time at which the archive rule was last updated.

      • nextToken — (String)

        A token used for pagination of results returned.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listFindings(params = {}, callback) ⇒ AWS.Request

Retrieves a list of findings generated by the specified analyzer. ListFindings and ListFindingsV2 both use access-analyzer:ListFindings in the Action element of an IAM policy statement. You must have permission to perform the access-analyzer:ListFindings action.

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.

Service Reference:

Examples:

Calling the listFindings operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  filter: {
    '<String>': {
      contains: [
        'STRING_VALUE',
        /* more items */
      ],
      eq: [
        'STRING_VALUE',
        /* more items */
      ],
      exists: true || false,
      neq: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* '<String>': ... */
  },
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  sort: {
    attributeName: 'STRING_VALUE',
    orderBy: ASC | DESC
  }
};
accessanalyzer.listFindings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

      The ARN of the analyzer to retrieve findings from.

    • filter — (map<map>)

      A filter to match for the findings to return.

      • eq — (Array<String>)

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

      • neq — (Array<String>)

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

      • contains — (Array<String>)

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

      • exists — (Boolean)

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

    • sort — (map)

      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.

        Possible values include:
        • "ASC"
        • "DESC"
    • nextToken — (String)

      A token used for pagination of results returned.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • findings — (Array<map>)

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

        • idrequired — (String)

          The ID of the finding.

        • principal — (map<String>)

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

        • action — (Array<String>)

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

        • 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.

        • resourceTyperequired — (String)

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

          Possible values include:
          • "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"
          • "AWS::DynamoDB::Table"
          • "AWS::DynamoDB::Stream"
        • conditionrequired — (map<String>)

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

        • createdAtrequired — (Date)

          The time at which the finding was created.

        • analyzedAtrequired — (Date)

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

        • updatedAtrequired — (Date)

          The time at which the finding was most recently updated.

        • statusrequired — (String)

          The status of the finding.

          Possible values include:
          • "ACTIVE"
          • "ARCHIVED"
          • "RESOLVED"
        • resourceOwnerAccountrequired — (String)

          The Amazon Web Services account ID that owns the resource.

        • error — (String)

          The error that resulted in an Error finding.

        • sources — (Array<map>)

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

          • typerequired — (String)

            Indicates the type of access that generated the finding.

            Possible values include:
            • "POLICY"
            • "BUCKET_ACL"
            • "S3_ACCESS_POINT"
            • "S3_ACCESS_POINT_ACCOUNT"
          • detail — (map)

            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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listFindingsV2(params = {}, callback) ⇒ AWS.Request

Retrieves a list of findings generated by the specified analyzer. ListFindings and ListFindingsV2 both use access-analyzer:ListFindings in the Action element of an IAM policy statement. You must have permission to perform the access-analyzer:ListFindings action.

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.

Service Reference:

Examples:

Calling the listFindingsV2 operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  filter: {
    '<String>': {
      contains: [
        'STRING_VALUE',
        /* more items */
      ],
      eq: [
        'STRING_VALUE',
        /* more items */
      ],
      exists: true || false,
      neq: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* '<String>': ... */
  },
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  sort: {
    attributeName: 'STRING_VALUE',
    orderBy: ASC | DESC
  }
};
accessanalyzer.listFindingsV2(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

      The ARN of the analyzer to retrieve findings from.

    • filter — (map<map>)

      A filter to match for the findings to return.

      • eq — (Array<String>)

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

      • neq — (Array<String>)

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

      • contains — (Array<String>)

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

      • exists — (Boolean)

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

    • maxResults — (Integer)

      The maximum number of results to return in the response.

    • nextToken — (String)

      A token used for pagination of results returned.

    • sort — (map)

      The criteria used to sort.

      • attributeName — (String)

        The name of the attribute to sort on.

      • orderBy — (String)

        The sort order, ascending or descending.

        Possible values include:
        • "ASC"
        • "DESC"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • findings — (Array<map>)

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

        • analyzedAtrequired — (Date)

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

        • createdAtrequired — (Date)

          The time at which the finding was created.

        • error — (String)

          The error that resulted in an Error finding.

        • idrequired — (String)

          The ID of the finding.

        • resource — (String)

          The resource that the external principal has access to.

        • resourceTyperequired — (String)

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

          Possible values include:
          • "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"
          • "AWS::DynamoDB::Table"
          • "AWS::DynamoDB::Stream"
        • resourceOwnerAccountrequired — (String)

          The Amazon Web Services account ID that owns the resource.

        • statusrequired — (String)

          The status of the finding.

          Possible values include:
          • "ACTIVE"
          • "ARCHIVED"
          • "RESOLVED"
        • updatedAtrequired — (Date)

          The time at which the finding was most recently updated.

        • findingType — (String)

          The type of the external access or unused access finding.

          Possible values include:
          • "ExternalAccess"
          • "UnusedIAMRole"
          • "UnusedIAMUserAccessKey"
          • "UnusedIAMUserPassword"
          • "UnusedPermission"
      • nextToken — (String)

        A token used for pagination of results returned.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPolicyGenerations(params = {}, callback) ⇒ AWS.Request

Lists all of the policy generations requested in the last seven days.

Service Reference:

Examples:

Calling the listPolicyGenerations operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  principalArn: 'STRING_VALUE'
};
accessanalyzer.listPolicyGenerations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • principalArn — (String)

      The ARN of the IAM entity (user or role) for which you are generating a policy. Use this with ListGeneratedPolicies to filter the results to only include results for a specific principal.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

    • nextToken — (String)

      A token used for pagination of results returned.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policyGenerations — (Array<map>)

        A PolicyGeneration object that contains details about the generated policy.

        • jobIdrequired — (String)

          The JobId that is returned by the StartPolicyGeneration operation. The JobId can be used with GetGeneratedPolicy to retrieve the generated policies or used with CancelPolicyGeneration to cancel the policy generation request.

        • principalArnrequired — (String)

          The ARN of the IAM entity (user or role) for which you are generating a policy.

        • statusrequired — (String)

          The status of the policy generation request.

          Possible values include:
          • "IN_PROGRESS"
          • "SUCCEEDED"
          • "FAILED"
          • "CANCELED"
        • startedOnrequired — (Date)

          A timestamp of when the policy generation started.

        • completedOn — (Date)

          A timestamp of when the policy generation was completed.

      • nextToken — (String)

        A token used for pagination of results returned.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Retrieves a list of tags applied to the specified resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE' /* required */
};
accessanalyzer.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the resource to retrieve tags from.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tags — (map<String>)

        The tags that are applied to the specified resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startPolicyGeneration(params = {}, callback) ⇒ AWS.Request

Starts the policy generation request.

Service Reference:

Examples:

Calling the startPolicyGeneration operation

var params = {
  policyGenerationDetails: { /* required */
    principalArn: 'STRING_VALUE' /* required */
  },
  clientToken: 'STRING_VALUE',
  cloudTrailDetails: {
    accessRole: 'STRING_VALUE', /* required */
    startTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
    trails: [ /* required */
      {
        cloudTrailArn: 'STRING_VALUE', /* required */
        allRegions: true || false,
        regions: [
          'STRING_VALUE',
          /* more items */
        ]
      },
      /* more items */
    ],
    endTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
  }
};
accessanalyzer.startPolicyGeneration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyGenerationDetails — (map)

      Contains the ARN of the IAM entity (user or role) for which you are generating a policy.

      • principalArnrequired — (String)

        The ARN of the IAM entity (user or role) for which you are generating a policy.

    • cloudTrailDetails — (map)

      A CloudTrailDetails object that contains details about a Trail that you want to analyze to generate policies.

      • trailsrequired — (Array<map>)

        A Trail object that contains settings for a trail.

        • cloudTrailArnrequired — (String)

          Specifies the ARN of the trail. The format of a trail ARN is arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail.

        • regions — (Array<String>)

          A list of regions to get CloudTrail data from and analyze to generate a policy.

        • allRegions — (Boolean)

          Possible values are true or false. If set to true, IAM Access Analyzer retrieves CloudTrail data from all regions to analyze and generate a policy.

      • accessRolerequired — (String)

        The ARN of the service role that IAM Access Analyzer uses to access your CloudTrail trail and service last accessed information.

      • startTimerequired — (Date)

        The start of the time range for which IAM Access Analyzer reviews your CloudTrail events. Events with a timestamp before this time are not considered to generate a policy.

      • endTime — (Date)

        The end of the time range for which IAM Access Analyzer reviews your CloudTrail events. Events with a timestamp after this time are not considered to generate a policy. If this is not included in the request, the default value is the current time.

    • clientToken — (String)

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect.

      If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobId — (String)

        The JobId that is returned by the StartPolicyGeneration operation. The JobId can be used with GetGeneratedPolicy to retrieve the generated policies or used with CancelPolicyGeneration to cancel the policy generation request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startResourceScan(params = {}, callback) ⇒ AWS.Request

Immediately starts a scan of the policies applied to the specified resource.

Service Reference:

Examples:

Calling the startResourceScan operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  resourceArn: 'STRING_VALUE', /* required */
  resourceOwnerAccount: 'STRING_VALUE'
};
accessanalyzer.startResourceScan(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

      The ARN of the analyzer to use to scan the policies applied to the specified resource.

    • resourceArn — (String)

      The ARN of the resource to scan.

    • 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Adds a tag to the specified resource.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: { /* required */
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
accessanalyzer.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the resource to add the tag to.

    • tags — (map<String>)

      The tags to add to the resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes a tag from the specified resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
accessanalyzer.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the resource to remove the tag from.

    • tagKeys — (Array<String>)

      The key for the tag to add.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateArchiveRule(params = {}, callback) ⇒ AWS.Request

Updates the criteria and values for the specified archive rule.

Service Reference:

Examples:

Calling the updateArchiveRule operation

var params = {
  analyzerName: 'STRING_VALUE', /* required */
  filter: { /* required */
    '<String>': {
      contains: [
        'STRING_VALUE',
        /* more items */
      ],
      eq: [
        'STRING_VALUE',
        /* more items */
      ],
      exists: true || false,
      neq: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* '<String>': ... */
  },
  ruleName: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
accessanalyzer.updateArchiveRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerName — (String)

      The name of the analyzer to update the archive rules for.

    • ruleName — (String)

      The name of the rule to update.

    • filter — (map<map>)

      A filter to match for the rules to update. Only rules that match the filter are updated.

      • eq — (Array<String>)

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

      • neq — (Array<String>)

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

      • contains — (Array<String>)

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

      • exists — (Boolean)

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

    • clientToken — (String)

      A client token.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateFindings(params = {}, callback) ⇒ AWS.Request

Updates the status for the specified findings.

Service Reference:

Examples:

Calling the updateFindings operation

var params = {
  analyzerArn: 'STRING_VALUE', /* required */
  status: ACTIVE | ARCHIVED, /* required */
  clientToken: 'STRING_VALUE',
  ids: [
    'STRING_VALUE',
    /* more items */
  ],
  resourceArn: 'STRING_VALUE'
};
accessanalyzer.updateFindings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analyzerArn — (String)

      The ARN of the analyzer that generated the findings to update.

    • status — (String)

      The state represents the action to take to update the finding Status. Use ARCHIVE to change an Active finding to an Archived finding. Use ACTIVE to change an Archived finding to an Active finding.

      Possible values include:
      • "ACTIVE"
      • "ARCHIVED"
    • ids — (Array<String>)

      The IDs of the findings to update.

    • resourceArn — (String)

      The ARN of the resource identified in the finding.

    • clientToken — (String)

      A client token.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

validatePolicy(params = {}, callback) ⇒ AWS.Request

Requests the validation of a policy and returns a list of findings. The findings help you identify issues and provide actionable recommendations to resolve the issue and enable you to author functional policies that meet security best practices.

Service Reference:

Examples:

Calling the validatePolicy operation

var params = {
  policyDocument: 'STRING_VALUE', /* required */
  policyType: IDENTITY_POLICY | RESOURCE_POLICY | SERVICE_CONTROL_POLICY, /* required */
  locale: DE | EN | ES | FR | IT | JA | KO | PT_BR | ZH_CN | ZH_TW,
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  validatePolicyResourceType: AWS::S3::Bucket | AWS::S3::AccessPoint | AWS::S3::MultiRegionAccessPoint | AWS::S3ObjectLambda::AccessPoint | AWS::IAM::AssumeRolePolicyDocument | AWS::DynamoDB::Table
};
accessanalyzer.validatePolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • locale — (String)

      The locale to use for localizing the findings.

      Possible values include:
      • "DE"
      • "EN"
      • "ES"
      • "FR"
      • "IT"
      • "JA"
      • "KO"
      • "PT_BR"
      • "ZH_CN"
      • "ZH_TW"
    • maxResults — (Integer)

      The maximum number of results to return in the response.

    • nextToken — (String)

      A token used for pagination of results returned.

    • policyDocument — (String)

      The JSON policy document to use as the content for the policy.

    • policyType — (String)

      The type of policy to validate. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups.

      Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy.

      Service control policies (SCPs) are a type of organization policy attached to an Amazon Web Services organization, organizational unit (OU), or an account.

      Possible values include:
      • "IDENTITY_POLICY"
      • "RESOURCE_POLICY"
      • "SERVICE_CONTROL_POLICY"
    • validatePolicyResourceType — (String)

      The type of resource to attach to your resource policy. Specify a value for the policy validation resource type only if the policy type is RESOURCE_POLICY. For example, to validate a resource policy to attach to an Amazon S3 bucket, you can choose AWS::S3::Bucket for the policy validation resource type.

      For resource types not supported as valid values, IAM Access Analyzer runs policy checks that apply to all resource policies. For example, to validate a resource policy to attach to a KMS key, do not specify a value for the policy validation resource type and IAM Access Analyzer will run policy checks that apply to all resource policies.

      Possible values include:
      • "AWS::S3::Bucket"
      • "AWS::S3::AccessPoint"
      • "AWS::S3::MultiRegionAccessPoint"
      • "AWS::S3ObjectLambda::AccessPoint"
      • "AWS::IAM::AssumeRolePolicyDocument"
      • "AWS::DynamoDB::Table"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • findings — (Array<map>)

        The list of findings in a policy returned by IAM Access Analyzer based on its suite of policy checks.

        • findingDetailsrequired — (String)

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

        • findingTyperequired — (String)

          The impact of the finding.

          Security warnings report when the policy allows access that we consider overly permissive.

          Errors report when a part of the policy is not functional.

          Warnings report non-security issues when a policy does not conform to policy writing best practices.

          Suggestions recommend stylistic improvements in the policy that do not impact access.

          Possible values include:
          • "ERROR"
          • "SECURITY_WARNING"
          • "SUGGESTION"
          • "WARNING"
        • issueCoderequired — (String)

          The issue code provides an identifier of the issue associated with this finding.

        • learnMoreLinkrequired — (String)

          A link to additional documentation about the type of finding.

        • locationsrequired — (Array<map>)

          The list of locations in the policy document that are related to the finding. The issue code provides a summary of an issue identified by the finding.

          • pathrequired — (Array<map>)

            A path in a policy, represented as a sequence of path elements.

            • index — (Integer)

              Refers to an index in a JSON array.

            • key — (String)

              Refers to a key in a JSON object.

            • substring — (map)

              Refers to a substring of a literal string in a JSON object.

              • startrequired — (Integer)

                The start index of the substring, starting from 0.

              • lengthrequired — (Integer)

                The length of the substring.

            • value — (String)

              Refers to the value associated with a given key in a JSON object.

          • spanrequired — (map)

            A span in a policy.

            • startrequired — (map)

              The start position of the span (inclusive).

              • linerequired — (Integer)

                The line of the position, starting from 1.

              • columnrequired — (Integer)

                The column of the position, starting from 0.

              • offsetrequired — (Integer)

                The offset within the policy that corresponds to the position, starting from 0.

            • endrequired — (map)

              The end position of the span (exclusive).

              • linerequired — (Integer)

                The line of the position, starting from 1.

              • columnrequired — (Integer)

                The column of the position, starting from 0.

              • offsetrequired — (Integer)

                The offset within the policy that corresponds to the position, starting from 0.

      • nextToken — (String)

        A token used for pagination of results returned.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.