Skip to content

Commit 02e863e

Browse files
mfruehaufMarkus Fruehaufclaude
authored
Add SesClient email identity operations (#2106)
* Add SesClient email identity operations Generate getEmailIdentity, createEmailIdentity and putEmailIdentityDkimSigningAttributes operations for the SESv2 client. Also add the "SOA" acronym to the code generator so the SOARecord value object (returned by getEmailIdentity) can be generated. * Implement Ses email identity unit tests Fill in the generated request/response unit tests with real fixtures so the getEmailIdentity, createEmailIdentity and putEmailIdentityDkimSigningAttributes operations are actually covered. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Bump Ses branch-alias to 1.16-dev Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Fill in Ses email identity integration tests Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Markus Fruehauf <markus.fruehauf@reservix.de> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1362533 commit 02e863e

35 files changed

Lines changed: 2711 additions & 1 deletion

manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,11 @@
677677
"example": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/email/2010-12-01/examples-1.json",
678678
"api-reference": "https://docs.aws.amazon.com/ses/latest/APIReference-V2",
679679
"methods": [
680+
"CreateEmailIdentity",
680681
"DeleteSuppressedDestination",
682+
"GetEmailIdentity",
681683
"GetSuppressedDestination",
684+
"PutEmailIdentityDkimSigningAttributes",
682685
"SendEmail"
683686
],
684687
"alternative-names": [

src/CodeGenerator/src/Generator/GeneratorHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public static function normalizeName(string $propertyName): string
5252
'PTS' => 'Pts',
5353
'RGB' => 'Rgb',
5454
'SMS' => 'Sms',
55+
'SOA' => 'Soa',
5556
'SSE' => 'Sse',
5657
'STL' => 'Stl',
5758
'TTL' => 'Ttl',

src/Service/Ses/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: Added `getEmailIdentity`, `createEmailIdentity` and `putEmailIdentityDkimSigningAttributes` operations
8+
59
## 1.15.0
610

711
### Added

src/Service/Ses/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
],
1313
"require": {
1414
"php": "^8.2",
15+
"ext-filter": "*",
1516
"async-aws/core": "^1.9"
1617
},
1718
"require-dev": {
@@ -31,7 +32,7 @@
3132
},
3233
"extra": {
3334
"branch-alias": {
34-
"dev-master": "1.15-dev"
35+
"dev-master": "1.16-dev"
3536
}
3637
}
3738
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace AsyncAws\Ses\Enum;
4+
5+
/**
6+
* The action to take if the required MX record can't be found when you send an email. When you set this value to
7+
* `UseDefaultValue`, the mail is sent using *amazonses.com* as the MAIL FROM domain. When you set this value to
8+
* `RejectMessage`, the Amazon SES API v2 returns a `MailFromDomainNotVerified` error, and doesn't attempt to deliver
9+
* the email.
10+
*
11+
* These behaviors are taken when the custom MAIL FROM domain configuration is in the `Pending`, `Failed`, and
12+
* `TemporaryFailure` states.
13+
*/
14+
final class BehaviorOnMxFailure
15+
{
16+
public const REJECT_MESSAGE = 'REJECT_MESSAGE';
17+
public const USE_DEFAULT_VALUE = 'USE_DEFAULT_VALUE';
18+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
19+
20+
/**
21+
* @psalm-assert-if-true self::* $value
22+
*/
23+
public static function exists(string $value): bool
24+
{
25+
return isset([
26+
self::REJECT_MESSAGE => true,
27+
self::USE_DEFAULT_VALUE => true,
28+
][$value]);
29+
}
30+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
3+
namespace AsyncAws\Ses\Enum;
4+
5+
final class DkimSigningAttributesOrigin
6+
{
7+
public const AWS_SES = 'AWS_SES';
8+
public const AWS_SES_AF_SOUTH_1 = 'AWS_SES_AF_SOUTH_1';
9+
public const AWS_SES_AP_NORTHEAST_1 = 'AWS_SES_AP_NORTHEAST_1';
10+
public const AWS_SES_AP_NORTHEAST_2 = 'AWS_SES_AP_NORTHEAST_2';
11+
public const AWS_SES_AP_NORTHEAST_3 = 'AWS_SES_AP_NORTHEAST_3';
12+
public const AWS_SES_AP_SOUTHEAST_1 = 'AWS_SES_AP_SOUTHEAST_1';
13+
public const AWS_SES_AP_SOUTHEAST_2 = 'AWS_SES_AP_SOUTHEAST_2';
14+
public const AWS_SES_AP_SOUTHEAST_3 = 'AWS_SES_AP_SOUTHEAST_3';
15+
public const AWS_SES_AP_SOUTHEAST_5 = 'AWS_SES_AP_SOUTHEAST_5';
16+
public const AWS_SES_AP_SOUTH_1 = 'AWS_SES_AP_SOUTH_1';
17+
public const AWS_SES_AP_SOUTH_2 = 'AWS_SES_AP_SOUTH_2';
18+
public const AWS_SES_CA_CENTRAL_1 = 'AWS_SES_CA_CENTRAL_1';
19+
public const AWS_SES_CA_WEST_1 = 'AWS_SES_CA_WEST_1';
20+
public const AWS_SES_EU_CENTRAL_1 = 'AWS_SES_EU_CENTRAL_1';
21+
public const AWS_SES_EU_CENTRAL_2 = 'AWS_SES_EU_CENTRAL_2';
22+
public const AWS_SES_EU_NORTH_1 = 'AWS_SES_EU_NORTH_1';
23+
public const AWS_SES_EU_SOUTH_1 = 'AWS_SES_EU_SOUTH_1';
24+
public const AWS_SES_EU_WEST_1 = 'AWS_SES_EU_WEST_1';
25+
public const AWS_SES_EU_WEST_2 = 'AWS_SES_EU_WEST_2';
26+
public const AWS_SES_EU_WEST_3 = 'AWS_SES_EU_WEST_3';
27+
public const AWS_SES_IL_CENTRAL_1 = 'AWS_SES_IL_CENTRAL_1';
28+
public const AWS_SES_ME_CENTRAL_1 = 'AWS_SES_ME_CENTRAL_1';
29+
public const AWS_SES_ME_SOUTH_1 = 'AWS_SES_ME_SOUTH_1';
30+
public const AWS_SES_SA_EAST_1 = 'AWS_SES_SA_EAST_1';
31+
public const AWS_SES_US_EAST_1 = 'AWS_SES_US_EAST_1';
32+
public const AWS_SES_US_EAST_2 = 'AWS_SES_US_EAST_2';
33+
public const AWS_SES_US_WEST_1 = 'AWS_SES_US_WEST_1';
34+
public const AWS_SES_US_WEST_2 = 'AWS_SES_US_WEST_2';
35+
public const EXTERNAL = 'EXTERNAL';
36+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
37+
38+
/**
39+
* @psalm-assert-if-true self::* $value
40+
*/
41+
public static function exists(string $value): bool
42+
{
43+
return isset([
44+
self::AWS_SES => true,
45+
self::AWS_SES_AF_SOUTH_1 => true,
46+
self::AWS_SES_AP_NORTHEAST_1 => true,
47+
self::AWS_SES_AP_NORTHEAST_2 => true,
48+
self::AWS_SES_AP_NORTHEAST_3 => true,
49+
self::AWS_SES_AP_SOUTHEAST_1 => true,
50+
self::AWS_SES_AP_SOUTHEAST_2 => true,
51+
self::AWS_SES_AP_SOUTHEAST_3 => true,
52+
self::AWS_SES_AP_SOUTHEAST_5 => true,
53+
self::AWS_SES_AP_SOUTH_1 => true,
54+
self::AWS_SES_AP_SOUTH_2 => true,
55+
self::AWS_SES_CA_CENTRAL_1 => true,
56+
self::AWS_SES_CA_WEST_1 => true,
57+
self::AWS_SES_EU_CENTRAL_1 => true,
58+
self::AWS_SES_EU_CENTRAL_2 => true,
59+
self::AWS_SES_EU_NORTH_1 => true,
60+
self::AWS_SES_EU_SOUTH_1 => true,
61+
self::AWS_SES_EU_WEST_1 => true,
62+
self::AWS_SES_EU_WEST_2 => true,
63+
self::AWS_SES_EU_WEST_3 => true,
64+
self::AWS_SES_IL_CENTRAL_1 => true,
65+
self::AWS_SES_ME_CENTRAL_1 => true,
66+
self::AWS_SES_ME_SOUTH_1 => true,
67+
self::AWS_SES_SA_EAST_1 => true,
68+
self::AWS_SES_US_EAST_1 => true,
69+
self::AWS_SES_US_EAST_2 => true,
70+
self::AWS_SES_US_WEST_1 => true,
71+
self::AWS_SES_US_WEST_2 => true,
72+
self::EXTERNAL => true,
73+
][$value]);
74+
}
75+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace AsyncAws\Ses\Enum;
4+
5+
final class DkimSigningKeyLength
6+
{
7+
public const RSA_1024_BIT = 'RSA_1024_BIT';
8+
public const RSA_2048_BIT = 'RSA_2048_BIT';
9+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
10+
11+
/**
12+
* @psalm-assert-if-true self::* $value
13+
*/
14+
public static function exists(string $value): bool
15+
{
16+
return isset([
17+
self::RSA_1024_BIT => true,
18+
self::RSA_2048_BIT => true,
19+
][$value]);
20+
}
21+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
namespace AsyncAws\Ses\Enum;
4+
5+
/**
6+
* The DKIM authentication status of the identity. The status can be one of the following:
7+
*
8+
* - `PENDING` – The verification process was initiated, but Amazon SES hasn't yet detected the DKIM records in the
9+
* DNS configuration for the domain.
10+
* - `SUCCESS` – The verification process completed successfully.
11+
* - `FAILED` – The verification process failed. This typically occurs when Amazon SES fails to find the DKIM records
12+
* in the DNS configuration of the domain.
13+
* - `TEMPORARY_FAILURE` – A temporary issue is preventing Amazon SES from determining the DKIM authentication status
14+
* of the domain.
15+
* - `NOT_STARTED` – The DKIM verification process hasn't been initiated for the domain.
16+
*/
17+
final class DkimStatus
18+
{
19+
public const FAILED = 'FAILED';
20+
public const NOT_STARTED = 'NOT_STARTED';
21+
public const PENDING = 'PENDING';
22+
public const SUCCESS = 'SUCCESS';
23+
public const TEMPORARY_FAILURE = 'TEMPORARY_FAILURE';
24+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
25+
26+
/**
27+
* @psalm-assert-if-true self::* $value
28+
*/
29+
public static function exists(string $value): bool
30+
{
31+
return isset([
32+
self::FAILED => true,
33+
self::NOT_STARTED => true,
34+
self::PENDING => true,
35+
self::SUCCESS => true,
36+
self::TEMPORARY_FAILURE => true,
37+
][$value]);
38+
}
39+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace AsyncAws\Ses\Enum;
4+
5+
final class IdentityType
6+
{
7+
public const DOMAIN = 'DOMAIN';
8+
public const EMAIL_ADDRESS = 'EMAIL_ADDRESS';
9+
public const MANAGED_DOMAIN = 'MANAGED_DOMAIN';
10+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
11+
12+
/**
13+
* @psalm-assert-if-true self::* $value
14+
*/
15+
public static function exists(string $value): bool
16+
{
17+
return isset([
18+
self::DOMAIN => true,
19+
self::EMAIL_ADDRESS => true,
20+
self::MANAGED_DOMAIN => true,
21+
][$value]);
22+
}
23+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace AsyncAws\Ses\Enum;
4+
5+
/**
6+
* The status of the MAIL FROM domain. This status can have the following values:
7+
*
8+
* - `PENDING` – Amazon SES hasn't started searching for the MX record yet.
9+
* - `SUCCESS` – Amazon SES detected the required MX record for the MAIL FROM domain.
10+
* - `FAILED` – Amazon SES can't find the required MX record, or the record no longer exists.
11+
* - `TEMPORARY_FAILURE` – A temporary issue occurred, which prevented Amazon SES from determining the status of the
12+
* MAIL FROM domain.
13+
*/
14+
final class MailFromDomainStatus
15+
{
16+
public const FAILED = 'FAILED';
17+
public const PENDING = 'PENDING';
18+
public const SUCCESS = 'SUCCESS';
19+
public const TEMPORARY_FAILURE = 'TEMPORARY_FAILURE';
20+
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
21+
22+
/**
23+
* @psalm-assert-if-true self::* $value
24+
*/
25+
public static function exists(string $value): bool
26+
{
27+
return isset([
28+
self::FAILED => true,
29+
self::PENDING => true,
30+
self::SUCCESS => true,
31+
self::TEMPORARY_FAILURE => true,
32+
][$value]);
33+
}
34+
}

0 commit comments

Comments
 (0)