Struct aws_sdk_pinpointemail::client::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Client for Amazon Pinpoint Email Service

Client for invoking operations on Amazon Pinpoint Email Service. Each operation on Amazon Pinpoint Email Service is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

§Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_pinpointemail::Client::new(&config);

Occasionally, SDKs may have additional service-specific values that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Config struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_pinpointemail::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

§Using the Client

A client has a function for every operation that can be performed by the service. For example, the CreateConfigurationSet operation has a Client::create_configuration_set, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.create_configuration_set()
    .configuration_set_name("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

source§

impl Client

source

pub fn create_configuration_set(&self) -> CreateConfigurationSetFluentBuilder

Constructs a fluent builder for the CreateConfigurationSet operation.

source§

impl Client

source

pub fn create_configuration_set_event_destination( &self ) -> CreateConfigurationSetEventDestinationFluentBuilder

Constructs a fluent builder for the CreateConfigurationSetEventDestination operation.

source§

impl Client

source

pub fn create_dedicated_ip_pool(&self) -> CreateDedicatedIpPoolFluentBuilder

Constructs a fluent builder for the CreateDedicatedIpPool operation.

source§

impl Client

source

pub fn create_deliverability_test_report( &self ) -> CreateDeliverabilityTestReportFluentBuilder

Constructs a fluent builder for the CreateDeliverabilityTestReport operation.

source§

impl Client

source

pub fn create_email_identity(&self) -> CreateEmailIdentityFluentBuilder

Constructs a fluent builder for the CreateEmailIdentity operation.

source§

impl Client

source

pub fn delete_configuration_set(&self) -> DeleteConfigurationSetFluentBuilder

Constructs a fluent builder for the DeleteConfigurationSet operation.

source§

impl Client

source

pub fn delete_configuration_set_event_destination( &self ) -> DeleteConfigurationSetEventDestinationFluentBuilder

Constructs a fluent builder for the DeleteConfigurationSetEventDestination operation.

source§

impl Client

source

pub fn delete_dedicated_ip_pool(&self) -> DeleteDedicatedIpPoolFluentBuilder

Constructs a fluent builder for the DeleteDedicatedIpPool operation.

source§

impl Client

source

pub fn delete_email_identity(&self) -> DeleteEmailIdentityFluentBuilder

Constructs a fluent builder for the DeleteEmailIdentity operation.

source§

impl Client

source

pub fn get_account(&self) -> GetAccountFluentBuilder

Constructs a fluent builder for the GetAccount operation.

  • The fluent builder takes no input, just send it.
  • On success, responds with GetAccountOutput with field(s):
    • send_quota(Option<SendQuota>):

      An object that contains information about the per-day and per-second sending limits for your Amazon Pinpoint account in the current AWS Region.

    • sending_enabled(bool):

      Indicates whether or not email sending is enabled for your Amazon Pinpoint account in the current AWS Region.

    • dedicated_ip_auto_warmup_enabled(bool):

      Indicates whether or not the automatic warm-up feature is enabled for dedicated IP addresses that are associated with your account.

    • enforcement_status(Option<String>):

      The reputation status of your Amazon Pinpoint account. The status can be one of the following:

      • HEALTHY – There are no reputation-related issues that currently impact your account.

      • PROBATION – We’ve identified some issues with your Amazon Pinpoint account. We’re placing your account under review while you work on correcting these issues.

      • SHUTDOWN – Your account’s ability to send email is currently paused because of an issue with the email sent from your account. When you correct the issue, you can contact us and request that your account’s ability to send email is resumed.

    • production_access_enabled(bool):

      Indicates whether or not your account has production access in the current AWS Region.

      If the value is false, then your account is in the sandbox. When your account is in the sandbox, you can only send email to verified identities. Additionally, the maximum number of emails you can send in a 24-hour period (your sending quota) is 200, and the maximum number of emails you can send per second (your maximum sending rate) is 1.

      If the value is true, then your account has production access. When your account has production access, you can send email to any address. The sending quota and maximum sending rate for your account vary based on your specific use case.

  • On failure, responds with SdkError<GetAccountError>
source§

impl Client

source

pub fn get_blacklist_reports(&self) -> GetBlacklistReportsFluentBuilder

Constructs a fluent builder for the GetBlacklistReports operation.

source§

impl Client

source

pub fn get_configuration_set(&self) -> GetConfigurationSetFluentBuilder

Constructs a fluent builder for the GetConfigurationSet operation.

source§

impl Client

source

pub fn get_configuration_set_event_destinations( &self ) -> GetConfigurationSetEventDestinationsFluentBuilder

Constructs a fluent builder for the GetConfigurationSetEventDestinations operation.

source§

impl Client

source

pub fn get_dedicated_ip(&self) -> GetDedicatedIpFluentBuilder

Constructs a fluent builder for the GetDedicatedIp operation.

source§

impl Client

source

pub fn get_dedicated_ips(&self) -> GetDedicatedIpsFluentBuilder

Constructs a fluent builder for the GetDedicatedIps operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn get_deliverability_dashboard_options( &self ) -> GetDeliverabilityDashboardOptionsFluentBuilder

Constructs a fluent builder for the GetDeliverabilityDashboardOptions operation.

source§

impl Client

source

pub fn get_deliverability_test_report( &self ) -> GetDeliverabilityTestReportFluentBuilder

Constructs a fluent builder for the GetDeliverabilityTestReport operation.

source§

impl Client

source

pub fn get_domain_deliverability_campaign( &self ) -> GetDomainDeliverabilityCampaignFluentBuilder

Constructs a fluent builder for the GetDomainDeliverabilityCampaign operation.

source§

impl Client

source

pub fn get_domain_statistics_report( &self ) -> GetDomainStatisticsReportFluentBuilder

Constructs a fluent builder for the GetDomainStatisticsReport operation.

source§

impl Client

source

pub fn get_email_identity(&self) -> GetEmailIdentityFluentBuilder

Constructs a fluent builder for the GetEmailIdentity operation.

  • The fluent builder is configurable:
  • On success, responds with GetEmailIdentityOutput with field(s):
    • identity_type(Option<IdentityType>):

      The email identity type.

    • feedback_forwarding_status(bool):

      The feedback forwarding configuration for the identity.

      If the value is true, Amazon Pinpoint sends you email notifications when bounce or complaint events occur. Amazon Pinpoint sends this notification to the address that you specified in the Return-Path header of the original email.

      When you set this value to false, Amazon Pinpoint sends notifications through other mechanisms, such as by notifying an Amazon SNS topic or another event destination. You’re required to have a method of tracking bounces and complaints. If you haven’t set up another mechanism for receiving bounce or complaint notifications, Amazon Pinpoint sends an email notification when these events occur (even if this setting is disabled).

    • verified_for_sending_status(bool):

      Specifies whether or not the identity is verified. In Amazon Pinpoint, you can only send email from verified email addresses or domains. For more information about verifying identities, see the Amazon Pinpoint User Guide.

    • dkim_attributes(Option<DkimAttributes>):

      An object that contains information about the DKIM attributes for the identity. This object includes the tokens that you use to create the CNAME records that are required to complete the DKIM verification process.

    • mail_from_attributes(Option<MailFromAttributes>):

      An object that contains information about the Mail-From attributes for the email identity.

    • tags(Option<Vec::<Tag>>):

      An array of objects that define the tags (keys and values) that are associated with the email identity.

  • On failure, responds with SdkError<GetEmailIdentityError>
source§

impl Client

source

pub fn list_configuration_sets(&self) -> ListConfigurationSetsFluentBuilder

Constructs a fluent builder for the ListConfigurationSets operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_dedicated_ip_pools(&self) -> ListDedicatedIpPoolsFluentBuilder

Constructs a fluent builder for the ListDedicatedIpPools operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_deliverability_test_reports( &self ) -> ListDeliverabilityTestReportsFluentBuilder

Constructs a fluent builder for the ListDeliverabilityTestReports operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_domain_deliverability_campaigns( &self ) -> ListDomainDeliverabilityCampaignsFluentBuilder

Constructs a fluent builder for the ListDomainDeliverabilityCampaigns operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_email_identities(&self) -> ListEmailIdentitiesFluentBuilder

Constructs a fluent builder for the ListEmailIdentities operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_tags_for_resource(&self) -> ListTagsForResourceFluentBuilder

Constructs a fluent builder for the ListTagsForResource operation.

source§

impl Client

source

pub fn put_account_dedicated_ip_warmup_attributes( &self ) -> PutAccountDedicatedIpWarmupAttributesFluentBuilder

Constructs a fluent builder for the PutAccountDedicatedIpWarmupAttributes operation.

source§

impl Client

source

pub fn put_account_sending_attributes( &self ) -> PutAccountSendingAttributesFluentBuilder

Constructs a fluent builder for the PutAccountSendingAttributes operation.

source§

impl Client

source

pub fn put_configuration_set_delivery_options( &self ) -> PutConfigurationSetDeliveryOptionsFluentBuilder

Constructs a fluent builder for the PutConfigurationSetDeliveryOptions operation.

source§

impl Client

source

pub fn put_configuration_set_reputation_options( &self ) -> PutConfigurationSetReputationOptionsFluentBuilder

Constructs a fluent builder for the PutConfigurationSetReputationOptions operation.

source§

impl Client

source

pub fn put_configuration_set_sending_options( &self ) -> PutConfigurationSetSendingOptionsFluentBuilder

Constructs a fluent builder for the PutConfigurationSetSendingOptions operation.

source§

impl Client

source

pub fn put_configuration_set_tracking_options( &self ) -> PutConfigurationSetTrackingOptionsFluentBuilder

Constructs a fluent builder for the PutConfigurationSetTrackingOptions operation.

source§

impl Client

source

pub fn put_dedicated_ip_in_pool(&self) -> PutDedicatedIpInPoolFluentBuilder

Constructs a fluent builder for the PutDedicatedIpInPool operation.

source§

impl Client

source

pub fn put_dedicated_ip_warmup_attributes( &self ) -> PutDedicatedIpWarmupAttributesFluentBuilder

Constructs a fluent builder for the PutDedicatedIpWarmupAttributes operation.

source§

impl Client

source

pub fn put_deliverability_dashboard_option( &self ) -> PutDeliverabilityDashboardOptionFluentBuilder

Constructs a fluent builder for the PutDeliverabilityDashboardOption operation.

source§

impl Client

source

pub fn put_email_identity_dkim_attributes( &self ) -> PutEmailIdentityDkimAttributesFluentBuilder

Constructs a fluent builder for the PutEmailIdentityDkimAttributes operation.

source§

impl Client

source

pub fn put_email_identity_feedback_attributes( &self ) -> PutEmailIdentityFeedbackAttributesFluentBuilder

Constructs a fluent builder for the PutEmailIdentityFeedbackAttributes operation.

  • The fluent builder is configurable:
    • email_identity(impl Into<String>) / set_email_identity(Option<String>):
      required: true

      The email identity that you want to configure bounce and complaint feedback forwarding for.


    • email_forwarding_enabled(bool) / set_email_forwarding_enabled(Option<bool>):
      required: false

      Sets the feedback forwarding configuration for the identity.

      If the value is true, Amazon Pinpoint sends you email notifications when bounce or complaint events occur. Amazon Pinpoint sends this notification to the address that you specified in the Return-Path header of the original email.

      When you set this value to false, Amazon Pinpoint sends notifications through other mechanisms, such as by notifying an Amazon SNS topic or another event destination. You’re required to have a method of tracking bounces and complaints. If you haven’t set up another mechanism for receiving bounce or complaint notifications, Amazon Pinpoint sends an email notification when these events occur (even if this setting is disabled).


  • On success, responds with PutEmailIdentityFeedbackAttributesOutput
  • On failure, responds with SdkError<PutEmailIdentityFeedbackAttributesError>
source§

impl Client

source

pub fn put_email_identity_mail_from_attributes( &self ) -> PutEmailIdentityMailFromAttributesFluentBuilder

Constructs a fluent builder for the PutEmailIdentityMailFromAttributes operation.

source§

impl Client

source

pub fn send_email(&self) -> SendEmailFluentBuilder

Constructs a fluent builder for the SendEmail operation.

source§

impl Client

source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

source§

impl Client

source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

source§

impl Client

source

pub fn update_configuration_set_event_destination( &self ) -> UpdateConfigurationSetEventDestinationFluentBuilder

Constructs a fluent builder for the UpdateConfigurationSetEventDestination operation.

source§

impl Client

source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

§Panics

This method will panic in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

source

pub fn config(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

§Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more