masters
Creates, updates, deletes or gets a master
resource or lists masters
in a region
Overview
Name | masters |
Type | Resource |
Description | GuardDuty Master resource schema |
Id | aws.guardduty.masters |
Fields
Name | Datatype | Description |
---|---|---|
master_id | string | ID of the account used as the master account. |
invitation_id | string | Value used to validate the master account to the member account. |
detector_id | string | Unique ID of the detector of the GuardDuty member account. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | MasterId, DetectorId, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.guardduty.masters (
MasterId,
DetectorId,
region
)
SELECT
'{{ MasterId }}',
'{{ DetectorId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.guardduty.masters (
MasterId,
InvitationId,
DetectorId,
region
)
SELECT
'{{ MasterId }}',
'{{ InvitationId }}',
'{{ DetectorId }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: master
props:
- name: MasterId
value: '{{ MasterId }}'
- name: InvitationId
value: '{{ InvitationId }}'
- name: DetectorId
value: '{{ DetectorId }}'
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