AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
AssumeRoleRequest.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 <aws/sts/model/Tag.h>
13#include <aws/sts/model/ProvidedContext.h>
14#include <utility>
15
16namespace Aws
17{
18namespace STS
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_STS_API AssumeRoleRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "AssumeRole"; }
35
36 AWS_STS_API Aws::String SerializePayload() const override;
37
38 protected:
39 AWS_STS_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40
41 public:
42
44
47 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
48 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
49 template<typename RoleArnT = Aws::String>
50 void SetRoleArn(RoleArnT&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::forward<RoleArnT>(value); }
51 template<typename RoleArnT = Aws::String>
52 AssumeRoleRequest& WithRoleArn(RoleArnT&& value) { SetRoleArn(std::forward<RoleArnT>(value)); return *this;}
54
56
76 inline const Aws::String& GetRoleSessionName() const { return m_roleSessionName; }
77 inline bool RoleSessionNameHasBeenSet() const { return m_roleSessionNameHasBeenSet; }
78 template<typename RoleSessionNameT = Aws::String>
79 void SetRoleSessionName(RoleSessionNameT&& value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName = std::forward<RoleSessionNameT>(value); }
80 template<typename RoleSessionNameT = Aws::String>
81 AssumeRoleRequest& WithRoleSessionName(RoleSessionNameT&& value) { SetRoleSessionName(std::forward<RoleSessionNameT>(value)); return *this;}
83
85
110 inline const Aws::Vector<PolicyDescriptorType>& GetPolicyArns() const { return m_policyArns; }
111 inline bool PolicyArnsHasBeenSet() const { return m_policyArnsHasBeenSet; }
112 template<typename PolicyArnsT = Aws::Vector<PolicyDescriptorType>>
113 void SetPolicyArns(PolicyArnsT&& value) { m_policyArnsHasBeenSet = true; m_policyArns = std::forward<PolicyArnsT>(value); }
114 template<typename PolicyArnsT = Aws::Vector<PolicyDescriptorType>>
115 AssumeRoleRequest& WithPolicyArns(PolicyArnsT&& value) { SetPolicyArns(std::forward<PolicyArnsT>(value)); return *this;}
116 template<typename PolicyArnsT = PolicyDescriptorType>
117 AssumeRoleRequest& AddPolicyArns(PolicyArnsT&& value) { m_policyArnsHasBeenSet = true; m_policyArns.emplace_back(std::forward<PolicyArnsT>(value)); return *this; }
119
121
147 inline const Aws::String& GetPolicy() const { return m_policy; }
148 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
149 template<typename PolicyT = Aws::String>
150 void SetPolicy(PolicyT&& value) { m_policyHasBeenSet = true; m_policy = std::forward<PolicyT>(value); }
151 template<typename PolicyT = Aws::String>
152 AssumeRoleRequest& WithPolicy(PolicyT&& value) { SetPolicy(std::forward<PolicyT>(value)); return *this;}
154
156
184 inline int GetDurationSeconds() const { return m_durationSeconds; }
185 inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
186 inline void SetDurationSeconds(int value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; }
187 inline AssumeRoleRequest& WithDurationSeconds(int value) { SetDurationSeconds(value); return *this;}
189
191
224 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
225 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
226 template<typename TagsT = Aws::Vector<Tag>>
227 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
228 template<typename TagsT = Aws::Vector<Tag>>
229 AssumeRoleRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
230 template<typename TagsT = Tag>
231 AssumeRoleRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
233
235
245 inline const Aws::Vector<Aws::String>& GetTransitiveTagKeys() const { return m_transitiveTagKeys; }
246 inline bool TransitiveTagKeysHasBeenSet() const { return m_transitiveTagKeysHasBeenSet; }
247 template<typename TransitiveTagKeysT = Aws::Vector<Aws::String>>
248 void SetTransitiveTagKeys(TransitiveTagKeysT&& value) { m_transitiveTagKeysHasBeenSet = true; m_transitiveTagKeys = std::forward<TransitiveTagKeysT>(value); }
249 template<typename TransitiveTagKeysT = Aws::Vector<Aws::String>>
250 AssumeRoleRequest& WithTransitiveTagKeys(TransitiveTagKeysT&& value) { SetTransitiveTagKeys(std::forward<TransitiveTagKeysT>(value)); return *this;}
251 template<typename TransitiveTagKeysT = Aws::String>
252 AssumeRoleRequest& AddTransitiveTagKeys(TransitiveTagKeysT&& value) { m_transitiveTagKeysHasBeenSet = true; m_transitiveTagKeys.emplace_back(std::forward<TransitiveTagKeysT>(value)); return *this; }
254
256
273 inline const Aws::String& GetExternalId() const { return m_externalId; }
274 inline bool ExternalIdHasBeenSet() const { return m_externalIdHasBeenSet; }
275 template<typename ExternalIdT = Aws::String>
276 void SetExternalId(ExternalIdT&& value) { m_externalIdHasBeenSet = true; m_externalId = std::forward<ExternalIdT>(value); }
277 template<typename ExternalIdT = Aws::String>
278 AssumeRoleRequest& WithExternalId(ExternalIdT&& value) { SetExternalId(std::forward<ExternalIdT>(value)); return *this;}
280
282
293 inline const Aws::String& GetSerialNumber() const { return m_serialNumber; }
294 inline bool SerialNumberHasBeenSet() const { return m_serialNumberHasBeenSet; }
295 template<typename SerialNumberT = Aws::String>
296 void SetSerialNumber(SerialNumberT&& value) { m_serialNumberHasBeenSet = true; m_serialNumber = std::forward<SerialNumberT>(value); }
297 template<typename SerialNumberT = Aws::String>
298 AssumeRoleRequest& WithSerialNumber(SerialNumberT&& value) { SetSerialNumber(std::forward<SerialNumberT>(value)); return *this;}
300
302
310 inline const Aws::String& GetTokenCode() const { return m_tokenCode; }
311 inline bool TokenCodeHasBeenSet() const { return m_tokenCodeHasBeenSet; }
312 template<typename TokenCodeT = Aws::String>
313 void SetTokenCode(TokenCodeT&& value) { m_tokenCodeHasBeenSet = true; m_tokenCode = std::forward<TokenCodeT>(value); }
314 template<typename TokenCodeT = Aws::String>
315 AssumeRoleRequest& WithTokenCode(TokenCodeT&& value) { SetTokenCode(std::forward<TokenCodeT>(value)); return *this;}
317
319
340 inline const Aws::String& GetSourceIdentity() const { return m_sourceIdentity; }
341 inline bool SourceIdentityHasBeenSet() const { return m_sourceIdentityHasBeenSet; }
342 template<typename SourceIdentityT = Aws::String>
343 void SetSourceIdentity(SourceIdentityT&& value) { m_sourceIdentityHasBeenSet = true; m_sourceIdentity = std::forward<SourceIdentityT>(value); }
344 template<typename SourceIdentityT = Aws::String>
345 AssumeRoleRequest& WithSourceIdentity(SourceIdentityT&& value) { SetSourceIdentity(std::forward<SourceIdentityT>(value)); return *this;}
347
349
359 inline const Aws::Vector<ProvidedContext>& GetProvidedContexts() const { return m_providedContexts; }
360 inline bool ProvidedContextsHasBeenSet() const { return m_providedContextsHasBeenSet; }
361 template<typename ProvidedContextsT = Aws::Vector<ProvidedContext>>
362 void SetProvidedContexts(ProvidedContextsT&& value) { m_providedContextsHasBeenSet = true; m_providedContexts = std::forward<ProvidedContextsT>(value); }
363 template<typename ProvidedContextsT = Aws::Vector<ProvidedContext>>
364 AssumeRoleRequest& WithProvidedContexts(ProvidedContextsT&& value) { SetProvidedContexts(std::forward<ProvidedContextsT>(value)); return *this;}
365 template<typename ProvidedContextsT = ProvidedContext>
366 AssumeRoleRequest& AddProvidedContexts(ProvidedContextsT&& value) { m_providedContextsHasBeenSet = true; m_providedContexts.emplace_back(std::forward<ProvidedContextsT>(value)); return *this; }
368 private:
369
370 Aws::String m_roleArn;
371 bool m_roleArnHasBeenSet = false;
372
373 Aws::String m_roleSessionName;
374 bool m_roleSessionNameHasBeenSet = false;
375
377 bool m_policyArnsHasBeenSet = false;
378
379 Aws::String m_policy;
380 bool m_policyHasBeenSet = false;
381
382 int m_durationSeconds{0};
383 bool m_durationSecondsHasBeenSet = false;
384
385 Aws::Vector<Tag> m_tags;
386 bool m_tagsHasBeenSet = false;
387
388 Aws::Vector<Aws::String> m_transitiveTagKeys;
389 bool m_transitiveTagKeysHasBeenSet = false;
390
391 Aws::String m_externalId;
392 bool m_externalIdHasBeenSet = false;
393
394 Aws::String m_serialNumber;
395 bool m_serialNumberHasBeenSet = false;
396
397 Aws::String m_tokenCode;
398 bool m_tokenCodeHasBeenSet = false;
399
400 Aws::String m_sourceIdentity;
401 bool m_sourceIdentityHasBeenSet = false;
402
403 Aws::Vector<ProvidedContext> m_providedContexts;
404 bool m_providedContextsHasBeenSet = false;
405 };
406
407} // namespace Model
408} // namespace STS
409} // namespace Aws
virtual const char * GetServiceRequestName() const override
void SetSerialNumber(SerialNumberT &&value)
const Aws::String & GetRoleArn() const
AssumeRoleRequest & WithTags(TagsT &&value)
void SetTransitiveTagKeys(TransitiveTagKeysT &&value)
const Aws::String & GetSerialNumber() const
AssumeRoleRequest & AddProvidedContexts(ProvidedContextsT &&value)
AssumeRoleRequest & WithTokenCode(TokenCodeT &&value)
AssumeRoleRequest & AddTags(TagsT &&value)
AssumeRoleRequest & AddPolicyArns(PolicyArnsT &&value)
void SetTokenCode(TokenCodeT &&value)
AssumeRoleRequest & WithPolicy(PolicyT &&value)
AssumeRoleRequest & WithRoleArn(RoleArnT &&value)
AssumeRoleRequest & WithRoleSessionName(RoleSessionNameT &&value)
AWS_STS_API AssumeRoleRequest()=default
AssumeRoleRequest & WithDurationSeconds(int value)
const Aws::String & GetPolicy() const
AWS_STS_API Aws::String SerializePayload() const override
const Aws::String & GetSourceIdentity() const
AssumeRoleRequest & WithPolicyArns(PolicyArnsT &&value)
const Aws::Vector< Aws::String > & GetTransitiveTagKeys() const
AssumeRoleRequest & WithSourceIdentity(SourceIdentityT &&value)
void SetPolicyArns(PolicyArnsT &&value)
AWS_STS_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetRoleSessionName(RoleSessionNameT &&value)
AssumeRoleRequest & WithSerialNumber(SerialNumberT &&value)
void SetExternalId(ExternalIdT &&value)
const Aws::String & GetTokenCode() const
AssumeRoleRequest & WithTransitiveTagKeys(TransitiveTagKeysT &&value)
AssumeRoleRequest & WithExternalId(ExternalIdT &&value)
AssumeRoleRequest & WithProvidedContexts(ProvidedContextsT &&value)
const Aws::String & GetExternalId() const
const Aws::Vector< Tag > & GetTags() const
void SetSourceIdentity(SourceIdentityT &&value)
AssumeRoleRequest & AddTransitiveTagKeys(TransitiveTagKeysT &&value)
const Aws::Vector< ProvidedContext > & GetProvidedContexts() const
const Aws::String & GetRoleSessionName() const
const Aws::Vector< PolicyDescriptorType > & GetPolicyArns() const
void SetProvidedContexts(ProvidedContextsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector