AWS SDK for C++  0.14.3
AWS SDK for C++
AssumeRoleRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/sts/STS_EXPORTS.h>
17 #include <aws/sts/STSRequest.h>
19 
20 namespace Aws
21 {
22 namespace STS
23 {
24 namespace Model
25 {
26 
30  {
31  public:
33  Aws::String SerializePayload() const override;
34 
38  inline const Aws::String& GetRoleArn() const{ return m_roleArn; }
39 
43  inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
44 
48  inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
49 
53  inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); }
54 
58  inline AssumeRoleRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;}
59 
63  inline AssumeRoleRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(value); return *this;}
64 
68  inline AssumeRoleRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;}
69 
83  inline const Aws::String& GetRoleSessionName() const{ return m_roleSessionName; }
84 
98  inline void SetRoleSessionName(const Aws::String& value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName = value; }
99 
113  inline void SetRoleSessionName(Aws::String&& value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName = value; }
114 
128  inline void SetRoleSessionName(const char* value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName.assign(value); }
129 
143  inline AssumeRoleRequest& WithRoleSessionName(const Aws::String& value) { SetRoleSessionName(value); return *this;}
144 
158  inline AssumeRoleRequest& WithRoleSessionName(Aws::String&& value) { SetRoleSessionName(value); return *this;}
159 
173  inline AssumeRoleRequest& WithRoleSessionName(const char* value) { SetRoleSessionName(value); return *this;}
174 
197  inline const Aws::String& GetPolicy() const{ return m_policy; }
198 
221  inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; }
222 
245  inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = value; }
246 
269  inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); }
270 
293  inline AssumeRoleRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;}
294 
317  inline AssumeRoleRequest& WithPolicy(Aws::String&& value) { SetPolicy(value); return *this;}
318 
341  inline AssumeRoleRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;}
342 
356  inline int GetDurationSeconds() const{ return m_durationSeconds; }
357 
371  inline void SetDurationSeconds(int value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; }
372 
386  inline AssumeRoleRequest& WithDurationSeconds(int value) { SetDurationSeconds(value); return *this;}
387 
403  inline const Aws::String& GetExternalId() const{ return m_externalId; }
404 
420  inline void SetExternalId(const Aws::String& value) { m_externalIdHasBeenSet = true; m_externalId = value; }
421 
437  inline void SetExternalId(Aws::String&& value) { m_externalIdHasBeenSet = true; m_externalId = value; }
438 
454  inline void SetExternalId(const char* value) { m_externalIdHasBeenSet = true; m_externalId.assign(value); }
455 
471  inline AssumeRoleRequest& WithExternalId(const Aws::String& value) { SetExternalId(value); return *this;}
472 
488  inline AssumeRoleRequest& WithExternalId(Aws::String&& value) { SetExternalId(value); return *this;}
489 
505  inline AssumeRoleRequest& WithExternalId(const char* value) { SetExternalId(value); return *this;}
506 
519  inline const Aws::String& GetSerialNumber() const{ return m_serialNumber; }
520 
533  inline void SetSerialNumber(const Aws::String& value) { m_serialNumberHasBeenSet = true; m_serialNumber = value; }
534 
547  inline void SetSerialNumber(Aws::String&& value) { m_serialNumberHasBeenSet = true; m_serialNumber = value; }
548 
561  inline void SetSerialNumber(const char* value) { m_serialNumberHasBeenSet = true; m_serialNumber.assign(value); }
562 
575  inline AssumeRoleRequest& WithSerialNumber(const Aws::String& value) { SetSerialNumber(value); return *this;}
576 
589  inline AssumeRoleRequest& WithSerialNumber(Aws::String&& value) { SetSerialNumber(value); return *this;}
590 
603  inline AssumeRoleRequest& WithSerialNumber(const char* value) { SetSerialNumber(value); return *this;}
604 
613  inline const Aws::String& GetTokenCode() const{ return m_tokenCode; }
614 
623  inline void SetTokenCode(const Aws::String& value) { m_tokenCodeHasBeenSet = true; m_tokenCode = value; }
624 
633  inline void SetTokenCode(Aws::String&& value) { m_tokenCodeHasBeenSet = true; m_tokenCode = value; }
634 
643  inline void SetTokenCode(const char* value) { m_tokenCodeHasBeenSet = true; m_tokenCode.assign(value); }
644 
653  inline AssumeRoleRequest& WithTokenCode(const Aws::String& value) { SetTokenCode(value); return *this;}
654 
663  inline AssumeRoleRequest& WithTokenCode(Aws::String&& value) { SetTokenCode(value); return *this;}
664 
673  inline AssumeRoleRequest& WithTokenCode(const char* value) { SetTokenCode(value); return *this;}
674 
675  private:
676  Aws::String m_roleArn;
677  bool m_roleArnHasBeenSet;
678  Aws::String m_roleSessionName;
679  bool m_roleSessionNameHasBeenSet;
680  Aws::String m_policy;
681  bool m_policyHasBeenSet;
682  int m_durationSeconds;
683  bool m_durationSecondsHasBeenSet;
684  Aws::String m_externalId;
685  bool m_externalIdHasBeenSet;
686  Aws::String m_serialNumber;
687  bool m_serialNumberHasBeenSet;
688  Aws::String m_tokenCode;
689  bool m_tokenCodeHasBeenSet;
690  };
691 
692 } // namespace Model
693 } // namespace STS
694 } // namespace Aws
void SetRoleSessionName(const char *value)
void SetTokenCode(Aws::String &&value)
#define AWS_STS_API
Definition: STS_EXPORTS.h:37
AssumeRoleRequest & WithRoleSessionName(Aws::String &&value)
AssumeRoleRequest & WithSerialNumber(const char *value)
const Aws::String & GetRoleArn() const
void SetPolicy(const Aws::String &value)
void SetRoleArn(Aws::String &&value)
const Aws::String & GetTokenCode() const
void SetRoleArn(const char *value)
const Aws::String & GetSerialNumber() const
void SetTokenCode(const char *value)
AssumeRoleRequest & WithRoleSessionName(const char *value)
AssumeRoleRequest & WithRoleArn(const Aws::String &value)
AssumeRoleRequest & WithPolicy(const Aws::String &value)
void SetSerialNumber(const char *value)
void SetTokenCode(const Aws::String &value)
AssumeRoleRequest & WithPolicy(Aws::String &&value)
const Aws::String & GetExternalId() const
void SetRoleSessionName(const Aws::String &value)
void SetRoleSessionName(Aws::String &&value)
void SetSerialNumber(Aws::String &&value)
AssumeRoleRequest & WithTokenCode(Aws::String &&value)
void SetExternalId(const Aws::String &value)
AssumeRoleRequest & WithRoleArn(Aws::String &&value)
AssumeRoleRequest & WithExternalId(const Aws::String &value)
AssumeRoleRequest & WithDurationSeconds(int value)
const Aws::String & GetRoleSessionName() const
void SetPolicy(Aws::String &&value)
AssumeRoleRequest & WithExternalId(Aws::String &&value)
AssumeRoleRequest & WithPolicy(const char *value)
AssumeRoleRequest & WithRoleArn(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
AssumeRoleRequest & WithExternalId(const char *value)
void SetExternalId(Aws::String &&value)
AssumeRoleRequest & WithTokenCode(const Aws::String &value)
AssumeRoleRequest & WithSerialNumber(const Aws::String &value)
AssumeRoleRequest & WithSerialNumber(Aws::String &&value)
const Aws::String & GetPolicy() const
AssumeRoleRequest & WithTokenCode(const char *value)
void SetExternalId(const char *value)
AssumeRoleRequest & WithRoleSessionName(const Aws::String &value)
void SetRoleArn(const Aws::String &value)
JSON (JavaScript Object Notation).
void SetSerialNumber(const Aws::String &value)