clients/client-pinpoint-email/README.md
AWS SDK for JavaScript PinpointEmail Client for Node.js, Browser and React Native.
<fullname>Amazon Pinpoint Email Service</fullname>
<p>Welcome to the <i>Amazon Pinpoint Email API Reference</i>. This guide provides information about the Amazon Pinpoint Email API (version 1.0), including supported operations, data types, parameters, and schemas.</p> <p> <a href="https://aws.amazon.com/pinpoint">Amazon Pinpoint</a> is an AWS service that you can use to engage with your customers across multiple messaging channels. You can use Amazon Pinpoint to send email, SMS text messages, voice messages, and push notifications. The Amazon Pinpoint Email API provides programmatic access to options that are unique to the email channel and supplement the options provided by the Amazon Pinpoint API.</p> <p>If you're new to Amazon Pinpoint, you might find it helpful to also review the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html">Amazon Pinpoint Developer Guide</a>. The <i>Amazon Pinpoint Developer Guide</i> provides tutorials, code samples, and procedures that demonstrate how to use Amazon Pinpoint features programmatically and how to integrate Amazon Pinpoint functionality into mobile apps and other types of applications. The guide also provides information about key topics such as Amazon Pinpoint integration with other AWS services and the limits that apply to using the service.</p> <p>The Amazon Pinpoint Email API is available in several AWS Regions and it provides an endpoint for each of these Regions. For a list of all the Regions and endpoints where the API is currently available, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#pinpoint_region">AWS Service Endpoints</a> in the <i>Amazon Web Services General Reference</i>. To learn more about AWS Regions, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande-manage.html">Managing AWS Regions</a> in the <i>Amazon Web Services General Reference</i>.</p> <p>In each Region, AWS maintains multiple Availability Zones. These Availability Zones are physically isolated from each other, but are united by private, low-latency, high-throughput, and highly redundant network connections. These Availability Zones enable us to provide very high levels of availability and redundancy, while also minimizing latency. To learn more about the number of Availability Zones that are available in each Region, see <a href="http://aws.amazon.com/about-aws/global-infrastructure/">AWS Global Infrastructure</a>.</p>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-pinpoint-emailyarn add @aws-sdk/client-pinpoint-emailpnpm add @aws-sdk/client-pinpoint-emailThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the PinpointEmailClient and
the commands you need, for example ListConfigurationSetsCommand:
// ES5 example
const { PinpointEmailClient, ListConfigurationSetsCommand } = require("@aws-sdk/client-pinpoint-email");
// ES6+ example
import { PinpointEmailClient, ListConfigurationSetsCommand } from "@aws-sdk/client-pinpoint-email";
To send a request:
send operation on the client, providing the command object as input.const client = new PinpointEmailClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListConfigurationSetsCommand(params);
We recommend using the await operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
The aggregated client class is exported from the same package, but without the "Client" suffix.
PinpointEmail extends PinpointEmailClient and additionally supports all operations, waiters, and paginators as methods.
This style may be familiar to you from the AWS SDK for JavaScript v2.
If you are bundling the AWS SDK, we recommend using only the bare-bones client (PinpointEmailClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { PinpointEmail } from "@aws-sdk/client-pinpoint-email";
const client = new PinpointEmail({ region: "REGION" });
// async/await.
try {
const data = await client.listConfigurationSets(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listConfigurationSets(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listConfigurationSets(params, (err, data) => {
// process err and data.
});
When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
See also docs/ERROR_HANDLING.
Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
aws-sdk-js
on AWS Developer Blog.aws-sdk-js.To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-pinpoint-email package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Command API Reference / Input / Output
</details> <details> <summary> CreateConfigurationSetEventDestination </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateDedicatedIpPool </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateDeliverabilityTestReport </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateEmailIdentity </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteConfigurationSet </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteConfigurationSetEventDestination </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteDedicatedIpPool </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteEmailIdentity </summary>Command API Reference / Input / Output
</details> <details> <summary> GetAccount </summary>Command API Reference / Input / Output
</details> <details> <summary> GetBlacklistReports </summary>Command API Reference / Input / Output
</details> <details> <summary> GetConfigurationSet </summary>Command API Reference / Input / Output
</details> <details> <summary> GetConfigurationSetEventDestinations </summary>Command API Reference / Input / Output
</details> <details> <summary> GetDedicatedIp </summary>Command API Reference / Input / Output
</details> <details> <summary> GetDedicatedIps </summary>Command API Reference / Input / Output
</details> <details> <summary> GetDeliverabilityDashboardOptions </summary>Command API Reference / Input / Output
</details> <details> <summary> GetDeliverabilityTestReport </summary>Command API Reference / Input / Output
</details> <details> <summary> GetDomainDeliverabilityCampaign </summary>Command API Reference / Input / Output
</details> <details> <summary> GetDomainStatisticsReport </summary>Command API Reference / Input / Output
</details> <details> <summary> GetEmailIdentity </summary>Command API Reference / Input / Output
</details> <details> <summary> ListConfigurationSets </summary>Command API Reference / Input / Output
</details> <details> <summary> ListDedicatedIpPools </summary>Command API Reference / Input / Output
</details> <details> <summary> ListDeliverabilityTestReports </summary>Command API Reference / Input / Output
</details> <details> <summary> ListDomainDeliverabilityCampaigns </summary>Command API Reference / Input / Output
</details> <details> <summary> ListEmailIdentities </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> PutAccountDedicatedIpWarmupAttributes </summary>Command API Reference / Input / Output
</details> <details> <summary> PutAccountSendingAttributes </summary>Command API Reference / Input / Output
</details> <details> <summary> PutConfigurationSetDeliveryOptions </summary>Command API Reference / Input / Output
</details> <details> <summary> PutConfigurationSetReputationOptions </summary>Command API Reference / Input / Output
</details> <details> <summary> PutConfigurationSetSendingOptions </summary>Command API Reference / Input / Output
</details> <details> <summary> PutConfigurationSetTrackingOptions </summary>Command API Reference / Input / Output
</details> <details> <summary> PutDedicatedIpInPool </summary>Command API Reference / Input / Output
</details> <details> <summary> PutDedicatedIpWarmupAttributes </summary>Command API Reference / Input / Output
</details> <details> <summary> PutDeliverabilityDashboardOption </summary>Command API Reference / Input / Output
</details> <details> <summary> PutEmailIdentityDkimAttributes </summary>Command API Reference / Input / Output
</details> <details> <summary> PutEmailIdentityFeedbackAttributes </summary>Command API Reference / Input / Output
</details> <details> <summary> PutEmailIdentityMailFromAttributes </summary>Command API Reference / Input / Output
</details> <details> <summary> SendEmail </summary>Command API Reference / Input / Output
</details> <details> <summary> TagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UntagResource </summary> </details> <details> <summary> UpdateConfigurationSetEventDestination </summary> </details>