Amazon Inspector

2015/10/06 - Amazon Inspector - 36 new api methods

DescribeRulesPackage (new) Link ¶

Describes the rules package specified by the rules package ARN.

Request Syntax

client.describe_rules_package(
    rulesPackageArn='string'
)
type rulesPackageArn

string

param rulesPackageArn

The ARN specifying the rules package that you want to describe.

rtype

dict

returns

Response Syntax

{
    'rulesPackage': {
        'rulesPackageArn': 'string',
        'rulesPackageName': 'string',
        'version': 'string',
        'provider': 'string',
        'description': {
            'key': {
                'facility': 'string',
                'id': 'string'
            },
            'parameters': [
                {
                    'name': 'string',
                    'value': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • rulesPackage (dict) --

      Information about the rules package.

      • rulesPackageArn (string) --

        The ARN of the rules package.

      • rulesPackageName (string) --

        The name of the rules package.

      • version (string) --

        The version id of the rules package.

      • provider (string) --

        The provider of the rules package.

      • description (dict) --

        The description of the rules package.

        • key (dict) --

          The facility and id properties of the LocalizedTextKey data type.

          • facility (string) --

            The module response source of the text.

          • id (string) --

            Part of the module response source of the text.

        • parameters (list) --

          Values for the dynamic elements of the string specified by the textual identifier.

          • (dict) --

            This data type is used in the LocalizedText data type.

            • name (string) --

              The name of the variable that is being replaced.

            • value (string) --

              The value assigned to the variable that is being replaced.

DescribeAssessment (new) Link ¶

Describes the assessment specified by the assessment ARN.

Request Syntax

client.describe_assessment(
    assessmentArn='string'
)
type assessmentArn

string

param assessmentArn

The ARN specifying the assessment that you want to describe.

rtype

dict

returns

Response Syntax

{
    'assessment': {
        'assessmentArn': 'string',
        'assessmentName': 'string',
        'applicationArn': 'string',
        'assessmentState': 'string',
        'failureMessage': 'string',
        'dataCollected': True|False,
        'startTime': datetime(2015, 1, 1),
        'endTime': datetime(2015, 1, 1),
        'durationInSeconds': 123,
        'userAttributesForFindings': [
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • assessment (dict) --

      Information about the assessment.

      • assessmentArn (string) --

        The ARN of the assessment.

      • assessmentName (string) --

        The name of the assessment.

      • applicationArn (string) --

        The ARN of the application that corresponds to this assessment.

      • assessmentState (string) --

        The state of the assessment. Values can be set to Created , Collecting Data , Stopping , and Completed .

      • failureMessage (string) --

        This data type property is not currently used.

      • dataCollected (boolean) --

        Boolean value (true or false) specifying whether the data collection process is completed.

      • startTime (datetime) --

        The assessment start time.

      • endTime (datetime) --

        The assessment end time.

      • durationInSeconds (integer) --

        The assessment duration in seconds. The default value is 3600 seconds (one hour). The maximum value is 86400 seconds (one day).

      • userAttributesForFindings (list) --

        The user-defined attributes that are assigned to every generated finding.

        • (dict) --

          This data type is used as a response element in the AddAttributesToFindings action and a request parameter in the CreateAssessment action.

          • key (string) --

            The attribute key.

          • value (string) --

            The value assigned to the attribute key.

ListFindings (new) Link ¶

Lists findings generated by the assessment run specified by the run ARNs.

Request Syntax

client.list_findings(
    runArns=[
        'string',
    ],
    filter={
        'rulesPackageArns': [
            'string',
        ],
        'ruleNames': [
            'string',
        ],
        'severities': [
            'string',
        ],
        'attributes': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'userAttributes': [
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    },
    nextToken='string',
    maxResults=123
)
type runArns

list

param runArns

The ARNs of the assessment runs that generate the findings that you want to list.

  • (string) --

type filter

dict

param filter

You can use this parameter to specify a subset of data to be included in the action's response.

For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.

  • rulesPackageArns (list) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the rulesPackageArn property of the Finding data type.

    • (string) --

  • ruleNames (list) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the ruleName property of the Finding data type.

    • (string) --

  • severities (list) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the severity property of the Finding data type.

    • (string) --

  • attributes (list) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the attributes property of the Finding data type.

    • (dict) --

      This data type is used as a response element in the AddAttributesToFindings action and a request parameter in the CreateAssessment action.

      • key (string) --

        The attribute key.

      • value (string) --

        The value assigned to the attribute key.

  • userAttributes (list) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the userAttributes property of the Finding data type.

    • (dict) --

      This data type is used as a response element in the AddAttributesToFindings action and a request parameter in the CreateAssessment action.

      • key (string) --

        The attribute key.

      • value (string) --

        The value assigned to the attribute key.

type nextToken

string

param nextToken

You can use this parameter when paginating results. Set the value of this parameter to 'null' on your first call to the ListFindings action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from previous response to continue listing data.

type maxResults

integer

param maxResults

You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.

rtype

dict

returns

Response Syntax

{
    'findingArnList': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • findingArnList (list) --

      A list of ARNs specifying the findings returned by the action.

      • (string) --

    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameter 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'.

CreateAssessment (new) Link ¶

Creates an assessment for the application specified by the application ARN. You can create up to 500 assessments per AWS account.

Request Syntax

client.create_assessment(
    applicationArn='string',
    assessmentName='string',
    durationInSeconds=123,
    userAttributesForFindings=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type applicationArn

string

param applicationArn

The ARN specifying the application for which you want to create an assessment.

type assessmentName

string

param assessmentName

The user-defined name identifying the assessment that you want to create. You can create several assessments for an application. The names of the assessments corresponding to a particular application must be unique.

type durationInSeconds

integer

param durationInSeconds

The duration of the assessment in seconds. The default value is 3600 seconds (one hour). The maximum value is 86400 seconds (one day).

type userAttributesForFindings

list

param userAttributesForFindings

The user-defined attributes that are assigned to every finding generated by running this assessment.

  • (dict) --

    This data type is used as a response element in the AddAttributesToFindings action and a request parameter in the CreateAssessment action.

    • key (string) --

      The attribute key.

    • value (string) --

      The value assigned to the attribute key.

rtype

dict

returns

Response Syntax

{
    'assessmentArn': 'string'
}

Response Structure

  • (dict) --

    • assessmentArn (string) --

      The ARN specifying the assessment that is created.

DescribeRun (new) Link ¶

Describes the assessment run specified by the run ARN.

Request Syntax

client.describe_run(
    runArn='string'
)
type runArn

string

param runArn

The ARN specifying the assessment run that you want to describe.

rtype

dict

returns

Response Syntax

{
    'run': {
        'runArn': 'string',
        'runName': 'string',
        'assessmentArn': 'string',
        'runState': 'string',
        'rulesPackages': [
            'string',
        ],
        'creationTime': datetime(2015, 1, 1),
        'completionTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • run (dict) --

      Information about the assessment run.

      • runArn (string) --

        The ARN of the run.

      • runName (string) --

        The auto-generated name for the run.

      • assessmentArn (string) --

        The ARN of the assessment that is associated with the run.

      • runState (string) --

        The state of the run. Values can be set to DataCollectionComplete , EvaluatingPolicies , EvaluatingPoliciesErrorCanRetry , Completed , Failed , TombStoned .

      • rulesPackages (list) --

        Rules packages selected for the run of the assessment.

        • (string) --

      • creationTime (datetime) --

        Run creation time that corresponds to the data collection completion time or failure.

      • completionTime (datetime) --

        Run completion time that corresponds to the rules packages evaluation completion time or failure.

ListAssessments (new) Link ¶

Lists the assessments corresponding to applications specified by the applications' ARNs.

Request Syntax

client.list_assessments(
    applicationArns=[
        'string',
    ],
    filter={
        'assessmentNamePatterns': [
            'string',
        ],
        'assessmentStates': [
            'string',
        ],
        'dataCollected': True|False,
        'startTimeRange': {
            'minimum': datetime(2015, 1, 1),
            'maximum': datetime(2015, 1, 1)
        },
        'endTimeRange': {
            'minimum': datetime(2015, 1, 1),
            'maximum': datetime(2015, 1, 1)
        },
        'durationRange': {
            'minimum': 123,
            'maximum': 123
        }
    },
    nextToken='string',
    maxResults=123
)
type applicationArns

list

param applicationArns

A list of ARNs specifying the applications the assessments of which you want to list.

  • (string) --

type filter

dict

param filter

You can use this parameter to specify a subset of data to be included in the action's response.

For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.

  • assessmentNamePatterns (list) --

    For a record to match a filter, an explicit value or a string containing a wildcard specified for this data type property must match the value of the assessmentName property of the Assessment data type.

    • (string) --

  • assessmentStates (list) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the assessmentState property of the Assessment data type.

    • (string) --

  • dataCollected (boolean) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the dataCollected property of the Assessment data type.

  • startTimeRange (dict) --

    For a record to match a filter, the value specified for this data type property must inclusively match any value between the specified minimum and maximum values of the startTime property of the Assessment data type.

    • minimum (datetime) --

      The minimum value of the timestamp range.

    • maximum (datetime) --

      The maximum value of the timestamp range.

  • endTimeRange (dict) --

    For a record to match a filter, the value specified for this data type property must inclusively match any value between the specified minimum and maximum values of the endTime property of the Assessment data type.

    • minimum (datetime) --

      The minimum value of the timestamp range.

    • maximum (datetime) --

      The maximum value of the timestamp range.

  • durationRange (dict) --

    For a record to match a filter, the value specified for this data type property must inclusively match any value between the specified minimum and maximum values of the durationInSeconds property of the Assessment data type.

    • minimum (integer) --

      The minimum value of the duration range. Must be greater than zero.

    • maximum (integer) --

      The maximum value of the duration range. Must be less than or equal to 604800 seconds (1 week).

type nextToken

string

param nextToken

You can use this parameter when paginating results. Set the value of this parameter to 'null' on your first call to the ListAssessments action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from previous response to continue listing data.

type maxResults

integer

param maxResults

You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.

rtype

dict

returns

Response Syntax

{
    'assessmentArnList': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assessmentArnList (list) --

      A list of ARNs specifying the assessments returned by the action.

      • (string) --

    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameter 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'.

ListApplications (new) Link ¶

Lists the ARNs of the applications within this AWS account. For more information about applications, see Inspector Applications.

Request Syntax

client.list_applications(
    filter={
        'applicationNamePatterns': [
            'string',
        ]
    },
    nextToken='string',
    maxResults=123
)
type filter

dict

param filter

You can use this parameter to specify a subset of data to be included in the action's response.

For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.

  • applicationNamePatterns (list) --

    For a record to match a filter, an explicit value or a string containing a wildcard specified for this data type property must match the value of the applicationName property of the Application data type.

    • (string) --

type nextToken

string

param nextToken

You can use this parameter when paginating results. Set the value of this parameter to 'null' on your first call to the ListApplications action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from previous response to continue listing data.

type maxResults

integer

param maxResults

You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.

rtype

dict

returns

Response Syntax

{
    'applicationArnList': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • applicationArnList (list) --

      A list of ARNs specifying the applications returned by the action.

      • (string) --

    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameter 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'.

UpdateAssessment (new) Link ¶

Updates the assessment specified by the assessment ARN.

Request Syntax

client.update_assessment(
    assessmentArn='string',
    assessmentName='string',
    durationInSeconds=123
)
type assessmentArn

string

param assessmentArn

Asessment ARN that you want to update.

type assessmentName

string

param assessmentName

Assessment name that you want to update.

type durationInSeconds

integer

param durationInSeconds

Assessment duration in seconds that you want to update. The default value is 3600 seconds (one hour). The maximum value is 86400 seconds (one day).

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

DescribeFinding (new) Link ¶

Describes the finding specified by the finding ARN.

Request Syntax

client.describe_finding(
    findingArn='string'
)
type findingArn

string

param findingArn

The ARN specifying the finding that you want to describe.

rtype

dict

returns

Response Syntax

{
    'finding': {
        'findingArn': 'string',
        'runArn': 'string',
        'rulesPackageArn': 'string',
        'ruleName': 'string',
        'agentId': 'string',
        'autoScalingGroup': 'string',
        'severity': 'string',
        'finding': {
            'key': {
                'facility': 'string',
                'id': 'string'
            },
            'parameters': [
                {
                    'name': 'string',
                    'value': 'string'
                },
            ]
        },
        'description': {
            'key': {
                'facility': 'string',
                'id': 'string'
            },
            'parameters': [
                {
                    'name': 'string',
                    'value': 'string'
                },
            ]
        },
        'recommendation': {
            'key': {
                'facility': 'string',
                'id': 'string'
            },
            'parameters': [
                {
                    'name': 'string',
                    'value': 'string'
                },
            ]
        },
        'attributes': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'userAttributes': [
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • finding (dict) --

      Information about the finding.

      • findingArn (string) --

        The ARN specifying the finding.

      • runArn (string) --

        The ARN of the assessment run that generated the finding.

      • rulesPackageArn (string) --

        The ARN of the rules package that is used to generate the finding.

      • ruleName (string) --

        The rule name that is used to generate the finding.

      • agentId (string) --

        The EC2 instance ID where the agent is installed that is used during the assessment that generates the finding.

      • autoScalingGroup (string) --

        The autoscaling group of the EC2 instance where the agent is installed that is used during the assessment that generates the finding.

      • severity (string) --

        The finding severity. Values can be set to High , Medium , Low , and Informational .

      • finding (dict) --

        A short description that identifies the finding.

        • key (dict) --

          The facility and id properties of the LocalizedTextKey data type.

          • facility (string) --

            The module response source of the text.

          • id (string) --

            Part of the module response source of the text.

        • parameters (list) --

          Values for the dynamic elements of the string specified by the textual identifier.

          • (dict) --

            This data type is used in the LocalizedText data type.

            • name (string) --

              The name of the variable that is being replaced.

            • value (string) --

              The value assigned to the variable that is being replaced.

      • description (dict) --

        The description of the finding.

        • key (dict) --

          The facility and id properties of the LocalizedTextKey data type.

          • facility (string) --

            The module response source of the text.

          • id (string) --

            Part of the module response source of the text.

        • parameters (list) --

          Values for the dynamic elements of the string specified by the textual identifier.

          • (dict) --

            This data type is used in the LocalizedText data type.

            • name (string) --

              The name of the variable that is being replaced.

            • value (string) --

              The value assigned to the variable that is being replaced.

      • recommendation (dict) --

        The recommendation for the finding.

        • key (dict) --

          The facility and id properties of the LocalizedTextKey data type.

          • facility (string) --

            The module response source of the text.

          • id (string) --

            Part of the module response source of the text.

        • parameters (list) --

          Values for the dynamic elements of the string specified by the textual identifier.

          • (dict) --

            This data type is used in the LocalizedText data type.

            • name (string) --

              The name of the variable that is being replaced.

            • value (string) --

              The value assigned to the variable that is being replaced.

      • attributes (list) --

        The system-defined attributes for the finding.

        • (dict) --

          This data type is used as a response element in the AddAttributesToFindings action and a request parameter in the CreateAssessment action.

          • key (string) --

            The attribute key.

          • value (string) --

            The value assigned to the attribute key.

      • userAttributes (list) --

        The user-defined attributes that are assigned to the finding.

        • (dict) --

          This data type is used as a response element in the AddAttributesToFindings action and a request parameter in the CreateAssessment action.

          • key (string) --

            The attribute key.

          • value (string) --

            The value assigned to the attribute key.

DeleteAssessment (new) Link ¶

Deletes the assessment specified by the assessment ARN.

Request Syntax

client.delete_assessment(
    assessmentArn='string'
)
type assessmentArn

string

param assessmentArn

The ARN specifying the assessment that you want to delete.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

RunAssessment (new) Link ¶

Starts the analysis of the application’s behavior against selected rule packages for the assessment specified by the assessment ARN.

Request Syntax

client.run_assessment(
    assessmentArn='string',
    runName='string'
)
type assessmentArn

string

param assessmentArn

The ARN of the assessment that you want to run.

type runName

string

param runName

A name specifying the run of the assessment.

rtype

dict

returns

Response Syntax

{
    'runArn': 'string'
}

Response Structure

  • (dict) --

    • runArn (string) --

      The ARN specifying the run of the assessment.

PreviewAgentsForResourceGroup (new) Link ¶

Previews the agents installed on the EC2 instances that are included in the application created with the specified resource group.

Request Syntax

client.preview_agents_for_resource_group(
    resourceGroupArn='string',
    nextToken='string',
    maxResults=123
)
type resourceGroupArn

string

param resourceGroupArn

The ARN of the resource group that is used to create an application.

type nextToken

string

param nextToken

You can use this parameter when paginating results. Set the value of this parameter to 'null' on your first call to the PreviewAgentsForResourceGroup action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from previous response to continue listing data.

type maxResults

integer

param maxResults

You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.

rtype

dict

returns

Response Syntax

{
    'agentPreviewList': [
        {
            'agentId': 'string',
            'autoScalingGroup': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • agentPreviewList (list) --

      The resulting list of agents.

      • (dict) --

        This data type is used as a response element in the PreviewAgentsForResourceGroup action.

        • agentId (string) --

          The id of the EC2 instance where the agent is intalled.

        • autoScalingGroup (string) --

          The autoscaling group for the EC2 instance where the agent is installed.

    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameter 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'.

CreateResourceGroup (new) Link ¶

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 Inspector application. The created resource group is then used to create an Inspector application.

Request Syntax

client.create_resource_group(
    resourceGroupTags='string'
)
type resourceGroupTags

string

param resourceGroupTags

A collection of keys and an array of possible values in JSON format.

For example, [{ "key1" : ["Value1","Value2"]},{"Key2": ["Value3"]}]

rtype

dict

returns

Response Syntax

{
    'resourceGroupArn': 'string'
}

Response Structure

  • (dict) --

    • resourceGroupArn (string) --

      The ARN specifying the resource group that is created.

DeleteRun (new) Link ¶

Deletes the assessment run specified by the run ARN.

Request Syntax

client.delete_run(
    runArn='string'
)
type runArn

string

param runArn

The ARN specifying the assessment run that you want to delete.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

DetachAssessmentAndRulesPackage (new) Link ¶

Detaches the rules package specified by the rules package ARN from the assessment specified by the assessment ARN.

Request Syntax

client.detach_assessment_and_rules_package(
    assessmentArn='string',
    rulesPackageArn='string'
)
type assessmentArn

string

param assessmentArn

The ARN specifying the assessment from which you want to detach a rules package.

type rulesPackageArn

string

param rulesPackageArn

The ARN specifying the rules package that you want to detach from the assessment.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

RemoveAttributesFromFindings (new) Link ¶

Removes the entire attribute (key and value pair) from the findings specified by the finding ARNs where an attribute with the specified key exists.

Request Syntax

client.remove_attributes_from_findings(
    findingArns=[
        'string',
    ],
    attributeKeys=[
        'string',
    ]
)
type findingArns

list

param findingArns

The ARNs specifying the findings that you want to remove attributes from.

  • (string) --

type attributeKeys

list

param attributeKeys

The array of attribute keys that you want to remove from specified findings.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

SetTagsForResource (new) Link ¶

Sets tags (key and value pairs) to the assessment specified by the assessment ARN.

Request Syntax

client.set_tags_for_resource(
    resourceArn='string',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type resourceArn

string

param resourceArn

The ARN of the assessment that you want to set tags to.

type tags

list

param tags

A collection of key and value pairs that you want to set to an assessment.

  • (dict) --

    A key and value pair.

    This data type is used as a request parameter in the SetTagsForResource action and a response element in the ListTagsForResource action.

    • Key (string) --

      The tag key.

    • Value (string) --

      The value assigned to a tag key.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

StartDataCollection (new) Link ¶

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

Request Syntax

client.start_data_collection(
    assessmentArn='string'
)
type assessmentArn

string

param assessmentArn

The ARN of the assessment for which you want to start the data collection process.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

ListRulesPackages (new) Link ¶

Lists all available Inspector rules packages.

Request Syntax

client.list_rules_packages(
    nextToken='string',
    maxResults=123
)
type nextToken

string

param nextToken

You can use this parameter when paginating results. Set the value of this parameter to 'null' on your first call to the ListRulesPackages action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from previous response to continue listing data.

type maxResults

integer

param maxResults

You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.

rtype

dict

returns

Response Syntax

{
    'rulesPackageArnList': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • rulesPackageArnList (list) --

      The list of ARNs specifying the rules packages returned by the action.

      • (string) --

    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameter 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'.

ListRuns (new) Link ¶

Lists the assessment runs associated with the assessments specified by the assessment ARNs.

Request Syntax

client.list_runs(
    assessmentArns=[
        'string',
    ],
    filter={
        'runNamePatterns': [
            'string',
        ],
        'runStates': [
            'string',
        ],
        'rulesPackages': [
            'string',
        ],
        'creationTime': {
            'minimum': datetime(2015, 1, 1),
            'maximum': datetime(2015, 1, 1)
        },
        'completionTime': {
            'minimum': datetime(2015, 1, 1),
            'maximum': datetime(2015, 1, 1)
        }
    },
    nextToken='string',
    maxResults=123
)
type assessmentArns

list

param assessmentArns

The ARNs specifying the assessments whose runs you want to list.

  • (string) --

type filter

dict

param filter

You can use this parameter to specify a subset of data to be included in the action's response.

For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.

  • runNamePatterns (list) --

    For a record to match a filter, an explicit value or a string containing a wildcard specified for this data type property must match the value of the runName property of the Run data type.

    • (string) --

  • runStates (list) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the runState property of the Run data type.

    • (string) --

  • rulesPackages (list) --

    For a record to match a filter, the value specified for this data type property must match a list of values of the rulesPackages property of the Run data type.

    • (string) --

  • creationTime (dict) --

    For a record to match a filter, the value specified for this data type property must inclusively match any value between the specified minimum and maximum values of the creationTime property of the Run data type.

    • minimum (datetime) --

      The minimum value of the timestamp range.

    • maximum (datetime) --

      The maximum value of the timestamp range.

  • completionTime (dict) --

    For a record to match a filter, the value specified for this data type property must inclusively match any value between the specified minimum and maximum values of the completionTime property of the Run data type.

    • minimum (datetime) --

      The minimum value of the timestamp range.

    • maximum (datetime) --

      The maximum value of the timestamp range.

type nextToken

string

param nextToken

You can use this parameter when paginating results. Set the value of this parameter to 'null' on your first call to the ListRuns action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from previous response to continue listing data.

type maxResults

integer

param maxResults

You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.

rtype

dict

returns

Response Syntax

{
    'runArnList': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • runArnList (list) --

      A list of ARNs specifying the assessment runs returned by the action.

      • (string) --

    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameter 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'.

AttachAssessmentAndRulesPackage (new) Link ¶

Attaches the rules package specified by the rules package ARN to the assessment specified by the assessment ARN.

Request Syntax

client.attach_assessment_and_rules_package(
    assessmentArn='string',
    rulesPackageArn='string'
)
type assessmentArn

string

param assessmentArn

The ARN specifying the assessment to which you want to attach a rules package.

type rulesPackageArn

string

param rulesPackageArn

The ARN specifying the rules package that you want to attach to the assessment.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

ListAttachedRulesPackages (new) Link ¶

Lists the rules packages attached to the assessment specified by the assessment ARN.

Request Syntax

client.list_attached_rules_packages(
    assessmentArn='string',
    nextToken='string',
    maxResults=123
)
type assessmentArn

string

param assessmentArn

The ARN specifying the assessment whose rules packages you want to list.

type nextToken

string

param nextToken

You can use this parameter when paginating results. Set the value of this parameter to 'null' on your first call to the ListAttachedRulesPackages action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from previous response to continue listing data.

type maxResults

integer

param maxResults

You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.

rtype

dict

returns

Response Syntax

{
    'rulesPackageArnList': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • rulesPackageArnList (list) --

      A list of ARNs specifying the rules packages returned by the action.

      • (string) --

    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameter 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'.

UpdateApplication (new) Link ¶

Updates application specified by the application ARN.

Request Syntax

client.update_application(
    applicationArn='string',
    applicationName='string',
    resourceGroupArn='string'
)
type applicationArn

string

param applicationArn

Application ARN that you want to update.

type applicationName

string

param applicationName

Application name that you want to update.

type resourceGroupArn

string

param resourceGroupArn

The resource group ARN that you want to update.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

StopDataCollection (new) Link ¶

Stop data collection for the assessment specified by the assessment ARN.

Request Syntax

client.stop_data_collection(
    assessmentArn='string'
)
type assessmentArn

string

param assessmentArn

The ARN of the assessment for which you want to stop the data collection process.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

ListAssessmentAgents (new) Link ¶

Lists the agents of the assessment specified by the assessment ARN.

Request Syntax

client.list_assessment_agents(
    assessmentArn='string',
    filter={
        'agentHealthList': [
            'string',
        ]
    },
    nextToken='string',
    maxResults=123
)
type assessmentArn

string

param assessmentArn

The ARN specifying the assessment whose agents you want to list.

type filter

dict

param filter

You can use this parameter to specify a subset of data to be included in the action's response.

For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.

  • agentHealthList (list) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the agentHealth property of the Agent data type.

    • (string) --

type nextToken

string

param nextToken

You can use this parameter when paginating results. Set the value of this parameter to 'null' on your first call to the ListAssessmentAgents action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from previous response to continue listing data.

type maxResults

integer

param maxResults

You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.

rtype

dict

returns

Response Syntax

{
    'agentList': [
        {
            'agentId': 'string',
            'assessmentArn': 'string',
            'agentHealth': 'string',
            'agentHealthCode': 'string',
            'agentHealthDetails': 'string',
            'autoScalingGroup': 'string',
            'accountId': 'string',
            'telemetry': [
                {
                    'status': 'string',
                    'messageTypeTelemetries': [
                        {
                            'messageType': 'string',
                            'count': 123,
                            'dataSize': 123
                        },
                    ]
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • agentList (list) --

      A list of ARNs specifying the agents returned by the action.

      • (dict) --

        Contains information about an Inspector agent. This data type is used as a response element in the ListAssessmentAgents action.

        • agentId (string) --

          The EC2 instance ID where the agent is installed.

        • assessmentArn (string) --

          The ARN of the assessment that is associated with the agent.

        • agentHealth (string) --

          The current health state of the agent. Values can be set to HEALTHY or UNHEALTHY .

        • agentHealthCode (string) --

          The detailed health state of the agent. Values can be set to RUNNING , HEALTHY , UNHEALTHY , UNKNOWN , BLACKLISTED , SHUTDOWN , THROTTLED .

        • agentHealthDetails (string) --

          The description for the agent health code.

        • autoScalingGroup (string) --

          This data type property is currently not used.

        • accountId (string) --

          AWS account of the EC2 instance where the agent is installed.

        • telemetry (list) --

          The Inspector application data metrics collected by the agent.

          • (dict) --

            The metadata about the Inspector application data metrics collected by the agent.

            This data type is used as the response element in the GetAssessmentTelemetry action.

            • status (string) --

              The category of the individual metrics that together constitute the telemetry that Inspector received from the agent.

            • messageTypeTelemetries (list) --

              Counts of individual metrics received by Inspector from the agent.

              • (dict) --

                This data type is used in the Telemetry data type.

                This is metadata about the behavioral data collected by the Inspector agent on your EC2 instances during an assessment and passed to the Inspector service for analysis.

                • messageType (string) --

                  A specific type of behavioral data that is collected by the agent.

                • count (integer) --

                  The number of times that the behavioral data is collected by the agent during an assessment.

                • dataSize (integer) --

                  The total size of the behavioral data that is collected by the agent during an assessment.

    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameter 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'.

AddAttributesToFindings (new) Link ¶

Assigns attributes (key and value pair) to the findings specified by the findings' ARNs.

Request Syntax

client.add_attributes_to_findings(
    findingArns=[
        'string',
    ],
    attributes=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type findingArns

list

param findingArns

The ARNs specifying the findings that you want to assign attributes to.

  • (string) --

type attributes

list

param attributes

The array of attributes that you want to assign to specified findings.

  • (dict) --

    This data type is used as a response element in the AddAttributesToFindings action and a request parameter in the CreateAssessment action.

    • key (string) --

      The attribute key.

    • value (string) --

      The value assigned to the attribute key.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

DescribeResourceGroup (new) Link ¶

Describes the resource group specified by the resource group ARN.

Request Syntax

client.describe_resource_group(
    resourceGroupArn='string'
)
type resourceGroupArn

string

param resourceGroupArn

The ARN specifying the resource group that you want to describe.

rtype

dict

returns

Response Syntax

{
    'resourceGroup': {
        'resourceGroupArn': 'string',
        'resourceGroupTags': 'string'
    }
}

Response Structure

  • (dict) --

    • resourceGroup (dict) --

      Information about the resource group.

      • resourceGroupArn (string) --

        The ARN of the resource group.

      • resourceGroupTags (string) --

        The tags (key and value pairs) of the resource group.

        This data type property is used in the CreateResourceGroup action.

        A collection of keys and an array of possible values in JSON format.

        For example, [{ "key1" : ["Value1","Value2"]},{"Key2": ["Value3"]}]

DescribeApplication (new) Link ¶

Describes the application specified by the application ARN.

Request Syntax

client.describe_application(
    applicationArn='string'
)
type applicationArn

string

param applicationArn

The ARN specifying the application that you want to describe.

rtype

dict

returns

Response Syntax

{
    'application': {
        'applicationArn': 'string',
        'applicationName': 'string',
        'resourceGroupArn': 'string'
    }
}

Response Structure

  • (dict) --

    • application (dict) --

      Information about the application.

      • applicationArn (string) --

        The ARN specifying the Inspector application.

      • applicationName (string) --

        The name of the Inspector application.

      • resourceGroupArn (string) --

        The ARN specifying the resource group that is associated with the application.

RegisterCrossAccountAccessRole (new) Link ¶

Register the role that Inspector uses to list your EC2 instances during the assessment.

Request Syntax

client.register_cross_account_access_role(
    roleArn='string'
)
type roleArn

string

param roleArn

The ARN of the IAM role that Inspector uses to list your EC2 instances during the assessment.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

DeleteApplication (new) Link ¶

Deletes the application specified by the application ARN.

Request Syntax

client.delete_application(
    applicationArn='string'
)
type applicationArn

string

param applicationArn

The ARN specifying the application that you want to delete.

rtype

dict

returns

Response Syntax

{
    'message': 'string'
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

ListAttachedAssessments (new) Link ¶

Lists the assessments attached to the rules package specified by the rules package ARN.

Request Syntax

client.list_attached_assessments(
    rulesPackageArn='string',
    filter={
        'assessmentNamePatterns': [
            'string',
        ],
        'assessmentStates': [
            'string',
        ],
        'dataCollected': True|False,
        'startTimeRange': {
            'minimum': datetime(2015, 1, 1),
            'maximum': datetime(2015, 1, 1)
        },
        'endTimeRange': {
            'minimum': datetime(2015, 1, 1),
            'maximum': datetime(2015, 1, 1)
        },
        'durationRange': {
            'minimum': 123,
            'maximum': 123
        }
    },
    nextToken='string',
    maxResults=123
)
type rulesPackageArn

string

param rulesPackageArn

The ARN specifying the rules package whose assessments you want to list.

type filter

dict

param filter

You can use this parameter to specify a subset of data to be included in the action's response.

For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.

  • assessmentNamePatterns (list) --

    For a record to match a filter, an explicit value or a string containing a wildcard specified for this data type property must match the value of the assessmentName property of the Assessment data type.

    • (string) --

  • assessmentStates (list) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the assessmentState property of the Assessment data type.

    • (string) --

  • dataCollected (boolean) --

    For a record to match a filter, the value specified for this data type property must be the exact match of the value of the dataCollected property of the Assessment data type.

  • startTimeRange (dict) --

    For a record to match a filter, the value specified for this data type property must inclusively match any value between the specified minimum and maximum values of the startTime property of the Assessment data type.

    • minimum (datetime) --

      The minimum value of the timestamp range.

    • maximum (datetime) --

      The maximum value of the timestamp range.

  • endTimeRange (dict) --

    For a record to match a filter, the value specified for this data type property must inclusively match any value between the specified minimum and maximum values of the endTime property of the Assessment data type.

    • minimum (datetime) --

      The minimum value of the timestamp range.

    • maximum (datetime) --

      The maximum value of the timestamp range.

  • durationRange (dict) --

    For a record to match a filter, the value specified for this data type property must inclusively match any value between the specified minimum and maximum values of the durationInSeconds property of the Assessment data type.

    • minimum (integer) --

      The minimum value of the duration range. Must be greater than zero.

    • maximum (integer) --

      The maximum value of the duration range. Must be less than or equal to 604800 seconds (1 week).

type nextToken

string

param nextToken

You can use this parameter when paginating results. Set the value of this parameter to 'null' on your first call to the ListAttachedAssessments action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from previous response to continue listing data.

type maxResults

integer

param maxResults

You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.

rtype

dict

returns

Response Syntax

{
    'assessmentArnList': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assessmentArnList (list) --

      A list of ARNs specifying the assessments returned by the action.

      • (string) --

    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameter 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'.

GetAssessmentTelemetry (new) Link ¶

Returns the metadata about the telemetry (application behavioral data) for the assessment specified by the assessment ARN.

Request Syntax

client.get_assessment_telemetry(
    assessmentArn='string'
)
type assessmentArn

string

param assessmentArn

The ARN specifying the assessment the telemetry of which you want to obtain.

rtype

dict

returns

Response Syntax

{
    'telemetry': [
        {
            'status': 'string',
            'messageTypeTelemetries': [
                {
                    'messageType': 'string',
                    'count': 123,
                    'dataSize': 123
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • telemetry (list) --

      Telemetry details.

      • (dict) --

        The metadata about the Inspector application data metrics collected by the agent.

        This data type is used as the response element in the GetAssessmentTelemetry action.

        • status (string) --

          The category of the individual metrics that together constitute the telemetry that Inspector received from the agent.

        • messageTypeTelemetries (list) --

          Counts of individual metrics received by Inspector from the agent.

          • (dict) --

            This data type is used in the Telemetry data type.

            This is metadata about the behavioral data collected by the Inspector agent on your EC2 instances during an assessment and passed to the Inspector service for analysis.

            • messageType (string) --

              A specific type of behavioral data that is collected by the agent.

            • count (integer) --

              The number of times that the behavioral data is collected by the agent during an assessment.

            • dataSize (integer) --

              The total size of the behavioral data that is collected by the agent during an assessment.

CreateApplication (new) Link ¶

Creates a new application using the resource group ARN generated by CreateResourceGroup. You can create up to 50 applications per AWS account. You can run up to 500 concurrent agents per AWS account. For more information, see Inspector Applications.

Request Syntax

client.create_application(
    applicationName='string',
    resourceGroupArn='string'
)
type applicationName

string

param applicationName

The user-defined name identifying the application that you want to create. The name must be unique within the AWS account.

type resourceGroupArn

string

param resourceGroupArn

The ARN specifying the resource group that is used to create the application.

rtype

dict

returns

Response Syntax

{
    'applicationArn': 'string'
}

Response Structure

  • (dict) --

    • applicationArn (string) --

      The ARN specifying the application that is created.

LocalizeText (new) Link ¶

Translates a textual identifier into a user-readable text in a specified locale.

Request Syntax

client.localize_text(
    localizedTexts=[
        {
            'key': {
                'facility': 'string',
                'id': 'string'
            },
            'parameters': [
                {
                    'name': 'string',
                    'value': 'string'
                },
            ]
        },
    ],
    locale='string'
)
type localizedTexts

list

param localizedTexts

A list of textual identifiers.

  • (dict) --

    The textual identifier. This data type is used as the request parameter in the LocalizeText action.

    • key (dict) --

      The facility and id properties of the LocalizedTextKey data type.

      • facility (string) --

        The module response source of the text.

      • id (string) --

        Part of the module response source of the text.

    • parameters (list) --

      Values for the dynamic elements of the string specified by the textual identifier.

      • (dict) --

        This data type is used in the LocalizedText data type.

        • name (string) --

          The name of the variable that is being replaced.

        • value (string) --

          The value assigned to the variable that is being replaced.

type locale

string

param locale

The locale that you want to translate a textual identifier into.

rtype

dict

returns

Response Syntax

{
    'message': 'string',
    'results': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • message (string) --

      Confirmation details of the action performed.

    • results (list) --

      The resulting list of user-readable texts.

      • (string) --

ListTagsForResource (new) Link ¶

Lists all tags associated with a resource.

Request Syntax

client.list_tags_for_resource(
    resourceArn='string'
)
type resourceArn

string

param resourceArn

The ARN specifying the resource whose tags you want to list.

rtype

dict

returns

Response Syntax

{
    'tagList': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • tagList (list) --

      A collection of key and value pairs.

      • (dict) --

        A key and value pair.

        This data type is used as a request parameter in the SetTagsForResource action and a response element in the ListTagsForResource action.

        • Key (string) --

          The tag key.

        • Value (string) --

          The value assigned to a tag key.

DescribeCrossAccountAccessRole (new) Link ¶

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

Request Syntax

client.describe_cross_account_access_role()
rtype

dict

returns

Response Syntax

{
    'roleArn': 'string',
    'valid': True|False
}

Response Structure

  • (dict) --

    • roleArn (string) --

      The ARN specifying the IAM role that Inspector uses to access your AWS account.

    • valid (boolean) --

      A Boolean value that specifies whether the IAM role has the necessary policies attached to enable Inspector to access your AWS account.