AwsAbstractClient Class
(QtAws::Core::AwsAbstractClient)The AwsAbstractClient class provides an interface for accessing AWS services. More...
Public Functions
| AwsAbstractClient(QObject * const parent = 0) | |
| virtual | ~AwsAbstractClient() |
| QString | apiVersion() const |
| QUrl | endpoint() const |
| QString | endpointPrefix() const |
| QNetworkAccessManager * | networkAccessManager() const |
| AwsRegion::Region | region() const |
| virtual AwsAbstractResponse * | send(const AwsAbstractRequest &request) |
| QString | serviceFullName() const |
| QString | serviceName() const |
| void | setCredentials(AwsAbstractCredentials * const credentials) |
| void | setEndpoint(const QUrl &endpoint) |
| void | setNetworkAccessManager(QNetworkAccessManager * const manager) |
| void | setRegion(const AwsRegion::Region region) |
Protected Functions
| virtual AwsAbstractCredentials * | credentials() const |
| virtual AwsAbstractSignature * | signature() const |
Detailed Description
The AwsAbstractClient class provides an interface for accessing AWS services.
Member Function Documentation
AwsAbstractClient::AwsAbstractClient(QObject * const parent = 0)
Constructs an AwsAbstractClient object with parent parent.
[virtual] AwsAbstractClient::~AwsAbstractClient()
Destroys the AWS client.
QString AwsAbstractClient::apiVersion() const
Returns the AWS service API version, such as "2017-01-02".
[virtual protected] AwsAbstractCredentials *AwsAbstractClient::credentials() const
Returns credentials for signing requests.
See also setCredentials().
QUrl AwsAbstractClient::endpoint() const
Returns the AWS endpoint URL.
If a valid QUrl has been set (usually via setEndpoint), then this base implementation will return that QUrl. Otherwise, this base implementation will use the AwsEndpoint class to determine the endpoint to use based on this object's region and serviceName.
See also setEndpoint().
QString AwsAbstractClient::endpointPrefix() const
Returns the AWS endpoint prefix, such as "sqs" or "sns".
This is the standard endpoint prefix associated with this AWS service, is not affected by any explicit endpoint URL that may have beem set via setEndpoint.
QNetworkAccessManager *AwsAbstractClient::networkAccessManager() const
Returns the network access manager.
See also setNetworkAccessManager().
AwsRegion::Region AwsAbstractClient::region() const
Returns the AWS region, or AwsRegion::InvalidRegion if none has been set.
See also setRegion().
[virtual] AwsAbstractResponse *AwsAbstractClient::send(const AwsAbstractRequest &request)
Sends an AWS request.
This base implementation simply uses the request's send method, supplying the necessary resources (ie the credentials, network access manager, and signature object) from this object as required.
Derived classes would not normally need to override this method.
Returns an object representing the AWS service's response.
QString AwsAbstractClient::serviceFullName() const
Return the Amazon full sercvice name, such as "Amazon Simple Queue Service".
QString AwsAbstractClient::serviceName() const
Returns the Amazon service name, such as "sqs" or "sns".
This is name is suitable for generating V4 signatures.
void AwsAbstractClient::setCredentials(AwsAbstractCredentials * const credentials)
Sets the credentials for signing AWS requests.
This object will not take ownership of the supplied credentials pointer. It is the caller's responsibility to ensure that the pointer remains valid for the life of this object, or until setCredentials is used to set a new pointer.
See also credentials().
void AwsAbstractClient::setEndpoint(const QUrl &endpoint)
Sets the AWS endpoint to send AWS requests.
Typically, it is simpler for the user to set this client's region instead (via setRegion), and allow this object to then determine the endpoint based on the serviceName and region. However, this method may be used to set an explicit endpoint URL if desired.
See also endpoint().
void AwsAbstractClient::setNetworkAccessManager(QNetworkAccessManager * const manager)
Sets the network access manager for this AWS service object.
This object will not take ownership of the supplied manager pointer. It is the caller's responsibility to ensure that the pointer remains valid for the life of this object, or until setNetworkAccessManager is used to set a new pointer.
See also networkAccessManager().
void AwsAbstractClient::setRegion(const AwsRegion::Region region)
Sets the AWS region.
If an endpoint is not explicitly set (eg via setEndpoint), then the supplied value may be used (in conjuction with serviceName) to determine the endpoint URL when sending requests to the AWS service.
See also region().
[virtual protected] AwsAbstractSignature *AwsAbstractClient::signature() const
Returns signature object for signing requests.
© 2018 Paul Colby Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.