From 6e25eb339e2c228a4f4323dc997ba8d9d00f1cd6 Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Tue, 15 May 2012 16:43:52 -0700 Subject: [PATCH] 1.5.6 release. http://aws.amazon.com/releasenotes/7249478624028578 --- _docs/CHANGELOG.md | 12 ++ authentication/signature_v4query.class.php | 2 +- package.xml | 16 +-- sdk.class.php | 4 +- services/ses.class.php | 128 +++++++++++++++++++-- 5 files changed, 142 insertions(+), 20 deletions(-) diff --git a/_docs/CHANGELOG.md b/_docs/CHANGELOG.md index 83b91b1..3c93856 100644 --- a/_docs/CHANGELOG.md +++ b/_docs/CHANGELOG.md @@ -1,3 +1,15 @@ +# Changelog: 1.5.6 "Gershwin" +Code name for Apple's never-released successor to the never-released Copeland. + +Launched Tuesday, May 15th, 2012. + +## Services +### AmazonSES +- **New:** Support for domain verification has been added to the SDK, which enables customers to verify an entire email domain. +- **New:** Requests to this service are now signed with Signature V4. + +---- + # Changelog: 1.5.5 "Fishhead" Code name for the Apple II File Mangement Utility. diff --git a/authentication/signature_v4query.class.php b/authentication/signature_v4query.class.php index 91ad936..bd5a3fb 100644 --- a/authentication/signature_v4query.class.php +++ b/authentication/signature_v4query.class.php @@ -283,7 +283,7 @@ protected function region() protected function service() { $pieces = explode('.', $this->endpoint); - return $pieces[0]; + return ($pieces[0] === 'email') ? 'ses' : $pieces[0]; } /** diff --git a/package.xml b/package.xml index 637ea96..6e94193 100644 --- a/package.xml +++ b/package.xml @@ -10,11 +10,11 @@ rparman@amazon.com yes - 2012-05-09 - + 2012-05-15 + - 1.5.5 - 1.5.5 + 1.5.6 + 1.5.6 stable @@ -23,7 +23,7 @@ Apache 2.0 - - + @@ -39,14 +39,14 @@ - 1.5.5 - 1.5.5 + 1.5.6 + 1.5.6 stable stable - 2012-05-09 + 2012-05-15 Apache 2.0 - diff --git a/sdk.class.php b/sdk.class.php index b22eb9c..c0b5b02 100755 --- a/sdk.class.php +++ b/sdk.class.php @@ -115,8 +115,8 @@ function __aws_sdk_ua_callback() // INTERMEDIARY CONSTANTS define('CFRUNTIME_NAME', 'aws-sdk-php'); -define('CFRUNTIME_VERSION', '1.5.5'); -define('CFRUNTIME_BUILD', '20120509180000'); +define('CFRUNTIME_VERSION', 'Gershwin'); +define('CFRUNTIME_BUILD', '20120515180000'); define('CFRUNTIME_USERAGENT', CFRUNTIME_NAME . '/' . CFRUNTIME_VERSION . ' PHP/' . PHP_VERSION . ' ' . str_replace(' ', '_', php_uname('s')) . '/' . str_replace(' ', '_', php_uname('r')) . ' Arch/' . php_uname('m') . ' SAPI/' . php_sapi_name() . ' Integer/' . PHP_INT_MAX . ' Build/' . CFRUNTIME_BUILD . __aws_sdk_ua_callback()); diff --git a/services/ses.class.php b/services/ses.class.php index f5ce507..32a83fe 100644 --- a/services/ses.class.php +++ b/services/ses.class.php @@ -26,7 +26,7 @@ * The endpoint for Amazon SES is located at: https://email.us-east-1.amazonaws.com *

* - * @version 2012.04.18 + * @version 2012.05.14 * @license See the included NOTICE.md file for complete information. * @copyright See the included NOTICE.md file for complete information. * @link http://aws.amazon.com/ses/ Amazon Simple Email Service @@ -72,7 +72,7 @@ public function __construct(array $options = array()) { $this->api_version = '2010-12-01'; $this->hostname = self::DEFAULT_URL; - $this->auth_class = 'AuthV3Query'; + $this->auth_class = 'AuthV4Query'; return parent::__construct($options); } @@ -113,10 +113,32 @@ public function disable_ssl() /*%******************************************************************************************%*/ // SERVICE METHODS + /** + * Deletes the specified identity (email address or domain) from the list of verified identities. + * + * @param string $identity (Required) The identity to be removed from the list of identities for the AWS Account. + * @param array $opt (Optional) An associative array of parameters that can have the following keys:
    + *
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • + *
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
+ * @return CFResponse A object containing a parsed HTTP response. + */ + public function delete_identity($identity, $opt = null) + { + if (!$opt) $opt = array(); + $opt['Identity'] = $identity; + + return $this->authenticate('DeleteIdentity', $opt); + } + /** * Deletes the specified email address from the list of verified addresses. + * + *

+ * The DeleteVerifiedEmailAddress action is deprecated as of the May 15, 2012 release of Domain + * Verification. The DeleteIdentity action is now preferred. + *

* - * @param string $email_address (Required) An email address to be removed from the list of verified addreses. + * @param string $email_address (Required) An email address to be removed from the list of verified addresses. * @param array $opt (Optional) An associative array of parameters that can have the following keys:
    *
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • *
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
@@ -130,6 +152,28 @@ public function delete_verified_email_address($email_address, $opt = null) return $this->authenticate('DeleteVerifiedEmailAddress', $opt); } + /** + * Given a list of identities (email addresses and/or domains), returns the verification status + * and (for domain identities) the verification token for each identity. + * + * @param string|array $identities (Required) A list of identities. Pass a string for a single value, or an indexed array for multiple values. + * @param array $opt (Optional) An associative array of parameters that can have the following keys:
    + *
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • + *
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
+ * @return CFResponse A object containing a parsed HTTP response. + */ + public function get_identity_verification_attributes($identities, $opt = null) + { + if (!$opt) $opt = array(); + + // Required list (non-map) + $opt = array_merge($opt, CFComplexType::map(array( + 'Identities' => (is_array($identities) ? $identities : array($identities)) + ), 'member')); + + return $this->authenticate('GetIdentityVerificationAttributes', $opt); + } + /** * Returns the user's current sending limits. * @@ -163,8 +207,32 @@ public function get_send_statistics($opt = null) return $this->authenticate('GetSendStatistics', $opt); } + /** + * Returns a list containing all of the identities (email addresses and domains) for a specific + * AWS Account, regardless of verification status. + * + * @param array $opt (Optional) An associative array of parameters that can have the following keys:
    + *
  • IdentityType - string - Optional - The type of the identities to list. Possible values are "EmailAddress" and "Domain". If this parameter is omitted, then all identities will be listed. [Allowed values: EmailAddress, Domain]
  • + *
  • NextToken - string - Optional - The token to use for pagination.
  • + *
  • MaxItems - integer - Optional - The maximum number of identities per page. Possible values are 1-100 inclusive.
  • + *
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • + *
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
+ * @return CFResponse A object containing a parsed HTTP response. + */ + public function list_identities($opt = null) + { + if (!$opt) $opt = array(); + + return $this->authenticate('ListIdentities', $opt); + } + /** * Returns a list containing all of the email addresses that have been verified. + * + *

+ * The ListVerifiedEmailAddresses action is deprecated as of the May 15, 2012 release of Domain + * Verification. The ListIdentities action is now preferred. + *

* * @param array $opt (Optional) An associative array of parameters that can have the following keys:
    *
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • @@ -184,8 +252,9 @@ public function list_verified_email_addresses($opt = null) * *

    * If you have not yet requested production access to Amazon SES, then you will only be able to - * send email to and from verified email addresses. For more information, go to the Amazon SES Developer Guide. + * send email to and from verified email addresses and domains. For more information, go to the + * Amazon SES Developer + * Guide. *

    * The total size of the message cannot exceed 10 MB. * @@ -200,7 +269,7 @@ public function list_verified_email_addresses($opt = null) * section of the Amazon SES * Developer Guide. * - * @param string $source (Required) The sender's email address. + * @param string $source (Required) The identity's email address. * @param array $destination (Required) The destination for this email, composed of To:, CC:, and BCC: fields.
      *
    • x - array - Optional - This represents a simple array index.
        *
      • ToAddresses - string|array - Optional - The To: field(s) of the message. Pass a string for a single value, or an indexed array for multiple values.
      • @@ -275,8 +344,9 @@ public function send_email($source, $destination, $message, $opt = null) * *

        * If you have not yet requested production access to Amazon SES, then you will only be able to - * send email to and from verified email addresses. For more information, go to the Amazon SES Developer Guide. + * send email to and from verified email addresses and domains. For more information, go to the + * Amazon SES Developer + * Guide. *

        * The total size of the message cannot exceed 10 MB. This includes any attachments that are part * of the message. @@ -298,7 +368,7 @@ public function send_email($source, $destination, $message, $opt = null) *
    • *
    * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      - *
    • Source - string - Optional - The sender's email address.

      If you specify the Source parameter, then bounce notifications and complaints will be sent to this email address. This takes precedence over any Return-Path header that you might include in the raw text of the message.

    • + *
    • Source - string - Optional - The identity's email address.

      If you specify the Source parameter, then bounce notifications and complaints will be sent to this email address. This takes precedence over any Return-Path header that you might include in the raw text of the message.

    • *
    • Destinations - string|array - Optional - A list of destinations for the message. Pass a string for a single value, or an indexed array for multiple values.
    • *
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • *
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    @@ -325,9 +395,31 @@ public function send_raw_email($raw_message, $opt = null) return $this->authenticate('SendRawEmail', $opt); } + /** + * Verifies a domain. + * + * @param string $domain (Required) The domain to be verified. + * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      + *
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • + *
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    + * @return CFResponse A object containing a parsed HTTP response. + */ + public function verify_domain_identity($domain, $opt = null) + { + if (!$opt) $opt = array(); + $opt['Domain'] = $domain; + + return $this->authenticate('VerifyDomainIdentity', $opt); + } + /** * Verifies an email address. This action causes a confirmation email message to be sent to the * specified address. + * + *

    + * The VerifyEmailAddress action is deprecated as of the May 15, 2012 release of Domain + * Verification. The VerifyEmailIdentity action is now preferred. + *

    * * @param string $email_address (Required) The email address to be verified. * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      @@ -342,6 +434,24 @@ public function verify_email_address($email_address, $opt = null) return $this->authenticate('VerifyEmailAddress', $opt); } + + /** + * Verifies an email address. This action causes a confirmation email message to be sent to the + * specified address. + * + * @param string $email_address (Required) The email address to be verified. + * @param array $opt (Optional) An associative array of parameters that can have the following keys:
        + *
      • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
      • + *
      • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
      + * @return CFResponse A object containing a parsed HTTP response. + */ + public function verify_email_identity($email_address, $opt = null) + { + if (!$opt) $opt = array(); + $opt['EmailAddress'] = $email_address; + + return $this->authenticate('VerifyEmailIdentity', $opt); + } }