Inspector / Client / describe_assessment_targets

describe_assessment_targets#

Inspector.Client.describe_assessment_targets(**kwargs)#

Describes the assessment targets that are specified by the ARNs of the assessment targets.

See also: AWS API Documentation

Request Syntax

response = client.describe_assessment_targets(
    assessmentTargetArns=[
        'string',
    ]
)
Parameters:

assessmentTargetArns (list) –

[REQUIRED]

The ARNs that specifies the assessment targets that you want to describe.

  • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'assessmentTargets': [
        {
            'arn': 'string',
            'name': 'string',
            'resourceGroupArn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'failedItems': {
        'string': {
            'failureCode': 'INVALID_ARN'|'DUPLICATE_ARN'|'ITEM_DOES_NOT_EXIST'|'ACCESS_DENIED'|'LIMIT_EXCEEDED'|'INTERNAL_ERROR',
            'retryable': True|False
        }
    }
}

Response Structure

  • (dict) –

    • assessmentTargets (list) –

      Information about the assessment targets.

      • (dict) –

        Contains information about an Amazon Inspector application. This data type is used as the response element in the DescribeAssessmentTargets action.

        • arn (string) –

          The ARN that specifies the Amazon Inspector assessment target.

        • name (string) –

          The name of the Amazon Inspector assessment target.

        • resourceGroupArn (string) –

          The ARN that specifies the resource group that is associated with the assessment target.

        • createdAt (datetime) –

          The time at which the assessment target is created.

        • updatedAt (datetime) –

          The time at which UpdateAssessmentTarget is called.

    • failedItems (dict) –

      Assessment target details that cannot be described. An error code is provided for each failed item.

      • (string) –

        • (dict) –

          Includes details about the failed items.

          • failureCode (string) –

            The status code of a failed item.

          • retryable (boolean) –

            Indicates whether you can immediately retry a request for this item for a specified resource.

Exceptions

Examples

Describes the assessment targets that are specified by the ARNs of the assessment targets.

response = client.describe_assessment_targets(
    assessmentTargetArns=[
        'arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq',
    ],
)

print(response)

Expected Output:

{
    'assessmentTargets': [
        {
            'name': 'ExampleAssessmentTarget',
            'arn': 'arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq',
            'createdAt': datetime(2016, 3, 15, 20, 36, 31, 1, 75, 0),
            'resourceGroupArn': 'arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-PyGXopAI',
            'updatedAt': datetime(2016, 3, 15, 20, 36, 31, 1, 75, 0),
        },
    ],
    'failedItems': {
    },
    'ResponseMetadata': {
        '...': '...',
    },
}