AwsRegion Class
(QtAws::Core::AwsRegion)The AwsRegion class provides information about AWS regions. More...
| Header: | #include <AwsRegion> |
Public Types
| enum | CardinalDirection { North, NorthNorthEast, NorthEast, EastNorthEast, ..., NortNorthWest } |
| enum | MacroRegion { AsiaPacific, Europe, SouthAmerica, UnitedStates, UnitedStatesGov } |
| enum | Region { InvalidRegion, AP_Northeast_1, AP_Southeast_1, AP_Southeast_2, ..., US_West_2 } |
| flags | Regions |
Public Functions
| AwsRegion(const Region region) | |
| AwsRegion(const QString ®ionName) | |
| ~AwsRegion() | |
| QString | fullName() const |
| QString | hostName(const QString &serviceName) const |
| bool | isSupported(const QString &serviceName, const AwsEndpoint::Transports transports = AwsEndpoint::AnyTransport) const |
| bool | isValid() const |
| QString | name() const |
| Region | region() const |
| QStringList | supportedServices(const AwsEndpoint::Transports transports = AwsEndpoint::AnyTransport) const |
Static Public Members
| Region | fromName(const QString ®ionName) |
| QString | fullName(const Region ®ion) |
| QString | name(const Region ®ion) |
Detailed Description
The AwsRegion class provides information about AWS regions.
Basic usage example:
const AwsRegion region(AwsRegion::AP_Northeast_1); region.name(); // "ap-northeast-1" region.fullName(); // "Asia Pacific (Tokyo) Region" region.hostName("iam"); // "iam.amazonaws.com"
See also http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html.
Member Type Documentation
enum AwsRegion::CardinalDirection
This enum describes cardinal direction bit-flags for AWS regions.
| Constant | Value | Description |
|---|---|---|
QtAws::Core::AwsRegion::North | 0x00 | North. |
QtAws::Core::AwsRegion::NorthNorthEast | 0x10 | North-north-east. |
QtAws::Core::AwsRegion::NorthEast | 0x20 | North-east. |
QtAws::Core::AwsRegion::EastNorthEast | 0x30 | East-north-east. |
QtAws::Core::AwsRegion::East | 0x40 | East. |
QtAws::Core::AwsRegion::EastSouthEast | 0x50 | East-south-east. |
QtAws::Core::AwsRegion::SouthEast | 0x60 | South-east. |
QtAws::Core::AwsRegion::SouthSouthEast | 0x70 | South-south-east. |
QtAws::Core::AwsRegion::South | 0x80 | South. |
QtAws::Core::AwsRegion::SouthSouthWest | 0x90 | South-sputh-west. |
QtAws::Core::AwsRegion::SouthWest | 0xA0 | South-west. |
QtAws::Core::AwsRegion::WestSouthWest | 0xB0 | West-south-west. |
QtAws::Core::AwsRegion::West | 0xC0 | West. |
QtAws::Core::AwsRegion::WestNorthWest | 0xD0 | West-north-west. |
QtAws::Core::AwsRegion::NorthWest | 0xE0 | North-west. |
QtAws::Core::AwsRegion::NortNorthWest | 0xF0 | Nort-north-west. |
enum AwsRegion::MacroRegion
This enum describes macro region bit-flags for AWS regions.
| Constant | Value | Description |
|---|---|---|
QtAws::Core::AwsRegion::AsiaPacific | 0x100 | Asia-Pacific. |
QtAws::Core::AwsRegion::Europe | 0x300 | Europe. |
QtAws::Core::AwsRegion::SouthAmerica | 0xA00 | South America. |
QtAws::Core::AwsRegion::UnitedStates | 0xB00 | United States of America. |
QtAws::Core::AwsRegion::UnitedStatesGov | 0xC00 | United States Government. |
enum AwsRegion::Region
flags AwsRegion::Regions
This enum describes the available AWS regions.
| Constant | Value | Description |
|---|---|---|
QtAws::Core::AwsRegion::InvalidRegion | 0 | Not a valid AWS region. |
QtAws::Core::AwsRegion::AP_Northeast_1 | AsiaPacific + NorthEast + 0x1 | Asia Pacific (Tokyo) Region. |
QtAws::Core::AwsRegion::AP_Southeast_1 | AsiaPacific + SouthEast + 0x1 | Asia Pacific (Singapore) Region. |
QtAws::Core::AwsRegion::AP_Southeast_2 | AsiaPacific + SouthEast + 0x2 | Asia Pacific (Sydney) Region. |
QtAws::Core::AwsRegion::EU_West_1 | Europe + West + 0x1 | EU (Ireland) Region. |
QtAws::Core::AwsRegion::SA_East_1 | SouthAmerica + East + 0x1 | São Paulo Region. |
QtAws::Core::AwsRegion::US_East_1 | UnitedStates + East + 0x1 | US East (Northern Virginia) Region. |
QtAws::Core::AwsRegion::US_Gov_West_1 | UnitedStatesGov + West + 0x1 | AWS GovCloud (US) Region. |
QtAws::Core::AwsRegion::US_West_1 | UnitedStates + West + 0x1 | US West (Northern California) Region. |
QtAws::Core::AwsRegion::US_West_2 | UnitedStates + West + 0x2 | US West (Oregon) Region. |
The Regions type is a typedef for QFlags<Region>. It stores an OR combination of Region values.
Member Function Documentation
AwsRegion::AwsRegion(const Region region)
Constructs an AwsRegion object for AWS region.
AwsRegion::AwsRegion(const QString ®ionName)
Constructs an AwsRegion object for AWS regionName.
If regionName is not recognised as a valid AWS region, isValid() will return false.
AwsRegion::~AwsRegion()
Destroys the AWS region.
[static] Region AwsRegion::fromName(const QString ®ionName)
Returns the AwsRegion::Region enum value for regionName, or InvalidRegion if not a valid region name.
regionName is not case sensitive.
QString AwsRegion::fullName() const
Returns the full name for this AWS region.
This returns a humand-readable name for this object's region. For example, for the AwsRegion::US_East_1 region, this will return something like "US East (Northern Virginia) Region".
These full names were gleaned from http://aws.amazon.com/about-aws/globalinfrastructure/ and http://docs.aws.amazon.com/general/latest/gr/rande.html.
[static] QString AwsRegion::fullName(const Region ®ion)
Returns the full name for AWS region.
This returns a humand-readable name for the specified AWS region. For example, for the AwsRegion::US_East_1 region, this will return something like "US East (Northern Virginia) Region".
These full names were gleaned from http://aws.amazon.com/about-aws/globalinfrastructure/ and http://docs.aws.amazon.com/general/latest/gr/rande.html.
QString AwsRegion::hostName(const QString &serviceName) const
Returns the name of the host that supports serviceName for this region, or a null string if the service is not supported for this region.
bool AwsRegion::isSupported(const QString &serviceName, const AwsEndpoint::Transports transports = AwsEndpoint::AnyTransport) const
Returns true if serviceName is supported for this region, for at least one of the specified transports; false otherwise.
bool AwsRegion::isValid() const
Returns true if this region is valid; false otherwise.
Any AwsRegion object created using one of the valid AwsRegion::Region enumeration values (ie any but AwsRegion::InvalidRegion) will be considered valid.
However, if an unknown region name is supplied to the overloaded AwsRegion(const QString ®ionName) constructor, then the constructed object will be considered invalid.
QString AwsRegion::name() const
Returns the canonical AWS name for this region, or a null string if invalid.
See also isValid.
[static] QString AwsRegion::name(const Region ®ion)
Returns the canonical AWS name for region.
Region AwsRegion::region() const
Returns the region as an AwsRegion::Region enum, or AwsRegion::InvalidRegion if the region is invalid.
If this object was given an AwsRegion::Region value during construction, this function will simply return that enumeration value.
If this object was constructed from an AWS region name, then this function will return the AwsRegion::Region enumeration value corresponding to that AWS region name, or AwsRegion::InvalidRegion if the given region name did not name a known, valid AWS region.
QStringList AwsRegion::supportedServices(const AwsEndpoint::Transports transports = AwsEndpoint::AnyTransport) const
Returns the list of the names of all AWS services support by this region for at least one of the specified transports. The list may be empty.
© 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.