Inspector2 / Client / get_configuration

get_configuration

Inspector2.Client.get_configuration(**kwargs)

Retrieves setting configurations for Amazon Inspector scans. If you specify an accountId, this operation returns the scan configuration for that member account. You must be the delegated administrator for the specified member account. If you do not specify an accountId, this operation returns your own scan configuration.

See also: AWS API Documentation

Request Syntax

response = client.get_configuration(
    accountId='string'
)
Parameters:

accountId (string) – The 12-digit Amazon Web Services account ID of the member account whose scan configuration you want to retrieve. When specified, you must be the delegated administrator for this member account. If not specified, the operation returns your own configuration.

Return type:

dict

Returns:

Response Syntax

{
    'ecrConfiguration': {
        'rescanDurationState': {
            'rescanDuration': 'LIFETIME'|'DAYS_30'|'DAYS_180'|'DAYS_14'|'DAYS_60'|'DAYS_90'|'DAYS_3'|'DAYS_7',
            'status': 'SUCCESS'|'PENDING'|'FAILED',
            'updatedAt': datetime(2015, 1, 1),
            'pullDateRescanDuration': 'DAYS_14'|'DAYS_30'|'DAYS_60'|'DAYS_90'|'DAYS_180'|'DAYS_3'|'DAYS_7',
            'pullDateRescanMode': 'LAST_PULL_DATE'|'LAST_IN_USE_AT'
        }
    },
    'ec2Configuration': {
        'scanModeState': {
            'scanMode': 'EC2_SSM_AGENT_BASED'|'EC2_HYBRID',
            'scanModeStatus': 'SUCCESS'|'PENDING'
        },
        'vmScannerState': {
            'activated': True|False,
            'activatedAt': datetime(2015, 1, 1),
            'status': 'SUCCESS'|'PENDING'|'FAILED'
        }
    }
}

Response Structure

  • (dict) –

    • ecrConfiguration (dict) –

      Specifies how the ECR automated re-scan duration is currently configured for your environment.

      • rescanDurationState (dict) –

        An object that contains details about the state of the ECR re-scan settings.

        • rescanDuration (string) –

          The rescan duration configured for image push date.

        • status (string) –

          The status of changes to the ECR automated re-scan duration.

        • updatedAt (datetime) –

          A timestamp representing when the last time the ECR scan duration setting was changed.

        • pullDateRescanDuration (string) –

          The rescan duration configured for image pull date.

        • pullDateRescanMode (string) –

          The pull date for the re-scan mode.

    • ec2Configuration (dict) –

      Specifies how the Amazon EC2 automated scan mode is currently configured for your environment.

      • scanModeState (dict) –

        An object that contains details about the state of the Amazon EC2 scan mode.

        • scanMode (string) –

          The scan method that is applied to the instance.

        • scanModeStatus (string) –

          The status of the Amazon EC2 scan mode setting.

      • vmScannerState (dict) –

        An object that contains details about the state of the Amazon Inspector VM scanner.

        • activated (boolean) –

          Whether the VM scanner is activated.

        • activatedAt (datetime) –

          The date and time the VM scanner was activated.

        • status (string) –

          The status of the VM scanner.

Exceptions