Skip to main content

master_accounts

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

Overview

Namemaster_accounts
TypeResource
Idaws.guardduty.master_accounts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe ID of the account used as the administrator account.
invitation_idstringThe value used to validate the administrator account to the member account.
invited_atstringThe timestamp when the invitation was sent.
relationship_statusstringThe status of the relationship between the administrator and member accounts.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_master_accountselectdetector_id, regionProvides the details for the GuardDuty administrator account associated with the current GuardDuty member account.
disassociate_from_master_accountupdatedetector_id, regionDisassociates 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.

NameDatatypeDescription
detector_idstringThe unique ID of the detector of the GuardDuty member account.
regionstringAWS region (default: us-east-1)

SELECT examples

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

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;