Skip to main content

primary_emails

Creates, updates, deletes, gets or lists a primary_emails resource.

Overview

Nameprimary_emails
TypeResource
Idaws.account.primary_emails

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
primary_emailstringRetrieves the primary email address associated with the specified account.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_primary_emailselectregionRetrieves the primary email address for the specified account.
accept_primary_email_updateexecregion, AccountId, PrimaryEmail, OtpAccepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known as the root user email address) for the specified account.
start_primary_email_updateexecregion, AccountId, PrimaryEmailStarts the process to update the primary email address for the specified 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves the primary email address for the specified account.

SELECT
primary_email
FROM aws.account.primary_emails
WHERE region = '{{ region }}' -- required
;

Lifecycle Methods

Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known as the root user email address) for the specified account.

EXEC aws.account.primary_emails.accept_primary_email_update
@region='{{ region }}' --required
@@json=
'{
"AccountId": "{{ AccountId }}",
"PrimaryEmail": "{{ PrimaryEmail }}",
"Otp": "{{ Otp }}"
}'
;