list_assessment_targets(**kwargs)¶Lists the ARNs of the assessment targets within this AWS account. For more information about assessment targets, see Amazon Inspector Assessment Targets.
See also: AWS API Documentation
Request Syntax
response = client.list_assessment_targets(
filter={
'assessmentTargetNamePattern': 'string'
},
nextToken='string',
maxResults=123
)
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.
For a record to match a filter, an explicit value or a string that contains a wildcard that is specified for this data type property must match the value of the assessmentTargetName property of the AssessmentTarget data type.
dict
Response Syntax
{
'assessmentTargetArns': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
assessmentTargetArns (list) --
A list of ARNs that specifies the assessment targets that are returned by the action.
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.
Exceptions
Inspector.Client.exceptions.InternalExceptionInspector.Client.exceptions.InvalidInputExceptionInspector.Client.exceptions.AccessDeniedExceptionExamples
Lists the ARNs of the assessment targets within this AWS account.
response = client.list_assessment_targets(
maxResults=123,
)
print(response)
Expected Output:
{
'assessmentTargetArns': [
'arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq',
],
'nextToken': '1',
'ResponseMetadata': {
'...': '...',
},
}