SesClient
extends AbstractApi
in package
Base class all API clients are inheriting.
Table of Contents
Properties
- $awsErrorFactory : AwsErrorFactoryInterface
- $configuration : Configuration
- $credentialProvider : CredentialProvider
- $endpointCache : EndpointCache
- $httpClient : HttpClientInterface
- $logger : LoggerInterface
- $signers : array<string, Signer>
Methods
- __construct() : mixed
- getConfiguration() : Configuration
- presign() : string
- sendEmail() : SendEmailResponse
- Sends an email message. You can use the Amazon SES API v2 to send the following types of messages:
- discoverEndpoints() : array<string|int, EndpointInterface>
- getAwsErrorFactory() : AwsErrorFactoryInterface
- getEndpoint() : string
- Build the endpoint full uri.
- getEndpointMetadata() : array{endpoint: string, signRegion: string, signService: string, signVersions: string[]}
- Returns the AWS endpoint metadata for the given region.
- getResponse() : Response
- getServiceCode() : string
- getSignatureScopeName() : string
- getSignatureVersion() : string
- getSignerFactories() : array<string, callable(string, string): Signer>
- getDiscoveredEndpoint() : string
- getSigner() : Signer
Properties
$awsErrorFactory
private
AwsErrorFactoryInterface
$awsErrorFactory
$configuration
private
Configuration
$configuration
$credentialProvider
private
CredentialProvider
$credentialProvider
$endpointCache
private
EndpointCache
$endpointCache
$httpClient
private
HttpClientInterface
$httpClient
$logger
private
LoggerInterface
$logger
$signers
private
array<string, Signer>
$signers
Methods
__construct()
public
__construct([mixed $configuration = [] ][, CredentialProvider|null $credentialProvider = null ][, HttpClientInterface|null $httpClient = null ][, LoggerInterface|null $logger = null ]) : mixed
Parameters
- $configuration : mixed = []
- $credentialProvider : CredentialProvider|null = null
- $httpClient : HttpClientInterface|null = null
- $logger : LoggerInterface|null = null
getConfiguration()
public
final getConfiguration() : Configuration
Return values
Configurationpresign()
public
final presign(Input $input[, DateTimeImmutable|null $expires = null ]) : string
Parameters
- $input : Input
- $expires : DateTimeImmutable|null = null
Return values
stringsendEmail()
Sends an email message. You can use the Amazon SES API v2 to send the following types of messages:
public
sendEmail(ListManagementOptions|array, '@region'?: string|null}|SendEmailRequest $input) : SendEmailResponse
- Simple – A standard email message. When you create this type of message, you specify the sender, the recipient, and the message body, and Amazon SES assembles the message for you.
- Raw – A raw, MIME-formatted email message. When you send this type of email, you have to specify all of the message headers, as well as the message body. You can use this message type to send messages that contain attachments. The message that you specify has to be a valid MIME message.
- Templated – A message that contains personalization tags. When you send this type of email, Amazon SES API v2 automatically replaces the tags with values that you specify.
Parameters
- $input : ListManagementOptions|array, '@region'?: string|null}|SendEmailRequest
Tags
Return values
SendEmailResponsediscoverEndpoints()
protected
discoverEndpoints(string|null $region) : array<string|int, EndpointInterface>
Parameters
- $region : string|null
Return values
array<string|int, EndpointInterface>getAwsErrorFactory()
protected
getAwsErrorFactory() : AwsErrorFactoryInterface
Return values
AwsErrorFactoryInterfacegetEndpoint()
Build the endpoint full uri.
protected
getEndpoint(string $uri, array<string, string> $query, string|null $region) : string
Parameters
- $uri : string
-
or path
- $query : array<string, string>
-
parameters that should go in the query string
- $region : string|null
-
region provided by the user in the
@region
parameter of the Input
Return values
stringgetEndpointMetadata()
Returns the AWS endpoint metadata for the given region.
protected
getEndpointMetadata(string|null $region) : array{endpoint: string, signRegion: string, signService: string, signVersions: string[]}
When user did not provide a region, the client have to either return a global endpoint or fallback to the Configuration::DEFAULT_REGION constant.
This implementation is a BC layer for client that does not require core:^1.2.
Parameters
- $region : string|null
-
region provided by the user (without fallback to a default region)
Return values
array{endpoint: string, signRegion: string, signService: string, signVersions: string[]}getResponse()
protected
final getResponse(Request $request[, RequestContext|null $context = null ]) : Response
Parameters
- $request : Request
- $context : RequestContext|null = null
Return values
ResponsegetServiceCode()
protected
getServiceCode() : string
Return values
stringgetSignatureScopeName()
protected
getSignatureScopeName() : string
Return values
stringgetSignatureVersion()
protected
getSignatureVersion() : string
Return values
stringgetSignerFactories()
protected
getSignerFactories() : array<string, callable(string, string): Signer>
Return values
array<string, callable(string, string): Signer>getDiscoveredEndpoint()
private
getDiscoveredEndpoint(string $uri, array<string, string> $query, string|null $region, bool $usesEndpointDiscovery, bool $requiresEndpointDiscovery) : string
Parameters
- $uri : string
- $query : array<string, string>
- $region : string|null
- $usesEndpointDiscovery : bool
- $requiresEndpointDiscovery : bool
Return values
stringgetSigner()
private
getSigner(string|null $region) : Signer
Parameters
- $region : string|null
-
region provided by the user in the
@region
parameter of the Input