members
Creates, updates, deletes, gets or lists a members resource.
Overview
| Name | members |
| Type | Resource |
| Id | aws.inspector2.members |
Fields
The following fields are returned by SELECT queries:
- get_member
- list_members
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Web Services account ID of the member account. (pattern: <code>\d{12}</code>) |
delegated_admin_account_id | string | The Amazon Web Services account ID of the Amazon Inspector delegated administrator for this member account. (pattern: <code>\d{12}</code>) |
relationship_status | string | The 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_at | string (date-time) | A timestamp showing when the status of this member was last updated. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Web Services account ID of the member account. (pattern: <code>\d{12}</code>) |
delegated_admin_account_id | string | The Amazon Web Services account ID of the Amazon Inspector delegated administrator for this member account. (pattern: <code>\d{12}</code>) |
relationship_status | string | The 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_at | string (date-time) | A timestamp showing when the status of this member was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_member | select | region | Gets member information for your organization. | |
list_members | select | region | List members associated with the Amazon Inspector delegated administrator for your organization. | |
associate_member | update | region, accountId | 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. | |
disassociate_member | exec | region, accountId | Disassociates 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_member
- list_members
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
;
List members associated with the Amazon Inspector delegated administrator for your organization.
SELECT
account_id,
delegated_admin_account_id,
relationship_status,
updated_at
FROM aws.inspector2.members
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- associate_member
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
- disassociate_member
Disassociates a member account from an Amazon Inspector delegated administrator.
EXEC aws.inspector2.members.disassociate_member
@region='{{ region }}' --required
@@json=
'{
"accountId": "{{ accountId }}"
}'
;