Skip to main content

masters

Creates, updates, deletes or gets a master resource or lists masters in a region

Overview

Namemasters
TypeResource
DescriptionGuardDuty Master resource schema
Idaws.guardduty.masters

Fields

NameDatatypeDescription
master_idstringID of the account used as the master account.
invitation_idstringValue used to validate the master account to the member account.
detector_idstringUnique ID of the detector of the GuardDuty member account.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTMasterId, DetectorId, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all masters in a region.

SELECT
region,
master_id,
invitation_id,
detector_id
FROM aws.guardduty.masters
WHERE region = 'us-east-1';

Gets all properties from an individual master.

SELECT
region,
master_id,
invitation_id,
detector_id
FROM aws.guardduty.masters
WHERE region = 'us-east-1' AND data__Identifier = '<DetectorId>|<MasterId>';

INSERT example

Use the following StackQL query and manifest file to create a new master resource, using stack-deploy.

/*+ create */
INSERT INTO aws.guardduty.masters (
MasterId,
DetectorId,
region
)
SELECT
'{{ MasterId }}',
'{{ DetectorId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.guardduty.masters
WHERE data__Identifier = '<DetectorId|MasterId>'
AND region = 'us-east-1';

Permissions

To operate on the masters resource, the following permissions are required:

Create

guardduty:ListInvitations,
guardduty:AcceptInvitation,
guardduty:GetMasterAccount

Read

guardduty:GetMasterAccount

Delete

guardduty:DisassociateFromMasterAccount

List

guardduty:GetMasterAccount