InspectorClient

Amazon Inspector

Amazon Inspector enables you to analyze the behavior of your AWS resources and to identify potential security issues. For more information, see Amazon Inspector User Guide .

Installation

NPM
npm install @aws-sdk/client-inspector
Yarn
yarn add @aws-sdk/client-inspector
pnpm
pnpm add @aws-sdk/client-inspector

InspectorClient Operations

Command
Summary
AddAttributesToFindingsCommand

Assigns attributes (key and value pairs) to the findings that are specified by the ARNs of the findings.

CreateAssessmentTargetCommand

Creates a new assessment target using the ARN of the resource group that is generated by CreateResourceGroup. If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target. If the service-linked role  isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments. You can create up to 50 assessment targets per AWS account. You can run up to 500 concurrent agents per AWS account. For more information, see Amazon Inspector Assessment Targets .

CreateAssessmentTemplateCommand

Creates an assessment template for the assessment target that is specified by the ARN of the assessment target. If the service-linked role  isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments.

CreateExclusionsPreviewCommand

Starts the generation of an exclusions preview for the specified assessment template. The exclusions preview lists the potential exclusions (ExclusionPreview) that Inspector can detect before it runs the assessment.

CreateResourceGroupCommand

Creates a resource group using the specified set of tags (key and value pairs) that are used to select the EC2 instances to be included in an Amazon Inspector assessment target. The created resource group is then used to create an Amazon Inspector assessment target. For more information, see CreateAssessmentTarget.

DeleteAssessmentRunCommand

Deletes the assessment run that is specified by the ARN of the assessment run.

DeleteAssessmentTargetCommand

Deletes the assessment target that is specified by the ARN of the assessment target.

DeleteAssessmentTemplateCommand

Deletes the assessment template that is specified by the ARN of the assessment template.

DescribeAssessmentRunsCommand

Describes the assessment runs that are specified by the ARNs of the assessment runs.

DescribeAssessmentTargetsCommand

Describes the assessment targets that are specified by the ARNs of the assessment targets.

DescribeAssessmentTemplatesCommand

Describes the assessment templates that are specified by the ARNs of the assessment templates.

DescribeCrossAccountAccessRoleCommand

Describes the IAM role that enables Amazon Inspector to access your AWS account.

DescribeExclusionsCommand

Describes the exclusions that are specified by the exclusions' ARNs.

DescribeFindingsCommand

Describes the findings that are specified by the ARNs of the findings.

DescribeResourceGroupsCommand

Describes the resource groups that are specified by the ARNs of the resource groups.

DescribeRulesPackagesCommand

Describes the rules packages that are specified by the ARNs of the rules packages.

GetAssessmentReportCommand

Produces an assessment report that includes detailed and comprehensive results of a specified assessment run.

GetExclusionsPreviewCommand

Retrieves the exclusions preview (a list of ExclusionPreview objects) specified by the preview token. You can obtain the preview token by running the CreateExclusionsPreview API.

GetTelemetryMetadataCommand

Information about the data that is collected for the specified assessment run.

ListAssessmentRunAgentsCommand

Lists the agents of the assessment runs that are specified by the ARNs of the assessment runs.

ListAssessmentRunsCommand

Lists the assessment runs that correspond to the assessment templates that are specified by the ARNs of the assessment templates.

ListAssessmentTargetsCommand

Lists the ARNs of the assessment targets within this AWS account. For more information about assessment targets, see Amazon Inspector Assessment Targets .

ListAssessmentTemplatesCommand

Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets.

ListEventSubscriptionsCommand

Lists all the event subscriptions for the assessment template that is specified by the ARN of the assessment template. For more information, see SubscribeToEvent and UnsubscribeFromEvent.

ListExclusionsCommand

List exclusions that are generated by the assessment run.

ListFindingsCommand

Lists findings that are generated by the assessment runs that are specified by the ARNs of the assessment runs.

ListRulesPackagesCommand

Lists all available Amazon Inspector rules packages.

ListTagsForResourceCommand

Lists all tags associated with an assessment template.

PreviewAgentsCommand

Previews the agents installed on the EC2 instances that are part of the specified assessment target.

RegisterCrossAccountAccessRoleCommand

Registers the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.

RemoveAttributesFromFindingsCommand

Removes entire attributes (key and value pairs) from the findings that are specified by the ARNs of the findings where an attribute with the specified key exists.

SetTagsForResourceCommand

Sets tags (key and value pairs) to the assessment template that is specified by the ARN of the assessment template.

StartAssessmentRunCommand

Starts the assessment run specified by the ARN of the assessment template. For this API to function properly, you must not exceed the limit of running up to 500 concurrent agents per AWS account.

StopAssessmentRunCommand

Stops the assessment run that is specified by the ARN of the assessment run.

SubscribeToEventCommand

Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.

UnsubscribeFromEventCommand

Disables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.

UpdateAssessmentTargetCommand

Updates the assessment target that is specified by the ARN of the assessment target.

If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

InspectorClient Configuration

Parameter
Type
Description
defaultsMode
Optional
DefaultsMode | Provider<DefaultsMode>
The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.
disableHostPrefix
Optional
boolean
Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation.
extensions
Optional
RuntimeExtension[]
Optional extensions
logger
Optional
Logger
Optional logger for logging debug/info/warn/error.
maxAttempts
Optional
number | Provider<number>
Value for how many times a request will be made at most in case of retry.
profile
Optional
string
Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options.
region
Optional
string | Provider<string>
The AWS region to which this client will send requests
requestHandler
Optional
__HttpHandlerUserInput
The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
retryMode
Optional
string | Provider<string>
Specifies which retry algorithm to use.
useDualstackEndpoint
Optional
boolean | Provider<boolean>
Enables IPv6/IPv4 dualstack endpoint.
useFipsEndpoint
Optional
boolean | Provider<boolean>
Enables FIPS compatible endpoints.
Additional config fields are described in the full configuration type: InspectorClientConfig