|
15 | 15 | use AsyncAws\Ses\Exception\NotFoundException;
|
16 | 16 | use AsyncAws\Ses\Exception\SendingPausedException;
|
17 | 17 | use AsyncAws\Ses\Exception\TooManyRequestsException;
|
| 18 | +use AsyncAws\Ses\Input\DeleteSuppressedDestinationRequest; |
| 19 | +use AsyncAws\Ses\Input\GetSuppressedDestinationRequest; |
18 | 20 | use AsyncAws\Ses\Input\SendEmailRequest;
|
| 21 | +use AsyncAws\Ses\Result\DeleteSuppressedDestinationResponse; |
| 22 | +use AsyncAws\Ses\Result\GetSuppressedDestinationResponse; |
19 | 23 | use AsyncAws\Ses\Result\SendEmailResponse;
|
20 | 24 | use AsyncAws\Ses\ValueObject\Destination;
|
21 | 25 | use AsyncAws\Ses\ValueObject\EmailContent;
|
|
24 | 28 |
|
25 | 29 | class SesClient extends AbstractApi
|
26 | 30 | {
|
| 31 | + /** |
| 32 | + * Removes an email address from the suppression list for your account. |
| 33 | + * |
| 34 | + * @see https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_DeleteSuppressedDestination.html |
| 35 | + * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-email-2019-09-27.html#deletesuppresseddestination |
| 36 | + * |
| 37 | + * @param array{ |
| 38 | + * EmailAddress: string, |
| 39 | + * '@region'?: string|null, |
| 40 | + * }|DeleteSuppressedDestinationRequest $input |
| 41 | + * |
| 42 | + * @throws NotFoundException |
| 43 | + * @throws BadRequestException |
| 44 | + * @throws TooManyRequestsException |
| 45 | + */ |
| 46 | + public function deleteSuppressedDestination($input): DeleteSuppressedDestinationResponse |
| 47 | + { |
| 48 | + $input = DeleteSuppressedDestinationRequest::create($input); |
| 49 | + $response = $this->getResponse($input->request(), new RequestContext(['operation' => 'DeleteSuppressedDestination', 'region' => $input->getRegion(), 'exceptionMapping' => [ |
| 50 | + 'NotFoundException' => NotFoundException::class, |
| 51 | + 'BadRequestException' => BadRequestException::class, |
| 52 | + 'TooManyRequestsException' => TooManyRequestsException::class, |
| 53 | + ]])); |
| 54 | + |
| 55 | + return new DeleteSuppressedDestinationResponse($response); |
| 56 | + } |
| 57 | + |
| 58 | + /** |
| 59 | + * Retrieves information about a specific email address that's on the suppression list for your account. |
| 60 | + * |
| 61 | + * @see https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_GetSuppressedDestination.html |
| 62 | + * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-email-2019-09-27.html#getsuppresseddestination |
| 63 | + * |
| 64 | + * @param array{ |
| 65 | + * EmailAddress: string, |
| 66 | + * '@region'?: string|null, |
| 67 | + * }|GetSuppressedDestinationRequest $input |
| 68 | + * |
| 69 | + * @throws BadRequestException |
| 70 | + * @throws TooManyRequestsException |
| 71 | + * @throws NotFoundException |
| 72 | + */ |
| 73 | + public function getSuppressedDestination($input): GetSuppressedDestinationResponse |
| 74 | + { |
| 75 | + $input = GetSuppressedDestinationRequest::create($input); |
| 76 | + $response = $this->getResponse($input->request(), new RequestContext(['operation' => 'GetSuppressedDestination', 'region' => $input->getRegion(), 'exceptionMapping' => [ |
| 77 | + 'BadRequestException' => BadRequestException::class, |
| 78 | + 'TooManyRequestsException' => TooManyRequestsException::class, |
| 79 | + 'NotFoundException' => NotFoundException::class, |
| 80 | + ]])); |
| 81 | + |
| 82 | + return new GetSuppressedDestinationResponse($response); |
| 83 | + } |
| 84 | + |
27 | 85 | /**
|
28 | 86 | * Sends an email message. You can use the Amazon SES API v2 to send the following types of messages:
|
29 | 87 | *
|
|
0 commit comments