invitations
Creates, updates, deletes, gets or lists an invitations resource.
Overview
| Name | invitations |
| Type | Resource |
| Id | aws.guardduty.invitations |
Fields
The following fields are returned by SELECT queries:
- list_invitations
| Name | Datatype | Description |
|---|---|---|
account_id | string | The ID of the account that the invitation was sent from. |
invitation_id | string | The ID of the invitation. This value is used to validate the inviter 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 inviter and invitee accounts. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_invitations | select | region | maxResults, nextToken | Lists all GuardDuty membership invitations that were sent to the current Amazon Web Services account. |
delete_invitations | delete | region | Deletes invitations sent to the current member account by Amazon Web Services accounts specified by their account IDs. | |
accept_administrator_invitation | exec | detector_id, region, AdministratorId, InvitationId | Accepts the invitation to be a member account and get monitored by a GuardDuty administrator account that sent the invitation. | |
accept_invitation | exec | detector_id, region, MasterId, InvitationId | Accepts the invitation to be monitored by a GuardDuty administrator account. | |
decline_invitations | exec | region, AccountIds | Declines invitations sent to the current member account by Amazon Web Services accounts specified by their account IDs. |
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. To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | You can use this parameter to indicate the maximum number of items that you want in the response. The default value is 50. The maximum value is 50. |
nextToken | string | You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the list action. For subsequent calls to the action, fill nextToken in the request with the value of NextToken from the previous response to continue listing data. |
SELECT examples
- list_invitations
Lists all GuardDuty membership invitations that were sent to the current Amazon Web Services account.
SELECT
account_id,
invitation_id,
invited_at,
relationship_status
FROM aws.guardduty.invitations
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
DELETE examples
- delete_invitations
Deletes invitations sent to the current member account by Amazon Web Services accounts specified by their account IDs.
DELETE FROM aws.guardduty.invitations
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- accept_administrator_invitation
- accept_invitation
- decline_invitations
Accepts the invitation to be a member account and get monitored by a GuardDuty administrator account that sent the invitation.
EXEC aws.guardduty.invitations.accept_administrator_invitation
@detector_id='{{ detector_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"AdministratorId": "{{ AdministratorId }}",
"InvitationId": "{{ InvitationId }}"
}'
;
Accepts the invitation to be monitored by a GuardDuty administrator account.
EXEC aws.guardduty.invitations.accept_invitation
@detector_id='{{ detector_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"MasterId": "{{ MasterId }}",
"InvitationId": "{{ InvitationId }}"
}'
;
Declines invitations sent to the current member account by Amazon Web Services accounts specified by their account IDs.
EXEC aws.guardduty.invitations.decline_invitations
@region='{{ region }}' --required
@@json=
'{
"AccountIds": "{{ AccountIds }}"
}'
;