Skip to main content

members

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

Overview

Namemembers
TypeResource
Idaws.inspector2.members

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe Amazon Web Services account ID of the member account. (pattern: <code>\d{12}</code>)
delegated_admin_account_idstringThe Amazon Web Services account ID of the Amazon Inspector delegated administrator for this member account. (pattern: <code>\d{12}</code>)
relationship_statusstringThe status of the member account. (CREATED, INVITED, DISABLED, ENABLED, REMOVED, RESIGNED, DELETED, EMAIL_VERIFICATION_IN_PROGRESS, EMAIL_VERIFICATION_FAILED, REGION_DISABLED, ACCOUNT_SUSPENDED, CANNOT_CREATE_DETECTOR_IN_ORG_MASTER)
updated_atstring (date-time)A timestamp showing when the status of this member was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_memberselectregionGets member information for your organization.
list_membersselectregionList members associated with the Amazon Inspector delegated administrator for your organization.
associate_memberupdateregion, accountIdAssociates an Amazon Web Services account with an Amazon Inspector delegated administrator. An HTTP 200 response indicates the association was successfully started, but doesn’t indicate whether it was completed. You can check if the association completed by using ListMembers for multiple accounts or GetMembers for a single account.
disassociate_memberexecregion, accountIdDisassociates a member account from an Amazon Inspector delegated administrator.

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

Gets member information for your organization.

SELECT
account_id,
delegated_admin_account_id,
relationship_status,
updated_at
FROM aws.inspector2.members
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Associates an Amazon Web Services account with an Amazon Inspector delegated administrator. An HTTP 200 response indicates the association was successfully started, but doesn’t indicate whether it was completed. You can check if the association completed by using ListMembers for multiple accounts or GetMembers for a single account.

UPDATE aws.inspector2.members
SET
accountId = '{{ accountId }}'
WHERE
region = '{{ region }}' --required
AND accountId = '{{ accountId }}' --required
RETURNING
account_id;

Lifecycle Methods

Disassociates a member account from an Amazon Inspector delegated administrator.

EXEC aws.inspector2.members.disassociate_member
@region='{{ region }}' --required
@@json=
'{
"accountId": "{{ accountId }}"
}'
;