1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/ec2/EC2_EXPORTS.h> 8 #include <aws/ec2/EC2Request.h> 9 #include <aws/ec2/model/IamInstanceProfileSpecification.h> 10 #include <aws/core/utils/memory/stl/AWSString.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace EC2 16 { 17 namespace Model 18 { 19 20 /** 21 */ 22 class AWS_EC2_API ReplaceIamInstanceProfileAssociationRequest : public EC2Request 23 { 24 public: 25 ReplaceIamInstanceProfileAssociationRequest(); 26 27 // Service request name is the Operation name which will send this request out, 28 // each operation should has unique request name, so that we can get operation's name from this request. 29 // Note: this is not true for response, multiple operations may have the same response name, 30 // so we can not get operation's name from response. GetServiceRequestName()31 inline virtual const char* GetServiceRequestName() const override { return "ReplaceIamInstanceProfileAssociation"; } 32 33 Aws::String SerializePayload() const override; 34 35 protected: 36 void DumpBodyToUrl(Aws::Http::URI& uri ) const override; 37 38 public: 39 40 /** 41 * <p>The IAM instance profile.</p> 42 */ GetIamInstanceProfile()43 inline const IamInstanceProfileSpecification& GetIamInstanceProfile() const{ return m_iamInstanceProfile; } 44 45 /** 46 * <p>The IAM instance profile.</p> 47 */ IamInstanceProfileHasBeenSet()48 inline bool IamInstanceProfileHasBeenSet() const { return m_iamInstanceProfileHasBeenSet; } 49 50 /** 51 * <p>The IAM instance profile.</p> 52 */ SetIamInstanceProfile(const IamInstanceProfileSpecification & value)53 inline void SetIamInstanceProfile(const IamInstanceProfileSpecification& value) { m_iamInstanceProfileHasBeenSet = true; m_iamInstanceProfile = value; } 54 55 /** 56 * <p>The IAM instance profile.</p> 57 */ SetIamInstanceProfile(IamInstanceProfileSpecification && value)58 inline void SetIamInstanceProfile(IamInstanceProfileSpecification&& value) { m_iamInstanceProfileHasBeenSet = true; m_iamInstanceProfile = std::move(value); } 59 60 /** 61 * <p>The IAM instance profile.</p> 62 */ WithIamInstanceProfile(const IamInstanceProfileSpecification & value)63 inline ReplaceIamInstanceProfileAssociationRequest& WithIamInstanceProfile(const IamInstanceProfileSpecification& value) { SetIamInstanceProfile(value); return *this;} 64 65 /** 66 * <p>The IAM instance profile.</p> 67 */ WithIamInstanceProfile(IamInstanceProfileSpecification && value)68 inline ReplaceIamInstanceProfileAssociationRequest& WithIamInstanceProfile(IamInstanceProfileSpecification&& value) { SetIamInstanceProfile(std::move(value)); return *this;} 69 70 71 /** 72 * <p>The ID of the existing IAM instance profile association.</p> 73 */ GetAssociationId()74 inline const Aws::String& GetAssociationId() const{ return m_associationId; } 75 76 /** 77 * <p>The ID of the existing IAM instance profile association.</p> 78 */ AssociationIdHasBeenSet()79 inline bool AssociationIdHasBeenSet() const { return m_associationIdHasBeenSet; } 80 81 /** 82 * <p>The ID of the existing IAM instance profile association.</p> 83 */ SetAssociationId(const Aws::String & value)84 inline void SetAssociationId(const Aws::String& value) { m_associationIdHasBeenSet = true; m_associationId = value; } 85 86 /** 87 * <p>The ID of the existing IAM instance profile association.</p> 88 */ SetAssociationId(Aws::String && value)89 inline void SetAssociationId(Aws::String&& value) { m_associationIdHasBeenSet = true; m_associationId = std::move(value); } 90 91 /** 92 * <p>The ID of the existing IAM instance profile association.</p> 93 */ SetAssociationId(const char * value)94 inline void SetAssociationId(const char* value) { m_associationIdHasBeenSet = true; m_associationId.assign(value); } 95 96 /** 97 * <p>The ID of the existing IAM instance profile association.</p> 98 */ WithAssociationId(const Aws::String & value)99 inline ReplaceIamInstanceProfileAssociationRequest& WithAssociationId(const Aws::String& value) { SetAssociationId(value); return *this;} 100 101 /** 102 * <p>The ID of the existing IAM instance profile association.</p> 103 */ WithAssociationId(Aws::String && value)104 inline ReplaceIamInstanceProfileAssociationRequest& WithAssociationId(Aws::String&& value) { SetAssociationId(std::move(value)); return *this;} 105 106 /** 107 * <p>The ID of the existing IAM instance profile association.</p> 108 */ WithAssociationId(const char * value)109 inline ReplaceIamInstanceProfileAssociationRequest& WithAssociationId(const char* value) { SetAssociationId(value); return *this;} 110 111 private: 112 113 IamInstanceProfileSpecification m_iamInstanceProfile; 114 bool m_iamInstanceProfileHasBeenSet; 115 116 Aws::String m_associationId; 117 bool m_associationIdHasBeenSet; 118 }; 119 120 } // namespace Model 121 } // namespace EC2 122 } // namespace Aws 123