master_accounts
Creates, updates, deletes, gets or lists a master_accounts resource.
Overview
| Name | master_accounts |
| Type | Resource |
| Id | aws.guardduty.master_accounts |
Fields
The following fields are returned by SELECT queries:
- get_master_account
| Name | Datatype | Description |
|---|---|---|
account_id | string | The ID of the account used as the administrator account. |
invitation_id | string | The value used to validate the administrator account to the member account. |
invited_at | string | The timestamp when the invitation was sent. |
relationship_status | string | The status of the relationship between the administrator and member accounts. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_master_account | select | detector_id, region | Provides the details for the GuardDuty administrator account associated with the current GuardDuty member account. | |
disassociate_from_master_account | update | detector_id, region | Disassociates the current GuardDuty member account from its administrator account. When you disassociate an invited member from a GuardDuty delegated administrator, the member account details obtained from the CreateMembers API, including the associated email addresses, are retained. This is done so that the delegated administrator can invoke the InviteMembers API without the need to invoke the CreateMembers API again. To remove the details associated with a member account, the delegated administrator must invoke the DeleteMembers API. |
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 |
|---|---|---|
detector_id | string | The unique ID of the detector of the GuardDuty member account. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_master_account
Provides the details for the GuardDuty administrator account associated with the current GuardDuty member account.
SELECT
account_id,
invitation_id,
invited_at,
relationship_status
FROM aws.guardduty.master_accounts
WHERE detector_id = '{{ detector_id }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- disassociate_from_master_account
Disassociates the current GuardDuty member account from its administrator account. When you disassociate an invited member from a GuardDuty delegated administrator, the member account details obtained from the CreateMembers API, including the associated email addresses, are retained. This is done so that the delegated administrator can invoke the InviteMembers API without the need to invoke the CreateMembers API again. To remove the details associated with a member account, the delegated administrator must invoke the DeleteMembers API.
UPDATE aws.guardduty.master_accounts
SET
-- No updatable properties
WHERE
detector_id = '{{ detector_id }}' --required
AND region = '{{ region }}' --required;