create_contact
async
¶
create_contact(
contact_list_name: ContactListName,
email_address: EmailAddress,
*,
config_overrides: Optional[AsyncSESv2ClientConfig] = None,
topic_preferences: Optional[TopicPreferenceList] = None,
unsubscribe_all: Optional[UnsubscribeAll] = None,
attributes_data: Optional[AttributesData] = None,
) -> CreateContactResponse
Creates a contact, which is an end-user who is receiving the email, and adds them to a contact list.
Parameters:
-
contact_list_name(ContactListName) –The name of the contact list to which the contact should be added.
-
email_address(EmailAddress) –The contact's email address.
-
topic_preferences(Optional[TopicPreferenceList], default:None) –The contact's preferences for being opted-in to or opted-out of topics.
-
unsubscribe_all(Optional[UnsubscribeAll], default:None) –A boolean value status noting if the contact is unsubscribed from all contact list topics.
-
attributes_data(Optional[AttributesData], default:None) –The attribute data attached to a contact.
Raises:
-
AlreadyExistsException–The resource specified in your request already exists.
-
BadRequestException–The input you provided is invalid.
-
NotFoundException–The resource you attempted to access doesn't exist.
-
TooManyRequestsException–Too many requests have been made to the operation.
-
UnknownServiceError–The service returned an error code this client does not model.