Inspector / Client / describe_cross_account_access_role

describe_cross_account_access_role#

Inspector.Client.describe_cross_account_access_role()#

Describes the IAM role that enables Amazon Inspector to access your AWS account.

See also: AWS API Documentation

Request Syntax

response = client.describe_cross_account_access_role()
Return type:

dict

Returns:

Response Syntax

{
    'roleArn': 'string',
    'valid': True|False,
    'registeredAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • roleArn (string) –

      The ARN that specifies the IAM role that Amazon Inspector uses to access your AWS account.

    • valid (boolean) –

      A Boolean value that specifies whether the IAM role has the necessary policies attached to enable Amazon Inspector to access your AWS account.

    • registeredAt (datetime) –

      The date when the cross-account access role was registered.

Exceptions

  • Inspector.Client.exceptions.InternalException

Examples

Describes the IAM role that enables Amazon Inspector to access your AWS account.

response = client.describe_cross_account_access_role(
)

print(response)

Expected Output:

{
    'registeredAt': datetime(2016, 3, 15, 19, 13, 2, 1, 75, 0),
    'roleArn': 'arn:aws:iam::123456789012:role/inspector',
    'valid': True,
    'ResponseMetadata': {
        '...': '...',
    },
}