AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
50 inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); }
51 inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); }
52 inline AssumeRoleRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;}
53 inline AssumeRoleRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;}
54 inline AssumeRoleRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;}
56
58
71 inline const Aws::String& GetRoleSessionName() const{ return m_roleSessionName; }
72 inline bool RoleSessionNameHasBeenSet() const { return m_roleSessionNameHasBeenSet; }
73 inline void SetRoleSessionName(const Aws::String& value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName = value; }
74 inline void SetRoleSessionName(Aws::String&& value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName = std::move(value); }
75 inline void SetRoleSessionName(const char* value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName.assign(value); }
76 inline AssumeRoleRequest& WithRoleSessionName(const Aws::String& value) { SetRoleSessionName(value); return *this;}
77 inline AssumeRoleRequest& WithRoleSessionName(Aws::String&& value) { SetRoleSessionName(std::move(value)); return *this;}
78 inline AssumeRoleRequest& WithRoleSessionName(const char* value) { SetRoleSessionName(value); return *this;}
80
82
107 inline const Aws::Vector<PolicyDescriptorType>& GetPolicyArns() const{ return m_policyArns; }
108 inline bool PolicyArnsHasBeenSet() const { return m_policyArnsHasBeenSet; }
109 inline void SetPolicyArns(const Aws::Vector<PolicyDescriptorType>& value) { m_policyArnsHasBeenSet = true; m_policyArns = value; }
110 inline void SetPolicyArns(Aws::Vector<PolicyDescriptorType>&& value) { m_policyArnsHasBeenSet = true; m_policyArns = std::move(value); }
112 inline AssumeRoleRequest& WithPolicyArns(Aws::Vector<PolicyDescriptorType>&& value) { SetPolicyArns(std::move(value)); return *this;}
113 inline AssumeRoleRequest& AddPolicyArns(const PolicyDescriptorType& value) { m_policyArnsHasBeenSet = true; m_policyArns.push_back(value); return *this; }
114 inline AssumeRoleRequest& AddPolicyArns(PolicyDescriptorType&& value) { m_policyArnsHasBeenSet = true; m_policyArns.push_back(std::move(value)); return *this; }
116
118
141 inline const Aws::String& GetPolicy() const{ return m_policy; }
142 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
143 inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; }
144 inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); }
145 inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); }
146 inline AssumeRoleRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;}
147 inline AssumeRoleRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;}
148 inline AssumeRoleRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;}
150
152
180 inline int GetDurationSeconds() const{ return m_durationSeconds; }
181 inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
182 inline void SetDurationSeconds(int value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; }
183 inline AssumeRoleRequest& WithDurationSeconds(int value) { SetDurationSeconds(value); return *this;}
185
187
220 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
221 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
222 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
223 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
224 inline AssumeRoleRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
225 inline AssumeRoleRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
226 inline AssumeRoleRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
227 inline AssumeRoleRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
229
231
242 inline const Aws::Vector<Aws::String>& GetTransitiveTagKeys() const{ return m_transitiveTagKeys; }
243 inline bool TransitiveTagKeysHasBeenSet() const { return m_transitiveTagKeysHasBeenSet; }
244 inline void SetTransitiveTagKeys(const Aws::Vector<Aws::String>& value) { m_transitiveTagKeysHasBeenSet = true; m_transitiveTagKeys = value; }
245 inline void SetTransitiveTagKeys(Aws::Vector<Aws::String>&& value) { m_transitiveTagKeysHasBeenSet = true; m_transitiveTagKeys = std::move(value); }
248 inline AssumeRoleRequest& AddTransitiveTagKeys(const Aws::String& value) { m_transitiveTagKeysHasBeenSet = true; m_transitiveTagKeys.push_back(value); return *this; }
249 inline AssumeRoleRequest& AddTransitiveTagKeys(Aws::String&& value) { m_transitiveTagKeysHasBeenSet = true; m_transitiveTagKeys.push_back(std::move(value)); return *this; }
250 inline AssumeRoleRequest& AddTransitiveTagKeys(const char* value) { m_transitiveTagKeysHasBeenSet = true; m_transitiveTagKeys.push_back(value); return *this; }
252
254
271 inline const Aws::String& GetExternalId() const{ return m_externalId; }
272 inline bool ExternalIdHasBeenSet() const { return m_externalIdHasBeenSet; }
273 inline void SetExternalId(const Aws::String& value) { m_externalIdHasBeenSet = true; m_externalId = value; }
274 inline void SetExternalId(Aws::String&& value) { m_externalIdHasBeenSet = true; m_externalId = std::move(value); }
275 inline void SetExternalId(const char* value) { m_externalIdHasBeenSet = true; m_externalId.assign(value); }
276 inline AssumeRoleRequest& WithExternalId(const Aws::String& value) { SetExternalId(value); return *this;}
277 inline AssumeRoleRequest& WithExternalId(Aws::String&& value) { SetExternalId(std::move(value)); return *this;}
278 inline AssumeRoleRequest& WithExternalId(const char* value) { SetExternalId(value); return *this;}
280
282
293 inline const Aws::String& GetSerialNumber() const{ return m_serialNumber; }
294 inline bool SerialNumberHasBeenSet() const { return m_serialNumberHasBeenSet; }
295 inline void SetSerialNumber(const Aws::String& value) { m_serialNumberHasBeenSet = true; m_serialNumber = value; }
296 inline void SetSerialNumber(Aws::String&& value) { m_serialNumberHasBeenSet = true; m_serialNumber = std::move(value); }
297 inline void SetSerialNumber(const char* value) { m_serialNumberHasBeenSet = true; m_serialNumber.assign(value); }
298 inline AssumeRoleRequest& WithSerialNumber(const Aws::String& value) { SetSerialNumber(value); return *this;}
299 inline AssumeRoleRequest& WithSerialNumber(Aws::String&& value) { SetSerialNumber(std::move(value)); return *this;}
300 inline AssumeRoleRequest& WithSerialNumber(const char* value) { SetSerialNumber(value); return *this;}
302
304
312 inline const Aws::String& GetTokenCode() const{ return m_tokenCode; }
313 inline bool TokenCodeHasBeenSet() const { return m_tokenCodeHasBeenSet; }
314 inline void SetTokenCode(const Aws::String& value) { m_tokenCodeHasBeenSet = true; m_tokenCode = value; }
315 inline void SetTokenCode(Aws::String&& value) { m_tokenCodeHasBeenSet = true; m_tokenCode = std::move(value); }
316 inline void SetTokenCode(const char* value) { m_tokenCodeHasBeenSet = true; m_tokenCode.assign(value); }
317 inline AssumeRoleRequest& WithTokenCode(const Aws::String& value) { SetTokenCode(value); return *this;}
318 inline AssumeRoleRequest& WithTokenCode(Aws::String&& value) { SetTokenCode(std::move(value)); return *this;}
319 inline AssumeRoleRequest& WithTokenCode(const char* value) { SetTokenCode(value); return *this;}
321
323
340 inline const Aws::String& GetSourceIdentity() const{ return m_sourceIdentity; }
341 inline bool SourceIdentityHasBeenSet() const { return m_sourceIdentityHasBeenSet; }
342 inline void SetSourceIdentity(const Aws::String& value) { m_sourceIdentityHasBeenSet = true; m_sourceIdentity = value; }
343 inline void SetSourceIdentity(Aws::String&& value) { m_sourceIdentityHasBeenSet = true; m_sourceIdentity = std::move(value); }
344 inline void SetSourceIdentity(const char* value) { m_sourceIdentityHasBeenSet = true; m_sourceIdentity.assign(value); }
345 inline AssumeRoleRequest& WithSourceIdentity(const Aws::String& value) { SetSourceIdentity(value); return *this;}
346 inline AssumeRoleRequest& WithSourceIdentity(Aws::String&& value) { SetSourceIdentity(std::move(value)); return *this;}
347 inline AssumeRoleRequest& WithSourceIdentity(const char* value) { SetSourceIdentity(value); return *this;}
349
351
361 inline const Aws::Vector<ProvidedContext>& GetProvidedContexts() const{ return m_providedContexts; }
362 inline bool ProvidedContextsHasBeenSet() const { return m_providedContextsHasBeenSet; }
363 inline void SetProvidedContexts(const Aws::Vector<ProvidedContext>& value) { m_providedContextsHasBeenSet = true; m_providedContexts = value; }
364 inline void SetProvidedContexts(Aws::Vector<ProvidedContext>&& value) { m_providedContextsHasBeenSet = true; m_providedContexts = std::move(value); }
367 inline AssumeRoleRequest& AddProvidedContexts(const ProvidedContext& value) { m_providedContextsHasBeenSet = true; m_providedContexts.push_back(value); return *this; }
368 inline AssumeRoleRequest& AddProvidedContexts(ProvidedContext&& value) { m_providedContextsHasBeenSet = true; m_providedContexts.push_back(std::move(value)); return *this; }
370 private:
371
372 Aws::String m_roleArn;
373 bool m_roleArnHasBeenSet = false;
374
375 Aws::String m_roleSessionName;
376 bool m_roleSessionNameHasBeenSet = false;
377
379 bool m_policyArnsHasBeenSet = false;
380
381 Aws::String m_policy;
382 bool m_policyHasBeenSet = false;
383
384 int m_durationSeconds;
385 bool m_durationSecondsHasBeenSet = false;
386
387 Aws::Vector<Tag> m_tags;
388 bool m_tagsHasBeenSet = false;
389
390 Aws::Vector<Aws::String> m_transitiveTagKeys;
391 bool m_transitiveTagKeysHasBeenSet = false;
392
393 Aws::String m_externalId;
394 bool m_externalIdHasBeenSet = false;
395
396 Aws::String m_serialNumber;
397 bool m_serialNumberHasBeenSet = false;
398
399 Aws::String m_tokenCode;
400 bool m_tokenCodeHasBeenSet = false;
401
402 Aws::String m_sourceIdentity;
403 bool m_sourceIdentityHasBeenSet = false;
404
405 Aws::Vector<ProvidedContext> m_providedContexts;
406 bool m_providedContextsHasBeenSet = false;
407 };
408
409} // namespace Model
410} // namespace STS
411} // namespace Aws
AssumeRoleRequest & WithRoleSessionName(const Aws::String &value)
AssumeRoleRequest & WithPolicyArns(const Aws::Vector< PolicyDescriptorType > &value)
virtual const char * GetServiceRequestName() const override
void SetTransitiveTagKeys(Aws::Vector< Aws::String > &&value)
const Aws::String & GetRoleArn() const
void SetExternalId(const char *value)
AssumeRoleRequest & WithExternalId(const char *value)
AssumeRoleRequest & AddPolicyArns(PolicyDescriptorType &&value)
AssumeRoleRequest & WithRoleArn(const Aws::String &value)
AssumeRoleRequest & AddTransitiveTagKeys(const char *value)
const Aws::String & GetSerialNumber() const
void SetSerialNumber(const Aws::String &value)
void SetSerialNumber(const char *value)
AssumeRoleRequest & WithSourceIdentity(const char *value)
AssumeRoleRequest & AddTags(Tag &&value)
void SetTokenCode(Aws::String &&value)
AssumeRoleRequest & WithTokenCode(Aws::String &&value)
AssumeRoleRequest & WithSerialNumber(const char *value)
void SetPolicyArns(const Aws::Vector< PolicyDescriptorType > &value)
void SetRoleArn(Aws::String &&value)
void SetTags(Aws::Vector< Tag > &&value)
AssumeRoleRequest & WithTokenCode(const char *value)
AssumeRoleRequest & WithTags(const Aws::Vector< Tag > &value)
AssumeRoleRequest & WithRoleSessionName(const char *value)
void SetTransitiveTagKeys(const Aws::Vector< Aws::String > &value)
void SetSourceIdentity(const char *value)
void SetProvidedContexts(Aws::Vector< ProvidedContext > &&value)
void SetPolicy(Aws::String &&value)
void SetSourceIdentity(Aws::String &&value)
AssumeRoleRequest & WithSourceIdentity(Aws::String &&value)
void SetTokenCode(const Aws::String &value)
AssumeRoleRequest & WithExternalId(Aws::String &&value)
void SetExternalId(const Aws::String &value)
AssumeRoleRequest & WithDurationSeconds(int value)
const Aws::String & GetPolicy() const
AssumeRoleRequest & AddTransitiveTagKeys(const Aws::String &value)
AssumeRoleRequest & WithPolicyArns(Aws::Vector< PolicyDescriptorType > &&value)
void SetTags(const Aws::Vector< Tag > &value)
AWS_STS_API Aws::String SerializePayload() const override
AssumeRoleRequest & WithPolicy(Aws::String &&value)
const Aws::String & GetSourceIdentity() const
AssumeRoleRequest & WithProvidedContexts(Aws::Vector< ProvidedContext > &&value)
AssumeRoleRequest & WithRoleArn(const char *value)
AssumeRoleRequest & WithPolicy(const char *value)
AssumeRoleRequest & AddProvidedContexts(const ProvidedContext &value)
const Aws::Vector< Aws::String > & GetTransitiveTagKeys() const
AssumeRoleRequest & WithSerialNumber(Aws::String &&value)
void SetExternalId(Aws::String &&value)
AssumeRoleRequest & AddTags(const Tag &value)
AssumeRoleRequest & WithTransitiveTagKeys(Aws::Vector< Aws::String > &&value)
AssumeRoleRequest & WithRoleArn(Aws::String &&value)
void SetSourceIdentity(const Aws::String &value)
AssumeRoleRequest & WithSerialNumber(const Aws::String &value)
AWS_STS_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AssumeRoleRequest & WithPolicy(const Aws::String &value)
AssumeRoleRequest & WithTransitiveTagKeys(const Aws::Vector< Aws::String > &value)
void SetPolicy(const Aws::String &value)
void SetRoleSessionName(const Aws::String &value)
const Aws::String & GetTokenCode() const
AssumeRoleRequest & WithProvidedContexts(const Aws::Vector< ProvidedContext > &value)
const Aws::String & GetExternalId() const
const Aws::Vector< Tag > & GetTags() const
AssumeRoleRequest & AddTransitiveTagKeys(Aws::String &&value)
void SetRoleArn(const Aws::String &value)
AssumeRoleRequest & WithExternalId(const Aws::String &value)
AssumeRoleRequest & AddPolicyArns(const PolicyDescriptorType &value)
AssumeRoleRequest & WithTags(Aws::Vector< Tag > &&value)
void SetProvidedContexts(const Aws::Vector< ProvidedContext > &value)
void SetPolicyArns(Aws::Vector< PolicyDescriptorType > &&value)
AssumeRoleRequest & WithRoleSessionName(Aws::String &&value)
void SetRoleSessionName(Aws::String &&value)
void SetRoleSessionName(const char *value)
const Aws::Vector< ProvidedContext > & GetProvidedContexts() const
AssumeRoleRequest & WithSourceIdentity(const Aws::String &value)
void SetSerialNumber(Aws::String &&value)
AssumeRoleRequest & WithTokenCode(const Aws::String &value)
const Aws::String & GetRoleSessionName() const
AssumeRoleRequest & AddProvidedContexts(ProvidedContext &&value)
const Aws::Vector< PolicyDescriptorType > & GetPolicyArns() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector