AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
AssumeRoleWithWebIdentityRequest.h
1
6#pragma once
7#include <aws/sts/STS_EXPORTS.h>
8#include <aws/sts/STSRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/sts/model/PolicyDescriptorType.h>
12#include <utility>
13
14namespace Aws
15{
16namespace STS
17{
18namespace Model
19{
20
24 {
25 public:
26 AWS_STS_API AssumeRoleWithWebIdentityRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "AssumeRoleWithWebIdentity"; }
33
34 AWS_STS_API Aws::String SerializePayload() const override;
35
36 protected:
37 AWS_STS_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38
39 public:
40
42
58 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
59 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
60 template<typename RoleArnT = Aws::String>
61 void SetRoleArn(RoleArnT&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::forward<RoleArnT>(value); }
62 template<typename RoleArnT = Aws::String>
63 AssumeRoleWithWebIdentityRequest& WithRoleArn(RoleArnT&& value) { SetRoleArn(std::forward<RoleArnT>(value)); return *this;}
65
67
84 inline const Aws::String& GetRoleSessionName() const { return m_roleSessionName; }
85 inline bool RoleSessionNameHasBeenSet() const { return m_roleSessionNameHasBeenSet; }
86 template<typename RoleSessionNameT = Aws::String>
87 void SetRoleSessionName(RoleSessionNameT&& value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName = std::forward<RoleSessionNameT>(value); }
88 template<typename RoleSessionNameT = Aws::String>
89 AssumeRoleWithWebIdentityRequest& WithRoleSessionName(RoleSessionNameT&& value) { SetRoleSessionName(std::forward<RoleSessionNameT>(value)); return *this;}
91
93
102 inline const Aws::String& GetWebIdentityToken() const { return m_webIdentityToken; }
103 inline bool WebIdentityTokenHasBeenSet() const { return m_webIdentityTokenHasBeenSet; }
104 template<typename WebIdentityTokenT = Aws::String>
105 void SetWebIdentityToken(WebIdentityTokenT&& value) { m_webIdentityTokenHasBeenSet = true; m_webIdentityToken = std::forward<WebIdentityTokenT>(value); }
106 template<typename WebIdentityTokenT = Aws::String>
107 AssumeRoleWithWebIdentityRequest& WithWebIdentityToken(WebIdentityTokenT&& value) { SetWebIdentityToken(std::forward<WebIdentityTokenT>(value)); return *this;}
109
111
119 inline const Aws::String& GetProviderId() const { return m_providerId; }
120 inline bool ProviderIdHasBeenSet() const { return m_providerIdHasBeenSet; }
121 template<typename ProviderIdT = Aws::String>
122 void SetProviderId(ProviderIdT&& value) { m_providerIdHasBeenSet = true; m_providerId = std::forward<ProviderIdT>(value); }
123 template<typename ProviderIdT = Aws::String>
124 AssumeRoleWithWebIdentityRequest& WithProviderId(ProviderIdT&& value) { SetProviderId(std::forward<ProviderIdT>(value)); return *this;}
126
128
153 inline const Aws::Vector<PolicyDescriptorType>& GetPolicyArns() const { return m_policyArns; }
154 inline bool PolicyArnsHasBeenSet() const { return m_policyArnsHasBeenSet; }
155 template<typename PolicyArnsT = Aws::Vector<PolicyDescriptorType>>
156 void SetPolicyArns(PolicyArnsT&& value) { m_policyArnsHasBeenSet = true; m_policyArns = std::forward<PolicyArnsT>(value); }
157 template<typename PolicyArnsT = Aws::Vector<PolicyDescriptorType>>
158 AssumeRoleWithWebIdentityRequest& WithPolicyArns(PolicyArnsT&& value) { SetPolicyArns(std::forward<PolicyArnsT>(value)); return *this;}
159 template<typename PolicyArnsT = PolicyDescriptorType>
160 AssumeRoleWithWebIdentityRequest& AddPolicyArns(PolicyArnsT&& value) { m_policyArnsHasBeenSet = true; m_policyArns.emplace_back(std::forward<PolicyArnsT>(value)); return *this; }
162
164
189 inline const Aws::String& GetPolicy() const { return m_policy; }
190 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
191 template<typename PolicyT = Aws::String>
192 void SetPolicy(PolicyT&& value) { m_policyHasBeenSet = true; m_policy = std::forward<PolicyT>(value); }
193 template<typename PolicyT = Aws::String>
194 AssumeRoleWithWebIdentityRequest& WithPolicy(PolicyT&& value) { SetPolicy(std::forward<PolicyT>(value)); return *this;}
196
198
218 inline int GetDurationSeconds() const { return m_durationSeconds; }
219 inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
220 inline void SetDurationSeconds(int value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; }
223 private:
224
225 Aws::String m_roleArn;
226 bool m_roleArnHasBeenSet = false;
227
228 Aws::String m_roleSessionName;
229 bool m_roleSessionNameHasBeenSet = false;
230
231 Aws::String m_webIdentityToken;
232 bool m_webIdentityTokenHasBeenSet = false;
233
234 Aws::String m_providerId;
235 bool m_providerIdHasBeenSet = false;
236
238 bool m_policyArnsHasBeenSet = false;
239
240 Aws::String m_policy;
241 bool m_policyHasBeenSet = false;
242
243 int m_durationSeconds{0};
244 bool m_durationSecondsHasBeenSet = false;
245 };
246
247} // namespace Model
248} // namespace STS
249} // namespace Aws
AWS_STS_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
const Aws::Vector< PolicyDescriptorType > & GetPolicyArns() const
AssumeRoleWithWebIdentityRequest & WithRoleArn(RoleArnT &&value)
AssumeRoleWithWebIdentityRequest & WithPolicyArns(PolicyArnsT &&value)
AssumeRoleWithWebIdentityRequest & WithDurationSeconds(int value)
AWS_STS_API Aws::String SerializePayload() const override
AssumeRoleWithWebIdentityRequest & WithRoleSessionName(RoleSessionNameT &&value)
AssumeRoleWithWebIdentityRequest & WithProviderId(ProviderIdT &&value)
AssumeRoleWithWebIdentityRequest & AddPolicyArns(PolicyArnsT &&value)
AssumeRoleWithWebIdentityRequest & WithPolicy(PolicyT &&value)
AssumeRoleWithWebIdentityRequest & WithWebIdentityToken(WebIdentityTokenT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector