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/eks/EKS_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <utility> 10 11 namespace Aws 12 { 13 namespace Utils 14 { 15 namespace Json 16 { 17 class JsonValue; 18 class JsonView; 19 } // namespace Json 20 } // namespace Utils 21 namespace EKS 22 { 23 namespace Model 24 { 25 26 /** 27 * <p>An object representing a node group launch template specification. The launch 28 * template cannot include <a 29 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html"> 30 * <code>SubnetId</code> </a>, <a 31 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html"> 32 * <code>IamInstanceProfile</code> </a>, <a 33 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html"> 34 * <code>RequestSpotInstances</code> </a>, <a 35 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html"> 36 * <code>HibernationOptions</code> </a>, or <a 37 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TerminateInstances.html"> 38 * <code>TerminateInstances</code> </a>, or the node group deployment or update 39 * will fail. For more information about launch templates, see <a 40 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html"> 41 * <code>CreateLaunchTemplate</code> </a> in the Amazon EC2 API Reference. For more 42 * information about using launch templates with Amazon EKS, see <a 43 * href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Launch 44 * template support</a> in the Amazon EKS User Guide.</p> <p>Specify either 45 * <code>name</code> or <code>id</code>, but not both.</p><p><h3>See Also:</h3> 46 * <a 47 * href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/LaunchTemplateSpecification">AWS 48 * API Reference</a></p> 49 */ 50 class AWS_EKS_API LaunchTemplateSpecification 51 { 52 public: 53 LaunchTemplateSpecification(); 54 LaunchTemplateSpecification(Aws::Utils::Json::JsonView jsonValue); 55 LaunchTemplateSpecification& operator=(Aws::Utils::Json::JsonView jsonValue); 56 Aws::Utils::Json::JsonValue Jsonize() const; 57 58 59 /** 60 * <p>The name of the launch template.</p> 61 */ GetName()62 inline const Aws::String& GetName() const{ return m_name; } 63 64 /** 65 * <p>The name of the launch template.</p> 66 */ NameHasBeenSet()67 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } 68 69 /** 70 * <p>The name of the launch template.</p> 71 */ SetName(const Aws::String & value)72 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } 73 74 /** 75 * <p>The name of the launch template.</p> 76 */ SetName(Aws::String && value)77 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } 78 79 /** 80 * <p>The name of the launch template.</p> 81 */ SetName(const char * value)82 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } 83 84 /** 85 * <p>The name of the launch template.</p> 86 */ WithName(const Aws::String & value)87 inline LaunchTemplateSpecification& WithName(const Aws::String& value) { SetName(value); return *this;} 88 89 /** 90 * <p>The name of the launch template.</p> 91 */ WithName(Aws::String && value)92 inline LaunchTemplateSpecification& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} 93 94 /** 95 * <p>The name of the launch template.</p> 96 */ WithName(const char * value)97 inline LaunchTemplateSpecification& WithName(const char* value) { SetName(value); return *this;} 98 99 100 /** 101 * <p>The version of the launch template to use. If no version is specified, then 102 * the template's default version is used.</p> 103 */ GetVersion()104 inline const Aws::String& GetVersion() const{ return m_version; } 105 106 /** 107 * <p>The version of the launch template to use. If no version is specified, then 108 * the template's default version is used.</p> 109 */ VersionHasBeenSet()110 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } 111 112 /** 113 * <p>The version of the launch template to use. If no version is specified, then 114 * the template's default version is used.</p> 115 */ SetVersion(const Aws::String & value)116 inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; } 117 118 /** 119 * <p>The version of the launch template to use. If no version is specified, then 120 * the template's default version is used.</p> 121 */ SetVersion(Aws::String && value)122 inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); } 123 124 /** 125 * <p>The version of the launch template to use. If no version is specified, then 126 * the template's default version is used.</p> 127 */ SetVersion(const char * value)128 inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); } 129 130 /** 131 * <p>The version of the launch template to use. If no version is specified, then 132 * the template's default version is used.</p> 133 */ WithVersion(const Aws::String & value)134 inline LaunchTemplateSpecification& WithVersion(const Aws::String& value) { SetVersion(value); return *this;} 135 136 /** 137 * <p>The version of the launch template to use. If no version is specified, then 138 * the template's default version is used.</p> 139 */ WithVersion(Aws::String && value)140 inline LaunchTemplateSpecification& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;} 141 142 /** 143 * <p>The version of the launch template to use. If no version is specified, then 144 * the template's default version is used.</p> 145 */ WithVersion(const char * value)146 inline LaunchTemplateSpecification& WithVersion(const char* value) { SetVersion(value); return *this;} 147 148 149 /** 150 * <p>The ID of the launch template.</p> 151 */ GetId()152 inline const Aws::String& GetId() const{ return m_id; } 153 154 /** 155 * <p>The ID of the launch template.</p> 156 */ IdHasBeenSet()157 inline bool IdHasBeenSet() const { return m_idHasBeenSet; } 158 159 /** 160 * <p>The ID of the launch template.</p> 161 */ SetId(const Aws::String & value)162 inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } 163 164 /** 165 * <p>The ID of the launch template.</p> 166 */ SetId(Aws::String && value)167 inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } 168 169 /** 170 * <p>The ID of the launch template.</p> 171 */ SetId(const char * value)172 inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } 173 174 /** 175 * <p>The ID of the launch template.</p> 176 */ WithId(const Aws::String & value)177 inline LaunchTemplateSpecification& WithId(const Aws::String& value) { SetId(value); return *this;} 178 179 /** 180 * <p>The ID of the launch template.</p> 181 */ WithId(Aws::String && value)182 inline LaunchTemplateSpecification& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} 183 184 /** 185 * <p>The ID of the launch template.</p> 186 */ WithId(const char * value)187 inline LaunchTemplateSpecification& WithId(const char* value) { SetId(value); return *this;} 188 189 private: 190 191 Aws::String m_name; 192 bool m_nameHasBeenSet; 193 194 Aws::String m_version; 195 bool m_versionHasBeenSet; 196 197 Aws::String m_id; 198 bool m_idHasBeenSet; 199 }; 200 201 } // namespace Model 202 } // namespace EKS 203 } // namespace Aws 204