Class: AWS.AccessAnalyzer
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.AccessAnalyzer
- 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
-
new AWS.AccessAnalyzer(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
applyArchiveRule(params = {}, callback) ⇒ AWS.Request
Retroactively applies the archive rule to existing findings that meet the archive rule criteria.
.
-
cancelPolicyGeneration(params = {}, callback) ⇒ AWS.Request
Cancels the requested policy generation.
.
-
checkAccessNotGranted(params = {}, callback) ⇒ AWS.Request
Checks whether the specified access isn't allowed by a policy.
.
-
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.
-
checkNoPublicAccess(params = {}, callback) ⇒ AWS.Request
Checks whether a resource policy can grant public access to the specified resource type.
.
-
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.
.
-
createAnalyzer(params = {}, callback) ⇒ AWS.Request
Creates an analyzer for your account.
.
-
createArchiveRule(params = {}, callback) ⇒ AWS.Request
Creates an archive rule for the specified analyzer.
-
deleteAnalyzer(params = {}, callback) ⇒ AWS.Request
Deletes the specified analyzer.
-
deleteArchiveRule(params = {}, callback) ⇒ AWS.Request
Deletes the specified archive rule.
.
-
generateFindingRecommendation(params = {}, callback) ⇒ AWS.Request
Creates a recommendation for an unused permissions finding.
.
-
getAccessPreview(params = {}, callback) ⇒ AWS.Request
Retrieves information about an access preview for the specified analyzer.
.
-
getAnalyzedResource(params = {}, callback) ⇒ AWS.Request
Retrieves information about a resource that was analyzed.
.
-
getAnalyzer(params = {}, callback) ⇒ AWS.Request
Retrieves information about the specified analyzer.
.
-
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.
. -
getFinding(params = {}, callback) ⇒ AWS.Request
Retrieves information about the specified finding.
-
getFindingRecommendation(params = {}, callback) ⇒ AWS.Request
Retrieves information about a finding recommendation for the specified analyzer.
.
-
getFindingV2(params = {}, callback) ⇒ AWS.Request
Retrieves information about the specified finding.
-
getGeneratedPolicy(params = {}, callback) ⇒ AWS.Request
Retrieves the policy that was generated using
StartPolicyGeneration
. -
listAccessPreviewFindings(params = {}, callback) ⇒ AWS.Request
Retrieves a list of access preview findings generated by the specified access preview.
.
-
listAccessPreviews(params = {}, callback) ⇒ AWS.Request
Retrieves a list of access previews for the specified analyzer.
.
-
listAnalyzedResources(params = {}, callback) ⇒ AWS.Request
Retrieves a list of resources of the specified type that have been analyzed by the specified external access analyzer.
-
listAnalyzers(params = {}, callback) ⇒ AWS.Request
Retrieves a list of analyzers.
.
-
listArchiveRules(params = {}, callback) ⇒ AWS.Request
Retrieves a list of archive rules created for the specified analyzer.
.
-
listFindings(params = {}, callback) ⇒ AWS.Request
Retrieves a list of findings generated by the specified analyzer.
-
listFindingsV2(params = {}, callback) ⇒ AWS.Request
Retrieves a list of findings generated by the specified analyzer.
-
listPolicyGenerations(params = {}, callback) ⇒ AWS.Request
Lists all of the policy generations requested in the last seven days.
.
-
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Retrieves a list of tags applied to the specified resource.
.
-
startPolicyGeneration(params = {}, callback) ⇒ AWS.Request
Starts the policy generation request.
.
-
startResourceScan(params = {}, callback) ⇒ AWS.Request
Immediately starts a scan of the policies applied to the specified resource.
.
-
tagResource(params = {}, callback) ⇒ AWS.Request
Adds a tag to the specified resource.
.
-
untagResource(params = {}, callback) ⇒ AWS.Request
Removes a tag from the specified resource.
.
-
updateArchiveRule(params = {}, callback) ⇒ AWS.Request
Updates the criteria and values for the specified archive rule.
.
-
updateFindings(params = {}, callback) ⇒ AWS.Request
Updates the status for the specified findings.
.
-
validatePolicy(params = {}, callback) ⇒ AWS.Request
Requests the validation of a policy and returns a list of findings.
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.
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
-
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 totrue
. -
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
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.
-
(AWS.Response)
—
Returns:
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 theStartPolicyGeneration
operation. TheJobId
can be used withGetGeneratedPolicy
to retrieve the generated policies or used withCancelPolicyGeneration
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.
-
(AWS.Response)
—
Returns:
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: [
'STRING_VALUE',
/* more items */
],
resources: [
'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. If only actions are specified, IAM Access Analyzer checks for access of the actions on all resources in the policy. If only resources are specified, then IAM Access Analyzer checks which actions have access to the specified resources. If both actions and resources are specified, then IAM Access Analyzer checks which of the specified actions have access to the specified resources.
actions
— (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.
resources
— (Array<String>
)A list of resources for the access permissions. Any strings that can be used as a resource in an IAM policy can be used in the list of resources 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. Thedata
object has the following properties:result
— (String
)The result of the check for whether the access is allowed. If the result is
Possible values include:PASS
, the specified policy doesn't allow any of the specified permissions in the access object. If the result isFAIL
, the specified policy might allow some or all of the permissions in the access object."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.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:result
— (String
)The result of the check for new access. If the result is
Possible values include:PASS
, no new access is allowed by the updated policy. If the result isFAIL
, the updated policy might allow new access."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.
-
(AWS.Response)
—
Returns:
checkNoPublicAccess(params = {}, callback) ⇒ AWS.Request
Checks whether a resource policy can grant public access to the specified resource type.
Service Reference:
Examples:
Calling the checkNoPublicAccess operation
var params = {
policyDocument: 'STRING_VALUE', /* required */
resourceType: AWS::DynamoDB::Table | AWS::DynamoDB::Stream | AWS::EFS::FileSystem | AWS::OpenSearchService::Domain | AWS::Kinesis::Stream | AWS::Kinesis::StreamConsumer | AWS::KMS::Key | AWS::Lambda::Function | AWS::S3::Bucket | AWS::S3::AccessPoint | AWS::S3Express::DirectoryBucket | AWS::S3::Glacier | AWS::S3Outposts::Bucket | AWS::S3Outposts::AccessPoint | AWS::SecretsManager::Secret | AWS::SNS::Topic | AWS::SQS::Queue | AWS::IAM::AssumeRolePolicyDocument /* required */
};
accessanalyzer.checkNoPublicAccess(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 evaluate for public access.
resourceType
— (String
)The type of resource to evaluate for public access. For example, to check for public access to Amazon S3 buckets, you can choose
AWS::S3::Bucket
for the resource type.For resource types not supported as valid values, IAM Access Analyzer will return an error.
Possible values include:"AWS::DynamoDB::Table"
"AWS::DynamoDB::Stream"
"AWS::EFS::FileSystem"
"AWS::OpenSearchService::Domain"
"AWS::Kinesis::Stream"
"AWS::Kinesis::StreamConsumer"
"AWS::KMS::Key"
"AWS::Lambda::Function"
"AWS::S3::Bucket"
"AWS::S3::AccessPoint"
"AWS::S3Express::DirectoryBucket"
"AWS::S3::Glacier"
"AWS::S3Outposts::Bucket"
"AWS::S3Outposts::AccessPoint"
"AWS::SecretsManager::Secret"
"AWS::SNS::Topic"
"AWS::SQS::Queue"
"AWS::IAM::AssumeRolePolicyDocument"
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. Thedata
object has the following properties:result
— (String
)The result of the check for public access to the specified resource type. If the result is
Possible values include:PASS
, the policy doesn't allow public access to the specified resource type. If the result isFAIL
, the policy might allow public access to the specified resource type."PASS"
"FAIL"
message
— (String
)The message indicating whether the specified policy allows public access to resources.
reasons
— (Array<map>
)A list of reasons why the specified resource policy grants public access for the resource type.
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.
-
(AWS.Response)
—
Returns:
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 andActive
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 shareduserIds
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 anyuserIds
. -
To propose deletion of existing shared
accountIds
, you can specify an empty list foruserIds
.
-
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 sharedgroups
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 anygroups
. -
To propose deletion of existing shared
groups
, you can specify an empty list forgroups
.
-
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 existingkmsKeyId
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.
operations
— required — (Array<String>
)A list of operations that the grant permits.
granteePrincipal
— required — (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.
issuingAccount
— required — (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 isrestore
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
inRdsDbClusterSnapshotAttributeValue
, then the access preview uses the existing sharedaccountIds
for the snapshot. -
If the access preview is for a new resource and you do not specify the specify the
accountIds
inRdsDbClusterSnapshotAttributeValue
, then the access preview considers the snapshot without any attributes. -
To propose deletion of existing shared
accountIds
, you can specify an empty list foraccountIds
in theRdsDbClusterSnapshotAttributeValue
.
-
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 existingkmsKeyId
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
inRdsDbSnapshotAttributeValue
, then the access preview uses the existing sharedaccountIds
for the snapshot. -
If the access preview is for a new resource and you do not specify the specify the
accountIds
inRdsDbSnapshotAttributeValue
, then the access preview considers the snapshot without any attributes. -
To propose deletion of an existing shared
accountIds
, you can specify an empty list foraccountIds
in theRdsDbSnapshotAttributeValue
.
-
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 existingkmsKeyId
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.
permission
— required — (String
)The permissions being granted.
Possible values include:"READ"
"WRITE"
"READ_ACP"
"WRITE_ACP"
"FULL_CONTROL"
grantee
— required — (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.
ignorePublicAcls
— required — (Boolean
)Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.
restrictPublicBuckets
— required — (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.ignorePublicAcls
— required — (Boolean
)Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.
restrictPublicBuckets
— required — (Boolean
)Specifies whether Amazon S3 should restrict public bucket policies for this bucket.
networkOrigin
— (map
)The proposed
Internet
andVpcConfiguration
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 usesInternet
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.
vpcId
— required — (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
topicPolicy
— (String
)The JSON policy text that defines who can access an Amazon SNS topic. For more information, see Example cases for Amazon SNS access control in the Amazon SNS Developer Guide.
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. Thedata
object has the following properties:id
— (String
)The unique ID for the access preview.
-
(AWS.Response)
—
Returns:
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
Possible values include:ACCOUNT
,ORGANIZATION
,ACCOUNT_UNUSED_ACCESS
, andORGANIZATION_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."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.
ruleName
— required — (String
)The name of the rule.
filter
— required — (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. Thedata
object has the following properties:arn
— (String
)The ARN of the analyzer that was created by the request.
-
(AWS.Response)
—
Returns:
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.
-
(AWS.Response)
—
Returns:
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.
-
(AWS.Response)
—
Returns:
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.
-
(AWS.Response)
—
Returns:
generateFindingRecommendation(params = {}, callback) ⇒ AWS.Request
Creates a recommendation for an unused permissions finding.
Service Reference:
Examples:
Calling the generateFindingRecommendation operation
var params = {
analyzerArn: 'STRING_VALUE', /* required */
id: 'STRING_VALUE' /* required */
};
accessanalyzer.generateFindingRecommendation(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 finding recommendation.
id
— (String
)The unique ID for the finding recommendation.
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.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:accessPreview
— (map
)An object that contains information about the access preview.
id
— required — (String
)The unique ID for the access preview.
analyzerArn
— required — (String
)The ARN of the analyzer used to generate the access preview.
configurations
— required — (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 shareduserIds
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 anyuserIds
. -
To propose deletion of existing shared
accountIds
, you can specify an empty list foruserIds
.
-
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 sharedgroups
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 anygroups
. -
To propose deletion of existing shared
groups
, you can specify an empty list forgroups
.
-
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 existingkmsKeyId
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.
operations
— required — (Array<String>
)A list of operations that the grant permits.
granteePrincipal
— required — (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.
issuingAccount
— required — (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 isrestore
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
inRdsDbClusterSnapshotAttributeValue
, then the access preview uses the existing sharedaccountIds
for the snapshot. -
If the access preview is for a new resource and you do not specify the specify the
accountIds
inRdsDbClusterSnapshotAttributeValue
, then the access preview considers the snapshot without any attributes. -
To propose deletion of existing shared
accountIds
, you can specify an empty list foraccountIds
in theRdsDbClusterSnapshotAttributeValue
.
-
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 existingkmsKeyId
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
inRdsDbSnapshotAttributeValue
, then the access preview uses the existing sharedaccountIds
for the snapshot. -
If the access preview is for a new resource and you do not specify the specify the
accountIds
inRdsDbSnapshotAttributeValue
, then the access preview considers the snapshot without any attributes. -
To propose deletion of an existing shared
accountIds
, you can specify an empty list foraccountIds
in theRdsDbSnapshotAttributeValue
.
-
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 existingkmsKeyId
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.
permission
— required — (String
)The permissions being granted.
Possible values include:"READ"
"WRITE"
"READ_ACP"
"WRITE_ACP"
"FULL_CONTROL"
grantee
— required — (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.
ignorePublicAcls
— required — (Boolean
)Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.
restrictPublicBuckets
— required — (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.ignorePublicAcls
— required — (Boolean
)Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.
restrictPublicBuckets
— required — (Boolean
)Specifies whether Amazon S3 should restrict public bucket policies for this bucket.
networkOrigin
— (map
)The proposed
Internet
andVpcConfiguration
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 usesInternet
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.
vpcId
— required — (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
topicPolicy
— (String
)The JSON policy text that defines who can access an Amazon SNS topic. For more information, see Example cases for Amazon SNS access control in the Amazon SNS Developer Guide.
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.
createdAt
— required — (Date
)The time at which the access preview was created.
status
— required — (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.
"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.code
— required — (String
)The reason code for the current status of the access preview.
Possible values include:"INTERNAL_ERROR"
"INVALID_CONFIGURATION"
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:resource
— (map
)An
AnalyzedResource
object that contains information that IAM Access Analyzer found when it analyzed the resource.resourceArn
— required — (String
)The ARN of the resource that was analyzed.
resourceType
— required — (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"
createdAt
— required — (Date
)The time at which the finding was created.
analyzedAt
— required — (Date
)The time at which the resource was analyzed.
updatedAt
— required — (Date
)The time at which the finding was updated.
isPublic
— required — (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"
resourceOwnerAccount
— required — (String
)The Amazon Web Services account ID that owns the resource.
error
— (String
)An error message.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:analyzer
— (map
)An
AnalyzerSummary
object that contains information about the analyzer.arn
— required — (String
)The ARN of the analyzer.
name
— required — (String
)The name of the analyzer.
type
— required — (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"
createdAt
— required — (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.
status
— required — (String
)The status of the analyzer. An
Possible values include:Active
analyzer successfully monitors supported resources and generates new findings. The analyzer isDisabled
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 isCreating
when the analyzer creation is in progress andFailed
when the analyzer creation has failed."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, aFailed
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.code
— required — (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.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:archiveRule
— (map
)Contains information about an archive rule.
ruleName
— required — (String
)The name of the archive rule.
filter
— required — (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.
createdAt
— required — (Date
)The time at which the archive rule was created.
updatedAt
— required — (Date
)The time at which the archive rule was last updated.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:finding
— (map
)A
finding
object that contains finding details.id
— required — (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.
resourceType
— required — (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"
condition
— required — (map<String>
)The condition in the analyzed policy statement that resulted in a finding.
createdAt
— required — (Date
)The time at which the finding was generated.
analyzedAt
— required — (Date
)The time at which the resource was analyzed.
updatedAt
— required — (Date
)The time at which the finding was updated.
status
— required — (String
)The current status of the finding.
Possible values include:"ACTIVE"
"ARCHIVED"
"RESOLVED"
resourceOwnerAccount
— required — (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.
type
— required — (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.
-
(AWS.Response)
—
Returns:
getFindingRecommendation(params = {}, callback) ⇒ AWS.Request
Retrieves information about a finding recommendation for the specified analyzer.
Service Reference:
Examples:
Calling the getFindingRecommendation operation
var params = {
analyzerArn: 'STRING_VALUE', /* required */
id: 'STRING_VALUE', /* required */
maxResults: 'NUMBER_VALUE',
nextToken: 'STRING_VALUE'
};
accessanalyzer.getFindingRecommendation(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 finding recommendation.
id
— (String
)The unique ID for the finding recommendation.
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. Thedata
object has the following properties:startedAt
— (Date
)The time at which the retrieval of the finding recommendation was started.
completedAt
— (Date
)The time at which the retrieval of the finding recommendation was completed.
nextToken
— (String
)A token used for pagination of results returned.
error
— (map
)Detailed information about the reason that the retrieval of a recommendation for the finding failed.
code
— required — (String
)The error code for a failed retrieval of a recommendation for a finding.
message
— required — (String
)The error message for a failed retrieval of a recommendation for a finding.
resourceArn
— (String
)The ARN of the resource of the finding.
recommendedSteps
— (Array<map>
)A group of recommended steps for the finding.
unusedPermissionsRecommendedStep
— (map
)A recommended step for an unused permissions finding.
policyUpdatedAt
— (Date
)The time at which the existing policy for the unused permissions finding was last updated.
recommendedAction
— required — (String
)A recommendation of whether to create or detach a policy for an unused permissions finding.
Possible values include:"CREATE_POLICY"
"DETACH_POLICY"
recommendedPolicy
— (String
)If the recommended action for the unused permissions finding is to replace the existing policy, the contents of the recommended policy to replace the policy specified in the
existingPolicyId
field.existingPolicyId
— (String
)If the recommended action for the unused permissions finding is to detach a policy, the ID of an existing policy to be detached.
recommendationType
— (String
)The type of recommendation for the finding.
Possible values include:"UnusedPermissionRecommendation"
status
— (String
)The status of the retrieval of the finding recommendation.
Possible values include:"SUCCEEDED"
"FAILED"
"IN_PROGRESS"
-
(AWS.Response)
—
Returns:
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. Thedata
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.
condition
— required — (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.
type
— required — (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.
action
— required — (String
)The action for which the unused access finding was generated.
lastAccessed
— (Date
)The time at which the action was last accessed.
serviceNamespace
— required — (String
)The namespace of the Amazon Web Services service that contains the unused actions.
lastAccessed
— (Date
)The time at which the permission was last accessed.
unusedIamUserAccessKeyDetails
— (map
)The details for an unused access analyzer finding with an unused IAM user access key finding type.
accessKeyId
— required — (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
Possible values include:ExternalAccess
. For unused access analyzers, the type can beUnusedIAMRole
,UnusedIAMUserAccessKey
,UnusedIAMUserPassword
, orUnusedPermission
."ExternalAccess"
"UnusedIAMRole"
"UnusedIAMUserAccessKey"
"UnusedIAMUserPassword"
"UnusedPermission"
-
(AWS.Response)
—
Returns:
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 theStartPolicyGeneration
operation. TheJobId
can be used withGetGeneratedPolicy
to retrieve the generated policies or used withCancelPolicyGeneration
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. Thedata
object has the following properties:jobDetails
— (map
)A
GeneratedPolicyDetails
object that contains details about the generated policy.jobId
— required — (String
)The
JobId
that is returned by theStartPolicyGeneration
operation. TheJobId
can be used withGetGeneratedPolicy
to retrieve the generated policies or used withCancelPolicyGeneration
to cancel the policy generation request.status
— required — (String
)The status of the job request.
Possible values include:"IN_PROGRESS"
"SUCCEEDED"
"FAILED"
"CANCELED"
startedOn
— required — (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.
code
— required — (String
)The job error code.
Possible values include:"AUTHORIZATION_ERROR"
"RESOURCE_NOT_FOUND_ERROR"
"SERVICE_QUOTA_EXCEEDED_ERROR"
"SERVICE_ERROR"
message
— required — (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.properties
— required — (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, andfalse
otherwise.principalArn
— required — (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.trailProperties
— required — (Array<map>
)A
TrailProperties
object that contains settings for trail properties.cloudTrailArn
— required — (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
orfalse
. If set totrue
, IAM Access Analyzer retrieves CloudTrail data from all regions to analyze and generate a policy.
startTime
— required — (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
— required — (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.
policy
— required — (String
)The text to use as the content for the new policy. The policy is created using the CreatePolicy action.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:findings
— (Array<map>
)A list of access preview findings that match the specified filter criteria.
id
— required — (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.
resourceType
— required — (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"
createdAt
— required — (Date
)The time at which the access preview finding was created.
changeType
— required — (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
Possible values include:Changed
finding with preview statusResolved
and existing statusActive
indicates the existingActive
finding would becomeResolved
as a result of the proposed permissions change."CHANGED"
"NEW"
"UNCHANGED"
-
status
— required — (String
)The preview status of the finding. This is what the status of the finding would be after permissions deployment. For example, a
Possible values include:Changed
finding with preview statusResolved
and existing statusActive
indicates the existingActive
finding would becomeResolved
as a result of the proposed permissions change."ACTIVE"
"ARCHIVED"
"RESOLVED"
resourceOwnerAccount
— required — (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.
type
— required — (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.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:accessPreviews
— (Array<map>
)A list of access previews retrieved for the analyzer.
id
— required — (String
)The unique ID for the access preview.
analyzerArn
— required — (String
)The ARN of the analyzer used to generate the access preview.
createdAt
— required — (Date
)The time at which the access preview was created.
status
— required — (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.
"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.code
— required — (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.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:analyzedResources
— (Array<map>
)A list of resources that were analyzed.
resourceArn
— required — (String
)The ARN of the analyzed resource.
resourceOwnerAccount
— required — (String
)The Amazon Web Services account ID that owns the resource.
resourceType
— required — (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.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:analyzers
— (Array<map>
)The analyzers retrieved.
arn
— required — (String
)The ARN of the analyzer.
name
— required — (String
)The name of the analyzer.
type
— required — (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"
createdAt
— required — (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.
status
— required — (String
)The status of the analyzer. An
Possible values include:Active
analyzer successfully monitors supported resources and generates new findings. The analyzer isDisabled
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 isCreating
when the analyzer creation is in progress andFailed
when the analyzer creation has failed."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, aFailed
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.code
— required — (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.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:archiveRules
— (Array<map>
)A list of archive rules created for the specified analyzer.
ruleName
— required — (String
)The name of the archive rule.
filter
— required — (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.
createdAt
— required — (Date
)The time at which the archive rule was created.
updatedAt
— required — (Date
)The time at which the archive rule was last updated.
nextToken
— (String
)A token used for pagination of results returned.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:findings
— (Array<map>
)A list of findings retrieved from the analyzer that match the filter criteria specified, if any.
id
— required — (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.
resourceType
— required — (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"
condition
— required — (map<String>
)The condition in the analyzed policy statement that resulted in a finding.
createdAt
— required — (Date
)The time at which the finding was created.
analyzedAt
— required — (Date
)The time at which the resource-based policy that generated the finding was analyzed.
updatedAt
— required — (Date
)The time at which the finding was most recently updated.
status
— required — (String
)The status of the finding.
Possible values include:"ACTIVE"
"ARCHIVED"
"RESOLVED"
resourceOwnerAccount
— required — (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.
type
— required — (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.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:findings
— (Array<map>
)A list of findings retrieved from the analyzer that match the filter criteria specified, if any.
analyzedAt
— required — (Date
)The time at which the resource-based policy or IAM entity that generated the finding was analyzed.
createdAt
— required — (Date
)The time at which the finding was created.
error
— (String
)The error that resulted in an Error finding.
id
— required — (String
)The ID of the finding.
resource
— (String
)The resource that the external principal has access to.
resourceType
— required — (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"
resourceOwnerAccount
— required — (String
)The Amazon Web Services account ID that owns the resource.
status
— required — (String
)The status of the finding.
Possible values include:"ACTIVE"
"ARCHIVED"
"RESOLVED"
updatedAt
— required — (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.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:policyGenerations
— (Array<map>
)A
PolicyGeneration
object that contains details about the generated policy.jobId
— required — (String
)The
JobId
that is returned by theStartPolicyGeneration
operation. TheJobId
can be used withGetGeneratedPolicy
to retrieve the generated policies or used withCancelPolicyGeneration
to cancel the policy generation request.principalArn
— required — (String
)The ARN of the IAM entity (user or role) for which you are generating a policy.
status
— required — (String
)The status of the policy generation request.
Possible values include:"IN_PROGRESS"
"SUCCEEDED"
"FAILED"
"CANCELED"
startedOn
— required — (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.
-
(AWS.Response)
—
Returns:
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. Thedata
object has the following properties:tags
— (map<String>
)The tags that are applied to the specified resource.
-
(AWS.Response)
—
Returns:
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.
principalArn
— required — (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 aTrail
that you want to analyze to generate policies.trails
— required — (Array<map>
)A
Trail
object that contains settings for a trail.cloudTrailArn
— required — (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
orfalse
. If set totrue
, IAM Access Analyzer retrieves CloudTrail data from all regions to analyze and generate a policy.
accessRole
— required — (String
)The ARN of the service role that IAM Access Analyzer uses to access your CloudTrail trail and service last accessed information.
startTime
— required — (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. Thedata
object has the following properties:jobId
— (String
)The
JobId
that is returned by theStartPolicyGeneration
operation. TheJobId
can be used withGetGeneratedPolicy
to retrieve the generated policies or used withCancelPolicyGeneration
to cancel the policy generation request.
-
(AWS.Response)
—
Returns:
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.
-
(AWS.Response)
—
Returns:
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.
-
(AWS.Response)
—
Returns:
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.
-
(AWS.Response)
—
Returns:
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.
-
(AWS.Response)
—
Returns:
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
Possible values include:ARCHIVE
to change an Active finding to an Archived finding. UseACTIVE
to change an Archived finding to an Active finding."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.
-
(AWS.Response)
—
Returns:
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 chooseAWS::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. Thedata
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.
findingDetails
— required — (String
)A localized message that explains the finding and provides guidance on how to address it.
findingType
— required — (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"
issueCode
— required — (String
)The issue code provides an identifier of the issue associated with this finding.
learnMoreLink
— required — (String
)A link to additional documentation about the type of finding.
locations
— required — (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.
path
— required — (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.
start
— required — (Integer
)The start index of the substring, starting from 0.
length
— required — (Integer
)The length of the substring.
value
— (String
)Refers to the value associated with a given key in a JSON object.
span
— required — (map
)A span in a policy.
start
— required — (map
)The start position of the span (inclusive).
line
— required — (Integer
)The line of the position, starting from 1.
column
— required — (Integer
)The column of the position, starting from 0.
offset
— required — (Integer
)The offset within the policy that corresponds to the position, starting from 0.
end
— required — (map
)The end position of the span (exclusive).
line
— required — (Integer
)The line of the position, starting from 1.
column
— required — (Integer
)The column of the position, starting from 0.
offset
— required — (Integer
)The offset within the policy that corresponds to the position, starting from 0.
nextToken
— (String
)A token used for pagination of results returned.
-
(AWS.Response)
—
Returns: