Inspector / Client / register_cross_account_access_role

register_cross_account_access_role#

Inspector.Client.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

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': {
        '...': '...',
    },
}