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/codedeploy/CodeDeploy_EXPORTS.h> 8 #include <aws/codedeploy/CodeDeployRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/codedeploy/model/MinimumHealthyHosts.h> 11 #include <aws/codedeploy/model/TrafficRoutingConfig.h> 12 #include <aws/codedeploy/model/ComputePlatform.h> 13 #include <utility> 14 15 namespace Aws 16 { 17 namespace CodeDeploy 18 { 19 namespace Model 20 { 21 22 /** 23 * <p>Represents the input of a <code>CreateDeploymentConfig</code> 24 * operation.</p><p><h3>See Also:</h3> <a 25 * href="http://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeploymentConfigInput">AWS 26 * API Reference</a></p> 27 */ 28 class AWS_CODEDEPLOY_API CreateDeploymentConfigRequest : public CodeDeployRequest 29 { 30 public: 31 CreateDeploymentConfigRequest(); 32 33 // Service request name is the Operation name which will send this request out, 34 // each operation should has unique request name, so that we can get operation's name from this request. 35 // Note: this is not true for response, multiple operations may have the same response name, 36 // so we can not get operation's name from response. GetServiceRequestName()37 inline virtual const char* GetServiceRequestName() const override { return "CreateDeploymentConfig"; } 38 39 Aws::String SerializePayload() const override; 40 41 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 42 43 44 /** 45 * <p>The name of the deployment configuration to create.</p> 46 */ GetDeploymentConfigName()47 inline const Aws::String& GetDeploymentConfigName() const{ return m_deploymentConfigName; } 48 49 /** 50 * <p>The name of the deployment configuration to create.</p> 51 */ DeploymentConfigNameHasBeenSet()52 inline bool DeploymentConfigNameHasBeenSet() const { return m_deploymentConfigNameHasBeenSet; } 53 54 /** 55 * <p>The name of the deployment configuration to create.</p> 56 */ SetDeploymentConfigName(const Aws::String & value)57 inline void SetDeploymentConfigName(const Aws::String& value) { m_deploymentConfigNameHasBeenSet = true; m_deploymentConfigName = value; } 58 59 /** 60 * <p>The name of the deployment configuration to create.</p> 61 */ SetDeploymentConfigName(Aws::String && value)62 inline void SetDeploymentConfigName(Aws::String&& value) { m_deploymentConfigNameHasBeenSet = true; m_deploymentConfigName = std::move(value); } 63 64 /** 65 * <p>The name of the deployment configuration to create.</p> 66 */ SetDeploymentConfigName(const char * value)67 inline void SetDeploymentConfigName(const char* value) { m_deploymentConfigNameHasBeenSet = true; m_deploymentConfigName.assign(value); } 68 69 /** 70 * <p>The name of the deployment configuration to create.</p> 71 */ WithDeploymentConfigName(const Aws::String & value)72 inline CreateDeploymentConfigRequest& WithDeploymentConfigName(const Aws::String& value) { SetDeploymentConfigName(value); return *this;} 73 74 /** 75 * <p>The name of the deployment configuration to create.</p> 76 */ WithDeploymentConfigName(Aws::String && value)77 inline CreateDeploymentConfigRequest& WithDeploymentConfigName(Aws::String&& value) { SetDeploymentConfigName(std::move(value)); return *this;} 78 79 /** 80 * <p>The name of the deployment configuration to create.</p> 81 */ WithDeploymentConfigName(const char * value)82 inline CreateDeploymentConfigRequest& WithDeploymentConfigName(const char* value) { SetDeploymentConfigName(value); return *this;} 83 84 85 /** 86 * <p>The minimum number of healthy instances that should be available at any time 87 * during the deployment. There are two parameters expected in the input: type and 88 * value.</p> <p>The type parameter takes either of the following values:</p> <ul> 89 * <li> <p>HOST_COUNT: The value parameter represents the minimum number of healthy 90 * instances as an absolute value.</p> </li> <li> <p>FLEET_PERCENT: The value 91 * parameter represents the minimum number of healthy instances as a percentage of 92 * the total number of instances in the deployment. If you specify FLEET_PERCENT, 93 * at the start of the deployment, AWS CodeDeploy converts the percentage to the 94 * equivalent number of instances and rounds up fractional instances.</p> </li> 95 * </ul> <p>The value parameter takes an integer.</p> <p>For example, to set a 96 * minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 97 * 95.</p> 98 */ GetMinimumHealthyHosts()99 inline const MinimumHealthyHosts& GetMinimumHealthyHosts() const{ return m_minimumHealthyHosts; } 100 101 /** 102 * <p>The minimum number of healthy instances that should be available at any time 103 * during the deployment. There are two parameters expected in the input: type and 104 * value.</p> <p>The type parameter takes either of the following values:</p> <ul> 105 * <li> <p>HOST_COUNT: The value parameter represents the minimum number of healthy 106 * instances as an absolute value.</p> </li> <li> <p>FLEET_PERCENT: The value 107 * parameter represents the minimum number of healthy instances as a percentage of 108 * the total number of instances in the deployment. If you specify FLEET_PERCENT, 109 * at the start of the deployment, AWS CodeDeploy converts the percentage to the 110 * equivalent number of instances and rounds up fractional instances.</p> </li> 111 * </ul> <p>The value parameter takes an integer.</p> <p>For example, to set a 112 * minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 113 * 95.</p> 114 */ MinimumHealthyHostsHasBeenSet()115 inline bool MinimumHealthyHostsHasBeenSet() const { return m_minimumHealthyHostsHasBeenSet; } 116 117 /** 118 * <p>The minimum number of healthy instances that should be available at any time 119 * during the deployment. There are two parameters expected in the input: type and 120 * value.</p> <p>The type parameter takes either of the following values:</p> <ul> 121 * <li> <p>HOST_COUNT: The value parameter represents the minimum number of healthy 122 * instances as an absolute value.</p> </li> <li> <p>FLEET_PERCENT: The value 123 * parameter represents the minimum number of healthy instances as a percentage of 124 * the total number of instances in the deployment. If you specify FLEET_PERCENT, 125 * at the start of the deployment, AWS CodeDeploy converts the percentage to the 126 * equivalent number of instances and rounds up fractional instances.</p> </li> 127 * </ul> <p>The value parameter takes an integer.</p> <p>For example, to set a 128 * minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 129 * 95.</p> 130 */ SetMinimumHealthyHosts(const MinimumHealthyHosts & value)131 inline void SetMinimumHealthyHosts(const MinimumHealthyHosts& value) { m_minimumHealthyHostsHasBeenSet = true; m_minimumHealthyHosts = value; } 132 133 /** 134 * <p>The minimum number of healthy instances that should be available at any time 135 * during the deployment. There are two parameters expected in the input: type and 136 * value.</p> <p>The type parameter takes either of the following values:</p> <ul> 137 * <li> <p>HOST_COUNT: The value parameter represents the minimum number of healthy 138 * instances as an absolute value.</p> </li> <li> <p>FLEET_PERCENT: The value 139 * parameter represents the minimum number of healthy instances as a percentage of 140 * the total number of instances in the deployment. If you specify FLEET_PERCENT, 141 * at the start of the deployment, AWS CodeDeploy converts the percentage to the 142 * equivalent number of instances and rounds up fractional instances.</p> </li> 143 * </ul> <p>The value parameter takes an integer.</p> <p>For example, to set a 144 * minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 145 * 95.</p> 146 */ SetMinimumHealthyHosts(MinimumHealthyHosts && value)147 inline void SetMinimumHealthyHosts(MinimumHealthyHosts&& value) { m_minimumHealthyHostsHasBeenSet = true; m_minimumHealthyHosts = std::move(value); } 148 149 /** 150 * <p>The minimum number of healthy instances that should be available at any time 151 * during the deployment. There are two parameters expected in the input: type and 152 * value.</p> <p>The type parameter takes either of the following values:</p> <ul> 153 * <li> <p>HOST_COUNT: The value parameter represents the minimum number of healthy 154 * instances as an absolute value.</p> </li> <li> <p>FLEET_PERCENT: The value 155 * parameter represents the minimum number of healthy instances as a percentage of 156 * the total number of instances in the deployment. If you specify FLEET_PERCENT, 157 * at the start of the deployment, AWS CodeDeploy converts the percentage to the 158 * equivalent number of instances and rounds up fractional instances.</p> </li> 159 * </ul> <p>The value parameter takes an integer.</p> <p>For example, to set a 160 * minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 161 * 95.</p> 162 */ WithMinimumHealthyHosts(const MinimumHealthyHosts & value)163 inline CreateDeploymentConfigRequest& WithMinimumHealthyHosts(const MinimumHealthyHosts& value) { SetMinimumHealthyHosts(value); return *this;} 164 165 /** 166 * <p>The minimum number of healthy instances that should be available at any time 167 * during the deployment. There are two parameters expected in the input: type and 168 * value.</p> <p>The type parameter takes either of the following values:</p> <ul> 169 * <li> <p>HOST_COUNT: The value parameter represents the minimum number of healthy 170 * instances as an absolute value.</p> </li> <li> <p>FLEET_PERCENT: The value 171 * parameter represents the minimum number of healthy instances as a percentage of 172 * the total number of instances in the deployment. If you specify FLEET_PERCENT, 173 * at the start of the deployment, AWS CodeDeploy converts the percentage to the 174 * equivalent number of instances and rounds up fractional instances.</p> </li> 175 * </ul> <p>The value parameter takes an integer.</p> <p>For example, to set a 176 * minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 177 * 95.</p> 178 */ WithMinimumHealthyHosts(MinimumHealthyHosts && value)179 inline CreateDeploymentConfigRequest& WithMinimumHealthyHosts(MinimumHealthyHosts&& value) { SetMinimumHealthyHosts(std::move(value)); return *this;} 180 181 182 /** 183 * <p>The configuration that specifies how the deployment traffic is routed.</p> 184 */ GetTrafficRoutingConfig()185 inline const TrafficRoutingConfig& GetTrafficRoutingConfig() const{ return m_trafficRoutingConfig; } 186 187 /** 188 * <p>The configuration that specifies how the deployment traffic is routed.</p> 189 */ TrafficRoutingConfigHasBeenSet()190 inline bool TrafficRoutingConfigHasBeenSet() const { return m_trafficRoutingConfigHasBeenSet; } 191 192 /** 193 * <p>The configuration that specifies how the deployment traffic is routed.</p> 194 */ SetTrafficRoutingConfig(const TrafficRoutingConfig & value)195 inline void SetTrafficRoutingConfig(const TrafficRoutingConfig& value) { m_trafficRoutingConfigHasBeenSet = true; m_trafficRoutingConfig = value; } 196 197 /** 198 * <p>The configuration that specifies how the deployment traffic is routed.</p> 199 */ SetTrafficRoutingConfig(TrafficRoutingConfig && value)200 inline void SetTrafficRoutingConfig(TrafficRoutingConfig&& value) { m_trafficRoutingConfigHasBeenSet = true; m_trafficRoutingConfig = std::move(value); } 201 202 /** 203 * <p>The configuration that specifies how the deployment traffic is routed.</p> 204 */ WithTrafficRoutingConfig(const TrafficRoutingConfig & value)205 inline CreateDeploymentConfigRequest& WithTrafficRoutingConfig(const TrafficRoutingConfig& value) { SetTrafficRoutingConfig(value); return *this;} 206 207 /** 208 * <p>The configuration that specifies how the deployment traffic is routed.</p> 209 */ WithTrafficRoutingConfig(TrafficRoutingConfig && value)210 inline CreateDeploymentConfigRequest& WithTrafficRoutingConfig(TrafficRoutingConfig&& value) { SetTrafficRoutingConfig(std::move(value)); return *this;} 211 212 213 /** 214 * <p>The destination platform type for the deployment (<code>Lambda</code>, 215 * <code>Server</code>, or <code>ECS</code>).</p> 216 */ GetComputePlatform()217 inline const ComputePlatform& GetComputePlatform() const{ return m_computePlatform; } 218 219 /** 220 * <p>The destination platform type for the deployment (<code>Lambda</code>, 221 * <code>Server</code>, or <code>ECS</code>).</p> 222 */ ComputePlatformHasBeenSet()223 inline bool ComputePlatformHasBeenSet() const { return m_computePlatformHasBeenSet; } 224 225 /** 226 * <p>The destination platform type for the deployment (<code>Lambda</code>, 227 * <code>Server</code>, or <code>ECS</code>).</p> 228 */ SetComputePlatform(const ComputePlatform & value)229 inline void SetComputePlatform(const ComputePlatform& value) { m_computePlatformHasBeenSet = true; m_computePlatform = value; } 230 231 /** 232 * <p>The destination platform type for the deployment (<code>Lambda</code>, 233 * <code>Server</code>, or <code>ECS</code>).</p> 234 */ SetComputePlatform(ComputePlatform && value)235 inline void SetComputePlatform(ComputePlatform&& value) { m_computePlatformHasBeenSet = true; m_computePlatform = std::move(value); } 236 237 /** 238 * <p>The destination platform type for the deployment (<code>Lambda</code>, 239 * <code>Server</code>, or <code>ECS</code>).</p> 240 */ WithComputePlatform(const ComputePlatform & value)241 inline CreateDeploymentConfigRequest& WithComputePlatform(const ComputePlatform& value) { SetComputePlatform(value); return *this;} 242 243 /** 244 * <p>The destination platform type for the deployment (<code>Lambda</code>, 245 * <code>Server</code>, or <code>ECS</code>).</p> 246 */ WithComputePlatform(ComputePlatform && value)247 inline CreateDeploymentConfigRequest& WithComputePlatform(ComputePlatform&& value) { SetComputePlatform(std::move(value)); return *this;} 248 249 private: 250 251 Aws::String m_deploymentConfigName; 252 bool m_deploymentConfigNameHasBeenSet; 253 254 MinimumHealthyHosts m_minimumHealthyHosts; 255 bool m_minimumHealthyHostsHasBeenSet; 256 257 TrafficRoutingConfig m_trafficRoutingConfig; 258 bool m_trafficRoutingConfigHasBeenSet; 259 260 ComputePlatform m_computePlatform; 261 bool m_computePlatformHasBeenSet; 262 }; 263 264 } // namespace Model 265 } // namespace CodeDeploy 266 } // namespace Aws 267