administrator_accounts
Creates, updates, deletes, gets or lists an administrator_accounts resource.
Overview
| Name | administrator_accounts |
| Type | Resource |
| Id | aws.guardduty.administrator_accounts |
Fields
The following fields are returned by SELECT queries:
- get_administrator_account
| Name | Datatype | Description |
|---|---|---|
account_id | string | The ID of the account used as the administrator account. |
invitation_id | string | The value that is 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_administrator_account | select | detector_id, region | Provides the details of the GuardDuty administrator account associated with the current GuardDuty member account. Based on the type of account that runs this API, the following list shows how the API behavior varies: When the GuardDuty administrator account runs this API, it will return success (HTTP 200) but no content. When a member account runs this API, it will return the details of the GuardDuty administrator account that is associated with this calling member account. When an individual account (not associated with an organization) runs this API, it will return success (HTTP 200) but no content. | |
disassociate_from_administrator_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. With autoEnableOrganizationMembers configuration for your organization set to ALL, you'll receive an error if you attempt to disable GuardDuty in a member account. |
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_administrator_account
Provides the details of the GuardDuty administrator account associated with the current GuardDuty member account. Based on the type of account that runs this API, the following list shows how the API behavior varies: When the GuardDuty administrator account runs this API, it will return success (HTTP 200) but no content. When a member account runs this API, it will return the details of the GuardDuty administrator account that is associated with this calling member account. When an individual account (not associated with an organization) runs this API, it will return success (HTTP 200) but no content.
SELECT
account_id,
invitation_id,
invited_at,
relationship_status
FROM aws.guardduty.administrator_accounts
WHERE detector_id = '{{ detector_id }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- disassociate_from_administrator_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. With autoEnableOrganizationMembers configuration for your organization set to ALL, you'll receive an error if you attempt to disable GuardDuty in a member account.
UPDATE aws.guardduty.administrator_accounts
SET
-- No updatable properties
WHERE
detector_id = '{{ detector_id }}' --required
AND region = '{{ region }}' --required;