update_assessment_target

update_assessment_target(**kwargs)

Updates the assessment target that is specified by the ARN of the assessment target.

If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

See also: AWS API Documentation

Request Syntax

response = client.update_assessment_target(
    assessmentTargetArn='string',
    assessmentTargetName='string',
    resourceGroupArn='string'
)
Parameters
  • assessmentTargetArn (string) --

    [REQUIRED]

    The ARN of the assessment target that you want to update.

  • assessmentTargetName (string) --

    [REQUIRED]

    The name of the assessment target that you want to update.

  • resourceGroupArn (string) -- The ARN of the resource group that is used to specify the new resource group to associate with the assessment target.
Returns

None

Exceptions

  • Inspector.Client.exceptions.InternalException
  • Inspector.Client.exceptions.InvalidInputException
  • Inspector.Client.exceptions.AccessDeniedException
  • Inspector.Client.exceptions.NoSuchEntityException
  • Inspector.Client.exceptions.ServiceTemporarilyUnavailableException

Examples

Updates the assessment target that is specified by the ARN of the assessment target.

response = client.update_assessment_target(
    assessmentTargetArn='arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX',
    assessmentTargetName='Example',
    resourceGroupArn='arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-yNbgL5Pt',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}