Skip to content

SESV2Client#

Index > SESV2 > SESV2Client

Auto-generated documentation for SESV2 type annotations stubs module mypy-boto3-sesv2.

SESV2Client#

Type annotations and code completion for boto3.client("sesv2"). boto3 documentation

# SESV2Client usage example

from boto3.session import Session
from mypy_boto3_sesv2.client import SESV2Client

def get_sesv2_client() -> SESV2Client:
    return Session().client("sesv2")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("sesv2").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("sesv2")

try:
    do_something(client)
except (
    client.exceptions.AccountSuspendedException,
    client.exceptions.AlreadyExistsException,
    client.exceptions.BadRequestException,
    client.exceptions.ClientError,
    client.exceptions.ConcurrentModificationException,
    client.exceptions.ConflictException,
    client.exceptions.InternalServiceErrorException,
    client.exceptions.InvalidNextTokenException,
    client.exceptions.LimitExceededException,
    client.exceptions.MailFromDomainNotVerifiedException,
    client.exceptions.MessageRejected,
    client.exceptions.NotFoundException,
    client.exceptions.SendingPausedException,
    client.exceptions.TooManyRequestsException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_sesv2.client import Exceptions

def handle_error(exc: Exceptions.AccountSuspendedException) -> None:
    ...

Methods#

batch_get_metric_data#

Retrieves batches of metric data collected based on your sending activity.

Type annotations and code completion for boto3.client("sesv2").batch_get_metric_data method. boto3 documentation

# batch_get_metric_data method definition

def batch_get_metric_data(
    self,
    *,
    Queries: Sequence[BatchGetMetricDataQueryTypeDef],  # (1)
) -> BatchGetMetricDataResponseTypeDef:  # (2)
    ...
  1. See BatchGetMetricDataQueryTypeDef
  2. See BatchGetMetricDataResponseTypeDef
# batch_get_metric_data method usage example with argument unpacking

kwargs: BatchGetMetricDataRequestRequestTypeDef = {  # (1)
    "Queries": ...,
}

parent.batch_get_metric_data(**kwargs)
  1. See BatchGetMetricDataRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("sesv2").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

cancel_export_job#

Cancels an export job.

Type annotations and code completion for boto3.client("sesv2").cancel_export_job method. boto3 documentation

# cancel_export_job method definition

def cancel_export_job(
    self,
    *,
    JobId: str,
) -> Dict[str, Any]:
    ...
# cancel_export_job method usage example with argument unpacking

kwargs: CancelExportJobRequestRequestTypeDef = {  # (1)
    "JobId": ...,
}

parent.cancel_export_job(**kwargs)
  1. See CancelExportJobRequestRequestTypeDef

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("sesv2").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_configuration_set#

Create a configuration set.

Type annotations and code completion for boto3.client("sesv2").create_configuration_set method. boto3 documentation

# create_configuration_set method definition

def create_configuration_set(
    self,
    *,
    ConfigurationSetName: str,
    TrackingOptions: TrackingOptionsTypeDef = ...,  # (1)
    DeliveryOptions: DeliveryOptionsTypeDef = ...,  # (2)
    ReputationOptions: ReputationOptionsTypeDef = ...,  # (3)
    SendingOptions: SendingOptionsTypeDef = ...,  # (4)
    Tags: Sequence[TagTypeDef] = ...,  # (5)
    SuppressionOptions: SuppressionOptionsTypeDef = ...,  # (6)
    VdmOptions: VdmOptionsTypeDef = ...,  # (7)
) -> Dict[str, Any]:
    ...
  1. See TrackingOptionsTypeDef
  2. See DeliveryOptionsTypeDef
  3. See ReputationOptionsTypeDef
  4. See SendingOptionsTypeDef
  5. See TagTypeDef
  6. See SuppressionOptionsTypeDef
  7. See VdmOptionsTypeDef
# create_configuration_set method usage example with argument unpacking

kwargs: CreateConfigurationSetRequestRequestTypeDef = {  # (1)
    "ConfigurationSetName": ...,
}

parent.create_configuration_set(**kwargs)
  1. See CreateConfigurationSetRequestRequestTypeDef

create_configuration_set_event_destination#

Create an event destination.

Type annotations and code completion for boto3.client("sesv2").create_configuration_set_event_destination method. boto3 documentation

# create_configuration_set_event_destination method definition

def create_configuration_set_event_destination(
    self,
    *,
    ConfigurationSetName: str,
    EventDestinationName: str,
    EventDestination: EventDestinationDefinitionTypeDef,  # (1)
) -> Dict[str, Any]:
    ...
  1. See EventDestinationDefinitionTypeDef
# create_configuration_set_event_destination method usage example with argument unpacking

kwargs: CreateConfigurationSetEventDestinationRequestRequestTypeDef = {  # (1)
    "ConfigurationSetName": ...,
    "EventDestinationName": ...,
    "EventDestination": ...,
}

parent.create_configuration_set_event_destination(**kwargs)
  1. See CreateConfigurationSetEventDestinationRequestRequestTypeDef

create_contact#

Creates a contact, which is an end-user who is receiving the email, and adds them to a contact list.

Type annotations and code completion for boto3.client("sesv2").create_contact method. boto3 documentation

# create_contact method definition

def create_contact(
    self,
    *,
    ContactListName: str,
    EmailAddress: str,
    TopicPreferences: Sequence[TopicPreferenceTypeDef] = ...,  # (1)
    UnsubscribeAll: bool = ...,
    AttributesData: str = ...,
) -> Dict[str, Any]:
    ...
  1. See TopicPreferenceTypeDef
# create_contact method usage example with argument unpacking

kwargs: CreateContactRequestRequestTypeDef = {  # (1)
    "ContactListName": ...,
    "EmailAddress": ...,
}

parent.create_contact(**kwargs)
  1. See CreateContactRequestRequestTypeDef

create_contact_list#

Creates a contact list.

Type annotations and code completion for boto3.client("sesv2").create_contact_list method. boto3 documentation

# create_contact_list method definition

def create_contact_list(
    self,
    *,
    ContactListName: str,
    Topics: Sequence[TopicTypeDef] = ...,  # (1)
    Description: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> Dict[str, Any]:
    ...
  1. See TopicTypeDef
  2. See TagTypeDef
# create_contact_list method usage example with argument unpacking

kwargs: CreateContactListRequestRequestTypeDef = {  # (1)
    "ContactListName": ...,
}

parent.create_contact_list(**kwargs)
  1. See CreateContactListRequestRequestTypeDef

create_custom_verification_email_template#

Creates a new custom verification email template.

Type annotations and code completion for boto3.client("sesv2").create_custom_verification_email_template method. boto3 documentation

# create_custom_verification_email_template method definition

def create_custom_verification_email_template(
    self,
    *,
    TemplateName: str,
    FromEmailAddress: str,
    TemplateSubject: str,
    TemplateContent: str,
    SuccessRedirectionURL: str,
    FailureRedirectionURL: str,
) -> Dict[str, Any]:
    ...
# create_custom_verification_email_template method usage example with argument unpacking

kwargs: CreateCustomVerificationEmailTemplateRequestRequestTypeDef = {  # (1)
    "TemplateName": ...,
    "FromEmailAddress": ...,
    "TemplateSubject": ...,
    "TemplateContent": ...,
    "SuccessRedirectionURL": ...,
    "FailureRedirectionURL": ...,
}

parent.create_custom_verification_email_template(**kwargs)
  1. See CreateCustomVerificationEmailTemplateRequestRequestTypeDef

create_dedicated_ip_pool#

Create a new pool of dedicated IP addresses.

Type annotations and code completion for boto3.client("sesv2").create_dedicated_ip_pool method. boto3 documentation

# create_dedicated_ip_pool method definition

def create_dedicated_ip_pool(
    self,
    *,
    PoolName: str,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
    ScalingMode: ScalingModeType = ...,  # (2)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
  2. See ScalingModeType
# create_dedicated_ip_pool method usage example with argument unpacking

kwargs: CreateDedicatedIpPoolRequestRequestTypeDef = {  # (1)
    "PoolName": ...,
}

parent.create_dedicated_ip_pool(**kwargs)
  1. See CreateDedicatedIpPoolRequestRequestTypeDef

create_deliverability_test_report#

Create a new predictive inbox placement test.

Type annotations and code completion for boto3.client("sesv2").create_deliverability_test_report method. boto3 documentation

# create_deliverability_test_report method definition

def create_deliverability_test_report(
    self,
    *,
    FromEmailAddress: str,
    Content: EmailContentTypeDef,  # (1)
    ReportName: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateDeliverabilityTestReportResponseTypeDef:  # (3)
    ...
  1. See EmailContentTypeDef
  2. See TagTypeDef
  3. See CreateDeliverabilityTestReportResponseTypeDef
# create_deliverability_test_report method usage example with argument unpacking

kwargs: CreateDeliverabilityTestReportRequestRequestTypeDef = {  # (1)
    "FromEmailAddress": ...,
    "Content": ...,
}

parent.create_deliverability_test_report(**kwargs)
  1. See CreateDeliverabilityTestReportRequestRequestTypeDef

create_email_identity#

Starts the process of verifying an email identity.

Type annotations and code completion for boto3.client("sesv2").create_email_identity method. boto3 documentation

# create_email_identity method definition

def create_email_identity(
    self,
    *,
    EmailIdentity: str,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
    DkimSigningAttributes: DkimSigningAttributesTypeDef = ...,  # (2)
    ConfigurationSetName: str = ...,
) -> CreateEmailIdentityResponseTypeDef:  # (3)
    ...
  1. See TagTypeDef
  2. See DkimSigningAttributesTypeDef
  3. See CreateEmailIdentityResponseTypeDef
# create_email_identity method usage example with argument unpacking

kwargs: CreateEmailIdentityRequestRequestTypeDef = {  # (1)
    "EmailIdentity": ...,
}

parent.create_email_identity(**kwargs)
  1. See CreateEmailIdentityRequestRequestTypeDef

create_email_identity_policy#

Creates the specified sending authorization policy for the given identity (an email address or a domain).

Type annotations and code completion for boto3.client("sesv2").create_email_identity_policy method. boto3 documentation

# create_email_identity_policy method definition

def create_email_identity_policy(
    self,
    *,
    EmailIdentity: str,
    PolicyName: str,
    Policy: str,
) -> Dict[str, Any]:
    ...
# create_email_identity_policy method usage example with argument unpacking

kwargs: CreateEmailIdentityPolicyRequestRequestTypeDef = {  # (1)
    "EmailIdentity": ...,
    "PolicyName": ...,
    "Policy": ...,
}

parent.create_email_identity_policy(**kwargs)
  1. See CreateEmailIdentityPolicyRequestRequestTypeDef

create_email_template#

Creates an email template.

Type annotations and code completion for boto3.client("sesv2").create_email_template method. boto3 documentation

# create_email_template method definition

def create_email_template(
    self,
    *,
    TemplateName: str,
    TemplateContent: EmailTemplateContentTypeDef,  # (1)
) -> Dict[str, Any]:
    ...
  1. See EmailTemplateContentTypeDef
# create_email_template method usage example with argument unpacking

kwargs: CreateEmailTemplateRequestRequestTypeDef = {  # (1)
    "TemplateName": ...,
    "TemplateContent": ...,
}

parent.create_email_template(**kwargs)
  1. See CreateEmailTemplateRequestRequestTypeDef

create_export_job#

Creates an export job for a data source and destination.

Type annotations and code completion for boto3.client("sesv2").create_export_job method. boto3 documentation

# create_export_job method definition

def create_export_job(
    self,
    *,
    ExportDataSource: ExportDataSourceTypeDef,  # (1)
    ExportDestination: ExportDestinationTypeDef,  # (2)
) -> CreateExportJobResponseTypeDef:  # (3)
    ...
  1. See ExportDataSourceTypeDef
  2. See ExportDestinationTypeDef
  3. See CreateExportJobResponseTypeDef
# create_export_job method usage example with argument unpacking

kwargs: CreateExportJobRequestRequestTypeDef = {  # (1)
    "ExportDataSource": ...,
    "ExportDestination": ...,
}

parent.create_export_job(**kwargs)
  1. See CreateExportJobRequestRequestTypeDef

create_import_job#

Creates an import job for a data destination.

Type annotations and code completion for boto3.client("sesv2").create_import_job method. boto3 documentation

# create_import_job method definition

def create_import_job(
    self,
    *,
    ImportDestination: ImportDestinationTypeDef,  # (1)
    ImportDataSource: ImportDataSourceTypeDef,  # (2)
) -> CreateImportJobResponseTypeDef:  # (3)
    ...
  1. See ImportDestinationTypeDef
  2. See ImportDataSourceTypeDef
  3. See CreateImportJobResponseTypeDef
# create_import_job method usage example with argument unpacking

kwargs: CreateImportJobRequestRequestTypeDef = {  # (1)
    "ImportDestination": ...,
    "ImportDataSource": ...,
}

parent.create_import_job(**kwargs)
  1. See CreateImportJobRequestRequestTypeDef

delete_configuration_set#

Delete an existing configuration set.

Type annotations and code completion for boto3.client("sesv2").delete_configuration_set method. boto3 documentation

# delete_configuration_set method definition

def delete_configuration_set(
    self,
    *,
    ConfigurationSetName: str,
) -> Dict[str, Any]:
    ...
# delete_configuration_set method usage example with argument unpacking

kwargs: DeleteConfigurationSetRequestRequestTypeDef = {  # (1)
    "ConfigurationSetName": ...,
}

parent.delete_configuration_set(**kwargs)
  1. See DeleteConfigurationSetRequestRequestTypeDef

delete_configuration_set_event_destination#

Delete an event destination.

Type annotations and code completion for boto3.client("sesv2").delete_configuration_set_event_destination method. boto3 documentation

# delete_configuration_set_event_destination method definition

def delete_configuration_set_event_destination(
    self,
    *,
    ConfigurationSetName: str,
    EventDestinationName: str,
) -> Dict[str, Any]:
    ...
# delete_configuration_set_event_destination method usage example with argument unpacking

kwargs: DeleteConfigurationSetEventDestinationRequestRequestTypeDef = {  # (1)
    "ConfigurationSetName": ...,
    "EventDestinationName": ...,
}

parent.delete_configuration_set_event_destination(**kwargs)
  1. See DeleteConfigurationSetEventDestinationRequestRequestTypeDef

delete_contact#

Removes a contact from a contact list.

Type annotations and code completion for boto3.client("sesv2").delete_contact method. boto3 documentation

# delete_contact method definition

def delete_contact(
    self,
    *,
    ContactListName: str,
    EmailAddress: str,
) -> Dict[str, Any]:
    ...
# delete_contact method usage example with argument unpacking

kwargs: DeleteContactRequestRequestTypeDef = {  # (1)
    "ContactListName": ...,
    "EmailAddress": ...,
}

parent.delete_contact(**kwargs)
  1. See DeleteContactRequestRequestTypeDef

delete_contact_list#

Deletes a contact list and all of the contacts on that list.

Type annotations and code completion for boto3.client("sesv2").delete_contact_list method. boto3 documentation

# delete_contact_list method definition

def delete_contact_list(
    self,
    *,
    ContactListName: str,
) -> Dict[str, Any]:
    ...
# delete_contact_list method usage example with argument unpacking

kwargs: DeleteContactListRequestRequestTypeDef = {  # (1)
    "ContactListName": ...,
}

parent.delete_contact_list(**kwargs)
  1. See DeleteContactListRequestRequestTypeDef

delete_custom_verification_email_template#

Deletes an existing custom verification email template.

Type annotations and code completion for boto3.client("sesv2").delete_custom_verification_email_template method. boto3 documentation

# delete_custom_verification_email_template method definition

def delete_custom_verification_email_template(
    self,
    *,
    TemplateName: str,
) -> Dict[str, Any]:
    ...
# delete_custom_verification_email_template method usage example with argument unpacking

kwargs: DeleteCustomVerificationEmailTemplateRequestRequestTypeDef = {  # (1)
    "TemplateName": ...,
}

parent.delete_custom_verification_email_template(**kwargs)
  1. See DeleteCustomVerificationEmailTemplateRequestRequestTypeDef

delete_dedicated_ip_pool#

Delete a dedicated IP pool.

Type annotations and code completion for boto3.client("sesv2").delete_dedicated_ip_pool method. boto3 documentation

# delete_dedicated_ip_pool method definition

def delete_dedicated_ip_pool(
    self,
    *,
    PoolName: str,
) -> Dict[str, Any]:
    ...
# delete_dedicated_ip_pool method usage example with argument unpacking

kwargs: DeleteDedicatedIpPoolRequestRequestTypeDef = {  # (1)
    "PoolName": ...,
}

parent.delete_dedicated_ip_pool(**kwargs)
  1. See DeleteDedicatedIpPoolRequestRequestTypeDef

delete_email_identity#

Deletes an email identity.

Type annotations and code completion for boto3.client("sesv2").delete_email_identity method. boto3 documentation

# delete_email_identity method definition

def delete_email_identity(
    self,
    *,
    EmailIdentity: str,
) -> Dict[str, Any]:
    ...
# delete_email_identity method usage example with argument unpacking

kwargs: DeleteEmailIdentityRequestRequestTypeDef = {  # (1)
    "EmailIdentity": ...,
}

parent.delete_email_identity(**kwargs)
  1. See DeleteEmailIdentityRequestRequestTypeDef

delete_email_identity_policy#

Deletes the specified sending authorization policy for the given identity (an email address or a domain).

Type annotations and code completion for boto3.client("sesv2").delete_email_identity_policy method. boto3 documentation

# delete_email_identity_policy method definition

def delete_email_identity_policy(
    self,
    *,
    EmailIdentity: str,
    PolicyName: str,
) -> Dict[str, Any]:
    ...
# delete_email_identity_policy method usage example with argument unpacking

kwargs: DeleteEmailIdentityPolicyRequestRequestTypeDef = {  # (1)
    "EmailIdentity": ...,
    "PolicyName": ...,
}

parent.delete_email_identity_policy(**kwargs)
  1. See DeleteEmailIdentityPolicyRequestRequestTypeDef

delete_email_template#

Deletes an email template.

Type annotations and code completion for boto3.client("sesv2").delete_email_template method. boto3 documentation

# delete_email_template method definition

def delete_email_template(
    self,
    *,
    TemplateName: str,
) -> Dict[str, Any]:
    ...
# delete_email_template method usage example with argument unpacking

kwargs: DeleteEmailTemplateRequestRequestTypeDef = {  # (1)
    "TemplateName": ...,
}

parent.delete_email_template(**kwargs)
  1. See DeleteEmailTemplateRequestRequestTypeDef

delete_suppressed_destination#

Removes an email address from the suppression list for your account.

Type annotations and code completion for boto3.client("sesv2").delete_suppressed_destination method. boto3 documentation

# delete_suppressed_destination method definition

def delete_suppressed_destination(
    self,
    *,
    EmailAddress: str,
) -> Dict[str, Any]:
    ...
# delete_suppressed_destination method usage example with argument unpacking

kwargs: DeleteSuppressedDestinationRequestRequestTypeDef = {  # (1)
    "EmailAddress": ...,
}

parent.delete_suppressed_destination(**kwargs)
  1. See