get_exclusions_preview

get_exclusions_preview(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_exclusions_preview(
    assessmentTemplateArn='string',
    previewToken='string',
    nextToken='string',
    maxResults=123,
    locale='EN_US'
)
Parameters
  • assessmentTemplateArn (string) --

    [REQUIRED]

    The ARN that specifies the assessment template for which the exclusions preview was requested.

  • previewToken (string) --

    [REQUIRED]

    The unique identifier associated of the exclusions preview.

  • nextToken (string) -- You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the GetExclusionsPreviewRequest action. Subsequent calls to the action fill nextToken in the request with the value of nextToken from the previous response to continue listing data.
  • maxResults (integer) -- You can use this parameter to indicate the maximum number of items you want in the response. The default value is 100. The maximum value is 500.
  • locale (string) -- The locale into which you want to translate the exclusion's title, description, and recommendation.
Return type

dict

Returns

Response Syntax

{
    'previewStatus': 'WORK_IN_PROGRESS'|'COMPLETED',
    'exclusionPreviews': [
        {
            'title': 'string',
            'description': 'string',
            'recommendation': 'string',
            'scopes': [
                {
                    'key': 'INSTANCE_ID'|'RULES_PACKAGE_ARN',
                    'value': 'string'
                },
            ],
            'attributes': [
                {
                    'key': 'string',
                    'value': 'string'
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • previewStatus (string) --

      Specifies the status of the request to generate an exclusions preview.

    • exclusionPreviews (list) --

      Information about the exclusions included in the preview.

      • (dict) --

        Contains information about what is excluded from an assessment run given the current state of the assessment template.

        • title (string) --

          The name of the exclusion preview.

        • description (string) --

          The description of the exclusion preview.

        • recommendation (string) --

          The recommendation for the exclusion preview.

        • scopes (list) --

          The AWS resources for which the exclusion preview pertains.

          • (dict) --

            This data type contains key-value pairs that identify various Amazon resources.

            • key (string) --

              The type of the scope.

            • value (string) --

              The resource identifier for the specified scope type.

        • attributes (list) --

          The system-defined attributes for the exclusion preview.

          • (dict) --

            This data type is used as a request parameter in the AddAttributesToFindings and CreateAssessmentTemplate actions.

            • key (string) --

              The attribute key.

            • value (string) --

              The value assigned to the attribute key.

    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameters is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.

Exceptions

  • Inspector.Client.exceptions.InvalidInputException
  • Inspector.Client.exceptions.InternalException
  • Inspector.Client.exceptions.AccessDeniedException
  • Inspector.Client.exceptions.NoSuchEntityException