Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

register_cross_account_access_role

register_cross_account_access_role(**kwargs)

Registers the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.

See also: AWS API Documentation

Request Syntax

response = client.register_cross_account_access_role(
    roleArn='string'
)
Parameters
roleArn (string) --

[REQUIRED]

The ARN of the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.

Returns
None

Exceptions

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

Examples

Registers the IAM role that Amazon Inspector uses to list your EC2 instances at the start of the assessment run or when you call the PreviewAgents action.

response = client.register_cross_account_access_role(
    roleArn='arn:aws:iam::123456789012:role/inspector',
)

print(response)

Expected Output:

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