AWS SDK for C++  1.9.72
AWS SDK for C++
STSClient.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/sts/STS_EXPORTS.h>
8 #include <aws/sts/STSErrors.h>
25 #include <future>
26 #include <functional>
27 
28 namespace Aws
29 {
30 
31 namespace Http
32 {
33  class HttpClient;
34  class HttpClientFactory;
35 } // namespace Http
36 
37 namespace Utils
38 {
39  template< typename R, typename E> class Outcome;
40 
41 namespace Threading
42 {
43  class Executor;
44 } // namespace Threading
45 
46 namespace Xml
47 {
48  class XmlDocument;
49 } // namespace Xml
50 } // namespace Utils
51 
52 namespace Auth
53 {
54  class AWSCredentials;
55  class AWSCredentialsProvider;
56 } // namespace Auth
57 
58 namespace Client
59 {
60  class RetryStrategy;
61 } // namespace Client
62 
63 namespace STS
64 {
65 
66 namespace Model
67 {
68  class AssumeRoleRequest;
69  class AssumeRoleWithSAMLRequest;
70  class AssumeRoleWithWebIdentityRequest;
71  class DecodeAuthorizationMessageRequest;
72  class GetAccessKeyInfoRequest;
73  class GetCallerIdentityRequest;
74  class GetFederationTokenRequest;
75  class GetSessionTokenRequest;
76 
85 
86  typedef std::future<AssumeRoleOutcome> AssumeRoleOutcomeCallable;
87  typedef std::future<AssumeRoleWithSAMLOutcome> AssumeRoleWithSAMLOutcomeCallable;
88  typedef std::future<AssumeRoleWithWebIdentityOutcome> AssumeRoleWithWebIdentityOutcomeCallable;
89  typedef std::future<DecodeAuthorizationMessageOutcome> DecodeAuthorizationMessageOutcomeCallable;
90  typedef std::future<GetAccessKeyInfoOutcome> GetAccessKeyInfoOutcomeCallable;
91  typedef std::future<GetCallerIdentityOutcome> GetCallerIdentityOutcomeCallable;
92  typedef std::future<GetFederationTokenOutcome> GetFederationTokenOutcomeCallable;
93  typedef std::future<GetSessionTokenOutcome> GetSessionTokenOutcomeCallable;
94 } // namespace Model
95 
96  class STSClient;
97 
98  typedef std::function<void(const STSClient*, const Model::AssumeRoleRequest&, const Model::AssumeRoleOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > AssumeRoleResponseReceivedHandler;
99  typedef std::function<void(const STSClient*, const Model::AssumeRoleWithSAMLRequest&, const Model::AssumeRoleWithSAMLOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > AssumeRoleWithSAMLResponseReceivedHandler;
100  typedef std::function<void(const STSClient*, const Model::AssumeRoleWithWebIdentityRequest&, const Model::AssumeRoleWithWebIdentityOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > AssumeRoleWithWebIdentityResponseReceivedHandler;
101  typedef std::function<void(const STSClient*, const Model::DecodeAuthorizationMessageRequest&, const Model::DecodeAuthorizationMessageOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DecodeAuthorizationMessageResponseReceivedHandler;
102  typedef std::function<void(const STSClient*, const Model::GetAccessKeyInfoRequest&, const Model::GetAccessKeyInfoOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetAccessKeyInfoResponseReceivedHandler;
103  typedef std::function<void(const STSClient*, const Model::GetCallerIdentityRequest&, const Model::GetCallerIdentityOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetCallerIdentityResponseReceivedHandler;
104  typedef std::function<void(const STSClient*, const Model::GetFederationTokenRequest&, const Model::GetFederationTokenOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetFederationTokenResponseReceivedHandler;
105  typedef std::function<void(const STSClient*, const Model::GetSessionTokenRequest&, const Model::GetSessionTokenOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetSessionTokenResponseReceivedHandler;
106 
117  {
118  public:
120 
126 
132 
137  STSClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
139 
140  virtual ~STSClient();
141 
142 
146  Aws::String ConvertRequestToPresignedUrl(const Aws::AmazonSerializableWebServiceRequest& requestToConvert, const char* region) const;
147 
148 
229 
312 
394  virtual void AssumeRoleAsync(const Model::AssumeRoleRequest& request, const AssumeRoleResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
395 
515 
637 
758  virtual void AssumeRoleWithSAMLAsync(const Model::AssumeRoleWithSAMLRequest& request, const AssumeRoleWithSAMLResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
759 
893 
1029 
1164  virtual void AssumeRoleWithWebIdentityAsync(const Model::AssumeRoleWithWebIdentityRequest& request, const AssumeRoleWithWebIdentityResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
1165 
1196 
1229 
1261  virtual void DecodeAuthorizationMessageAsync(const Model::DecodeAuthorizationMessageRequest& request, const DecodeAuthorizationMessageResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
1262 
1292 
1324 
1355  virtual void GetAccessKeyInfoAsync(const Model::GetAccessKeyInfoRequest& request, const GetAccessKeyInfoResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
1356 
1372 
1390 
1407  virtual void GetCallerIdentityAsync(const Model::GetCallerIdentityRequest& request, const GetCallerIdentityResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
1408 
1544 
1682 
1819  virtual void GetFederationTokenAsync(const Model::GetFederationTokenRequest& request, const GetFederationTokenResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
1820 
1873 
1928 
1982  virtual void GetSessionTokenAsync(const Model::GetSessionTokenRequest& request, const GetSessionTokenResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
1983 
1984 
1985  void OverrideEndpoint(const Aws::String& endpoint);
1986  private:
1987  void init(const Aws::Client::ClientConfiguration& clientConfiguration);
1988  void AssumeRoleAsyncHelper(const Model::AssumeRoleRequest& request, const AssumeRoleResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
1989  void AssumeRoleWithSAMLAsyncHelper(const Model::AssumeRoleWithSAMLRequest& request, const AssumeRoleWithSAMLResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
1990  void AssumeRoleWithWebIdentityAsyncHelper(const Model::AssumeRoleWithWebIdentityRequest& request, const AssumeRoleWithWebIdentityResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
1991  void DecodeAuthorizationMessageAsyncHelper(const Model::DecodeAuthorizationMessageRequest& request, const DecodeAuthorizationMessageResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
1992  void GetAccessKeyInfoAsyncHelper(const Model::GetAccessKeyInfoRequest& request, const GetAccessKeyInfoResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
1993  void GetCallerIdentityAsyncHelper(const Model::GetCallerIdentityRequest& request, const GetCallerIdentityResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
1994  void GetFederationTokenAsyncHelper(const Model::GetFederationTokenRequest& request, const GetFederationTokenResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
1995  void GetSessionTokenAsyncHelper(const Model::GetSessionTokenRequest& request, const GetSessionTokenResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
1996 
1997  Aws::String m_uri;
1998  Aws::String m_configScheme;
1999  std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
2000  };
2001 
2002 } // namespace STS
2003 } // namespace Aws
Aws::STS::STSClient::GetAccessKeyInfo
virtual Model::GetAccessKeyInfoOutcome GetAccessKeyInfo(const Model::GetAccessKeyInfoRequest &request) const
Aws::DirectoryService::Model::LDAPSType::NOT_SET
@ NOT_SET
Aws::STS::Model::GetSessionTokenOutcomeCallable
std::future< GetSessionTokenOutcome > GetSessionTokenOutcomeCallable
Definition: STSClient.h:93
Aws::STS::STSClient::GetFederationTokenAsync
virtual void GetFederationTokenAsync(const Model::GetFederationTokenRequest &request, const GetFederationTokenResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
Aws::STS::STSClient::GetSessionTokenCallable
virtual Model::GetSessionTokenOutcomeCallable GetSessionTokenCallable(const Model::GetSessionTokenRequest &request) const
Aws::STS::STSClient::DecodeAuthorizationMessageCallable
virtual Model::DecodeAuthorizationMessageOutcomeCallable DecodeAuthorizationMessageCallable(const Model::DecodeAuthorizationMessageRequest &request) const
STSErrors.h
Aws::STS::Model::GetAccessKeyInfoOutcomeCallable
std::future< GetAccessKeyInfoOutcome > GetAccessKeyInfoOutcomeCallable
Definition: STSClient.h:90
Aws::STS::Model::AssumeRoleWithSAMLRequest
Definition: AssumeRoleWithSAMLRequest.h:24
Aws::STS::Model::GetFederationTokenOutcome
Aws::Utils::Outcome< GetFederationTokenResult, STSError > GetFederationTokenOutcome
Definition: STSClient.h:83
Aws::STS::STSClient::AssumeRoleWithSAML
virtual Model::AssumeRoleWithSAMLOutcome AssumeRoleWithSAML(const Model::AssumeRoleWithSAMLRequest &request) const
Aws::STS::DecodeAuthorizationMessageResponseReceivedHandler
std::function< void(const STSClient *, const Model::DecodeAuthorizationMessageRequest &, const Model::DecodeAuthorizationMessageOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DecodeAuthorizationMessageResponseReceivedHandler
Definition: STSClient.h:101
AWSError.h
Aws::STS::Model::AssumeRoleWithWebIdentityOutcome
Aws::Utils::Outcome< AssumeRoleWithWebIdentityResult, STSError > AssumeRoleWithWebIdentityOutcome
Definition: STSClient.h:79
Aws::AmazonSerializableWebServiceRequest
Definition: AmazonSerializableWebServiceRequest.h:29
Aws::STS::Model::DecodeAuthorizationMessageRequest
Definition: DecodeAuthorizationMessageRequest.h:22
Aws::STS::Model::AssumeRoleRequest
Definition: AssumeRoleRequest.h:25
Aws::STS::STSClient::GetSessionToken
virtual Model::GetSessionTokenOutcome GetSessionToken(const Model::GetSessionTokenRequest &request) const
AWS_STS_API
#define AWS_STS_API
Definition: STS_EXPORTS.h:28
GetSessionTokenResult.h
DecodeAuthorizationMessageResult.h
Aws::STS::Model::AssumeRoleWithSAMLOutcome
Aws::Utils::Outcome< AssumeRoleWithSAMLResult, STSError > AssumeRoleWithSAMLOutcome
Definition: STSClient.h:78
Aws::STS::STSClient::GetCallerIdentity
virtual Model::GetCallerIdentityOutcome GetCallerIdentity(const Model::GetCallerIdentityRequest &request) const
Aws::STS::STSClient::GetFederationTokenCallable
virtual Model::GetFederationTokenOutcomeCallable GetFederationTokenCallable(const Model::GetFederationTokenRequest &request) const
AsyncCallerContext.h
Aws::STS::Model::AssumeRoleOutcome
Aws::Utils::Outcome< AssumeRoleResult, STSError > AssumeRoleOutcome
Definition: STSClient.h:75
Aws::STS::STSClient::AssumeRoleWithWebIdentityAsync
virtual void AssumeRoleWithWebIdentityAsync(const Model::AssumeRoleWithWebIdentityRequest &request, const AssumeRoleWithWebIdentityResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
Aws::STS::STSClient::STSClient
STSClient(const Aws::Auth::AWSCredentials &credentials, const Aws::Client::ClientConfiguration &clientConfiguration=Aws::Client::ClientConfiguration())
Aws::STS::STSClient::AssumeRoleWithSAMLAsync
virtual void AssumeRoleWithSAMLAsync(const Model::AssumeRoleWithSAMLRequest &request, const AssumeRoleWithSAMLResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
Aws::STS::Model::GetSessionTokenRequest
Definition: GetSessionTokenRequest.h:22
Aws::STS::GetCallerIdentityResponseReceivedHandler
std::function< void(const STSClient *, const Model::GetCallerIdentityRequest &, const Model::GetCallerIdentityOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > GetCallerIdentityResponseReceivedHandler
Definition: STSClient.h:103
GetFederationTokenResult.h
Aws::STS::STSClient::BASECLASS
Aws::Client::AWSXMLClient BASECLASS
Definition: STSClient.h:119
Aws::Client::ClientConfiguration
Definition: ClientConfiguration.h:53
AssumeRoleResult.h
Aws::STS::GetSessionTokenResponseReceivedHandler
std::function< void(const STSClient *, const Model::GetSessionTokenRequest &, const Model::GetSessionTokenOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > GetSessionTokenResponseReceivedHandler
Definition: STSClient.h:105
STS_EXPORTS.h
Aws::STS::AssumeRoleWithSAMLResponseReceivedHandler
std::function< void(const STSClient *, const Model::AssumeRoleWithSAMLRequest &, const Model::AssumeRoleWithSAMLOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > AssumeRoleWithSAMLResponseReceivedHandler
Definition: STSClient.h:99
Aws::STS::Model::AssumeRoleOutcomeCallable
std::future< AssumeRoleOutcome > AssumeRoleOutcomeCallable
Definition: STSClient.h:86
Aws::STS::STSClient::GetAccessKeyInfoAsync
virtual void GetAccessKeyInfoAsync(const Model::GetAccessKeyInfoRequest &request, const GetAccessKeyInfoResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
Aws::STS::GetFederationTokenResponseReceivedHandler
std::function< void(const STSClient *, const Model::GetFederationTokenRequest &, const Model::GetFederationTokenOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > GetFederationTokenResponseReceivedHandler
Definition: STSClient.h:104
Aws::Auth::AWSCredentials
Definition: AWSCredentials.h:19
Aws::STS::STSClient::OverrideEndpoint
void OverrideEndpoint(const Aws::String &endpoint)
Aws::STS::STSClient::ConvertRequestToPresignedUrl
Aws::String ConvertRequestToPresignedUrl(const Aws::AmazonSerializableWebServiceRequest &requestToConvert, const char *region) const
Aws::STS::STSClient::DecodeAuthorizationMessageAsync
virtual void DecodeAuthorizationMessageAsync(const Model::DecodeAuthorizationMessageRequest &request, const DecodeAuthorizationMessageResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
XmlSerializer.h
Aws::STS::Model::DecodeAuthorizationMessageOutcome
Aws::Utils::Outcome< DecodeAuthorizationMessageResult, STSError > DecodeAuthorizationMessageOutcome
Definition: STSClient.h:80
AWSString.h
Aws::STS::Model::GetSessionTokenOutcome
Aws::Utils::Outcome< GetSessionTokenResult, STSError > GetSessionTokenOutcome
Definition: STSClient.h:84
Aws::STS::STSClient::AssumeRoleAsync
virtual void AssumeRoleAsync(const Model::AssumeRoleRequest &request, const AssumeRoleResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
AssumeRoleWithSAMLResult.h
Aws::STS::Model::GetAccessKeyInfoRequest
Definition: GetAccessKeyInfoRequest.h:22
Aws::STS::Model::GetCallerIdentityOutcomeCallable
std::future< GetCallerIdentityOutcome > GetCallerIdentityOutcomeCallable
Definition: STSClient.h:91
Aws::STS::STSClient::GetAccessKeyInfoCallable
virtual Model::GetAccessKeyInfoOutcomeCallable GetAccessKeyInfoCallable(const Model::GetAccessKeyInfoRequest &request) const
Aws::STS::Model::DecodeAuthorizationMessageOutcomeCallable
std::future< DecodeAuthorizationMessageOutcome > DecodeAuthorizationMessageOutcomeCallable
Definition: STSClient.h:89
Aws::STS::STSClient::AssumeRoleCallable
virtual Model::AssumeRoleOutcomeCallable AssumeRoleCallable(const Model::AssumeRoleRequest &request) const
Aws::STS::STSClient::AssumeRole
virtual Model::AssumeRoleOutcome AssumeRole(const Model::AssumeRoleRequest &request) const
Aws::STS::Model::AssumeRoleWithWebIdentityRequest
Definition: AssumeRoleWithWebIdentityRequest.h:24
Aws::STS::GetAccessKeyInfoResponseReceivedHandler
std::function< void(const STSClient *, const Model::GetAccessKeyInfoRequest &, const Model::GetAccessKeyInfoOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > GetAccessKeyInfoResponseReceivedHandler
Definition: STSClient.h:102
Aws::STS::Model::AssumeRoleWithSAMLOutcomeCallable
std::future< AssumeRoleWithSAMLOutcome > AssumeRoleWithSAMLOutcomeCallable
Definition: STSClient.h:87
Aws::STS::STSClient::AssumeRoleWithWebIdentityCallable
virtual Model::AssumeRoleWithWebIdentityOutcomeCallable AssumeRoleWithWebIdentityCallable(const Model::AssumeRoleWithWebIdentityRequest &request) const
Aws::STS::STSClient::AssumeRoleWithSAMLCallable
virtual Model::AssumeRoleWithSAMLOutcomeCallable AssumeRoleWithSAMLCallable(const Model::AssumeRoleWithSAMLRequest &request) const
Aws::STS::Model::GetFederationTokenOutcomeCallable
std::future< GetFederationTokenOutcome > GetFederationTokenOutcomeCallable
Definition: STSClient.h:92
ClientConfiguration.h
Aws
Definition: AccessManagementClient.h:15
HttpTypes.h
Aws::STS::STSClient::GetCallerIdentityCallable
virtual Model::GetCallerIdentityOutcomeCallable GetCallerIdentityCallable(const Model::GetCallerIdentityRequest &request) const
Aws::STS::Model::AssumeRoleWithWebIdentityOutcomeCallable
std::future< AssumeRoleWithWebIdentityOutcome > AssumeRoleWithWebIdentityOutcomeCallable
Definition: STSClient.h:88
Aws::STS::STSClient::GetSessionTokenAsync
virtual void GetSessionTokenAsync(const Model::GetSessionTokenRequest &request, const GetSessionTokenResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
Aws::STS::AssumeRoleResponseReceivedHandler
std::function< void(const STSClient *, const Model::AssumeRoleRequest &, const Model::AssumeRoleOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > AssumeRoleResponseReceivedHandler
Definition: STSClient.h:96
Aws::Utils::Outcome
Definition: Outcome.h:26
Aws::STS::STSClient::STSClient
STSClient(const Aws::Client::ClientConfiguration &clientConfiguration=Aws::Client::ClientConfiguration())
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
AWSClient.h
Aws::STS::Model::GetAccessKeyInfoOutcome
Aws::Utils::Outcome< GetAccessKeyInfoResult, STSError > GetAccessKeyInfoOutcome
Definition: STSClient.h:81
Aws::STS::STSClient::STSClient
STSClient(const std::shared_ptr< Aws::Auth::AWSCredentialsProvider > &credentialsProvider, const Aws::Client::ClientConfiguration &clientConfiguration=Aws::Client::ClientConfiguration())
Aws::STS::STSClient
Definition: STSClient.h:117
Aws::STS::STSClient::DecodeAuthorizationMessage
virtual Model::DecodeAuthorizationMessageOutcome DecodeAuthorizationMessage(const Model::DecodeAuthorizationMessageRequest &request) const
Aws::STS::AssumeRoleWithWebIdentityResponseReceivedHandler
std::function< void(const STSClient *, const Model::AssumeRoleWithWebIdentityRequest &, const Model::AssumeRoleWithWebIdentityOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > AssumeRoleWithWebIdentityResponseReceivedHandler
Definition: STSClient.h:100
Aws::STS::STSClient::GetFederationToken
virtual Model::GetFederationTokenOutcome GetFederationToken(const Model::GetFederationTokenRequest &request) const
Aws::STS::Model::GetCallerIdentityRequest
Definition: GetCallerIdentityRequest.h:20
Aws::Client::AWSXMLClient
Definition: AWSClient.h:388
Aws::STS::STSClient::~STSClient
virtual ~STSClient()
Aws::STS::STSClient::GetCallerIdentityAsync
virtual void GetCallerIdentityAsync(const Model::GetCallerIdentityRequest &request, const GetCallerIdentityResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
GetCallerIdentityResult.h
GetAccessKeyInfoResult.h
AssumeRoleWithWebIdentityResult.h
Aws::STS::Model::GetFederationTokenRequest
Definition: GetFederationTokenRequest.h:25
Aws::STS::STSClient::AssumeRoleWithWebIdentity
virtual Model::AssumeRoleWithWebIdentityOutcome AssumeRoleWithWebIdentity(const Model::AssumeRoleWithWebIdentityRequest &request) const
AmazonSerializableWebServiceRequest.h
Aws::STS::Model::GetCallerIdentityOutcome
Aws::Utils::Outcome< GetCallerIdentityResult, STSError > GetCallerIdentityOutcome
Definition: STSClient.h:82