Skip to main content

cross_account_access_roles

Creates, updates, deletes, gets or lists a cross_account_access_roles resource.

Overview

Namecross_account_access_roles
TypeResource
Idaws.inspector.cross_account_access_roles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
registered_atstring (date-time)The date when the cross-account access role was registered.
role_arnstringThe ARN that specifies the IAM role that Amazon Inspector uses to access your AWS account.
validbooleanA Boolean value that specifies whether the IAM role has the necessary policies attached to enable Amazon Inspector to access your AWS account.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_cross_account_access_roleselectregionDescribes the IAM role that enables Amazon Inspector to access your AWS account.
register_cross_account_access_roleinsertregion, roleArnRegisters the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

SELECT
registered_at,
role_arn,
valid
FROM aws.inspector.cross_account_access_roles
WHERE region = '{{ region }}' -- required
;

INSERT examples

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

INSERT INTO aws.inspector.cross_account_access_roles (
roleArn,
region
)
SELECT
'{{ roleArn }}' /* required */,
'{{ region }}'
;