Skip to main content

invitations

Creates, updates, deletes, gets or lists an invitations resource.

Overview

Nameinvitations
TypeResource
Idaws.macie2.invitations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe Amazon Web Services account ID for the account that sent the invitation.
invitation_idstringThe unique identifier for the invitation.
invited_atstring (date-time)The date and time, in UTC and extended ISO 8601 format, when the invitation was sent.
relationship_statusstringThe status of the relationship between the account that sent the invitation and the account that received the invitation. (Enabled, Paused, Invited, Created, Removed, Resigned, EmailVerificationInProgress, EmailVerificationFailed, RegionDisabled, AccountSuspended)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_invitationsselectregionmaxResults, nextTokenRetrieves information about Amazon Macie membership invitations that were received by an account.
create_invitationsinsertregion, accountIdsSends an Amazon Macie membership invitation to one or more accounts.
delete_invitationsdeleteregionDeletes Amazon Macie membership invitations that were received from specific accounts.
accept_invitationexecregion, invitationIdAccepts an Amazon Macie membership invitation that was received from a specific account.
decline_invitationsexecregion, accountIdsDeclines Amazon Macie membership invitations that were received from specific accounts.

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
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of items to include in each page of a paginated response.
nextTokenstringThe nextToken string that specifies which page of results to return in a paginated response.

SELECT examples

Retrieves information about Amazon Macie membership invitations that were received by an account.

SELECT
account_id,
invitation_id,
invited_at,
relationship_status
FROM aws.macie2.invitations
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;

INSERT examples

Sends an Amazon Macie membership invitation to one or more accounts.

INSERT INTO aws.macie2.invitations (
accountIds,
disableEmailNotification,
message,
region
)
SELECT
'{{ accountIds }}' /* required */,
{{ disableEmailNotification }},
'{{ message }}',
'{{ region }}'
RETURNING
unprocessed_accounts
;

DELETE examples

Deletes Amazon Macie membership invitations that were received from specific accounts.

DELETE FROM aws.macie2.invitations
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Accepts an Amazon Macie membership invitation that was received from a specific account.

EXEC aws.macie2.invitations.accept_invitation
@region='{{ region }}' --required
@@json=
'{
"administratorAccountId": "{{ administratorAccountId }}",
"invitationId": "{{ invitationId }}",
"masterAccount": "{{ masterAccount }}"
}'
;