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 anaccountId, 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' } }, 'amiConfiguration': { 'lastLaunchedWithin': 'DAYS_180'|'DAYS_90'|'DAYS_60'|'DAYS_30'|'DAYS_14'|'DAYS_7', 'createdWithin': 'DAYS_180'|'DAYS_90'|'DAYS_60'|'DAYS_30'|'DAYS_14'|'DAYS_7', 'scanModeConfiguration': { 'scanMode': 'SCAN_ALL'|'TARGET_SCANNING', 'tags': [ { 'key': 'string', 'value': 'string' }, ], 'excludeCopiedAmis': True|False, 'excludeBackupDlmAmis': True|False }, 'status': 'SUCCESS'|'PENDING'|'FAILED', 'updatedAt': datetime(2015, 1, 1) } }
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.
amiConfiguration (dict) –
The current state of the Amazon Machine Image (AMI) scan configuration for the account.
lastLaunchedWithin (string) –
Restricts scanning to AMIs that were last launched within the specified duration.
createdWithin (string) –
Restricts scanning to AMIs that were created within the specified duration.
scanModeConfiguration (dict) –
The scan mode configuration that determines which AMIs are scanned.
scanMode (string) –
The scan mode that determines whether all AMIs are scanned or only those matching the specified tags.
tags (list) –
The tag filters used to select which AMIs are scanned when using targeted scanning.
(dict) –
A filter that matches Amazon Machine Images (AMIs) by tag key and, optionally, tag value.
key (string) –
The tag key to match against an AMI’s tags.
value (string) –
The tag value to match against an AMI’s tags. If omitted, the filter matches on the tag key alone.
excludeCopiedAmis (boolean) –
Whether to exclude AMIs that are copies of other AMIs from scanning.
excludeBackupDlmAmis (boolean) –
Whether to exclude AMIs created by Amazon Data Lifecycle Manager (DLM) backups from scanning.
status (string) –
The status of the AMI scan configuration.
updatedAt (datetime) –
The date and time when the AMI scan configuration was last updated.
Exceptions