ClientAuthAWSCredentials.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzCore/std/string/string.h>
  10. #include <aws/core/auth/AWSCredentialsProvider.h>
  11. namespace AZ
  12. {
  13. class ReflectContext;
  14. }
  15. namespace AWSClientAuth
  16. {
  17. //! Client auth AWS Credentials object for serialization.
  18. class ClientAuthAWSCredentials
  19. {
  20. public:
  21. AZ_TYPE_INFO(ClientAuthAWSCredentials, "{02FB32C4-B94E-4084-9049-3DF32F87BD76}");
  22. ClientAuthAWSCredentials() = default;
  23. ClientAuthAWSCredentials(const ClientAuthAWSCredentials& other)
  24. : m_accessKeyId(other.m_accessKeyId)
  25. , m_secretKey(other.m_secretKey)
  26. , m_sessionToken(other.m_sessionToken)
  27. {
  28. }
  29. ClientAuthAWSCredentials(const AZStd::string& accessKeyId, const AZStd::string& secretKey, const AZStd::string& sessionToken)
  30. : m_accessKeyId(accessKeyId)
  31. , m_secretKey(secretKey)
  32. , m_sessionToken(sessionToken)
  33. {
  34. }
  35. //! Gets the access key
  36. inline const AZStd::string& GetAWSAccessKeyId() const
  37. {
  38. return m_accessKeyId;
  39. }
  40. //! Gets the secret key
  41. inline const AZStd::string& GetAWSSecretKey() const
  42. {
  43. return m_secretKey;
  44. }
  45. //! Gets the session token
  46. inline const AZStd::string& GetSessionToken() const
  47. {
  48. return m_sessionToken;
  49. }
  50. static void Reflect(AZ::ReflectContext* context);
  51. private:
  52. AZStd::string m_accessKeyId;
  53. AZStd::string m_secretKey;
  54. AZStd::string m_sessionToken;
  55. };
  56. } // namespace AWSClientAuth