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/apprunner/AppRunner_EXPORTS.h> 8 #include <aws/apprunner/AppRunnerRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/apprunner/model/SourceConfiguration.h> 11 #include <aws/apprunner/model/InstanceConfiguration.h> 12 #include <aws/core/utils/memory/stl/AWSVector.h> 13 #include <aws/apprunner/model/EncryptionConfiguration.h> 14 #include <aws/apprunner/model/HealthCheckConfiguration.h> 15 #include <aws/apprunner/model/Tag.h> 16 #include <utility> 17 18 namespace Aws 19 { 20 namespace AppRunner 21 { 22 namespace Model 23 { 24 25 /** 26 */ 27 class AWS_APPRUNNER_API CreateServiceRequest : public AppRunnerRequest 28 { 29 public: 30 CreateServiceRequest(); 31 32 // Service request name is the Operation name which will send this request out, 33 // each operation should has unique request name, so that we can get operation's name from this request. 34 // Note: this is not true for response, multiple operations may have the same response name, 35 // so we can not get operation's name from response. GetServiceRequestName()36 inline virtual const char* GetServiceRequestName() const override { return "CreateService"; } 37 38 Aws::String SerializePayload() const override; 39 40 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 41 42 43 /** 44 * <p>A name for the new service. It must be unique across all the running App 45 * Runner services in your Amazon Web Services account in the Amazon Web Services 46 * Region.</p> 47 */ GetServiceName()48 inline const Aws::String& GetServiceName() const{ return m_serviceName; } 49 50 /** 51 * <p>A name for the new service. It must be unique across all the running App 52 * Runner services in your Amazon Web Services account in the Amazon Web Services 53 * Region.</p> 54 */ ServiceNameHasBeenSet()55 inline bool ServiceNameHasBeenSet() const { return m_serviceNameHasBeenSet; } 56 57 /** 58 * <p>A name for the new service. It must be unique across all the running App 59 * Runner services in your Amazon Web Services account in the Amazon Web Services 60 * Region.</p> 61 */ SetServiceName(const Aws::String & value)62 inline void SetServiceName(const Aws::String& value) { m_serviceNameHasBeenSet = true; m_serviceName = value; } 63 64 /** 65 * <p>A name for the new service. It must be unique across all the running App 66 * Runner services in your Amazon Web Services account in the Amazon Web Services 67 * Region.</p> 68 */ SetServiceName(Aws::String && value)69 inline void SetServiceName(Aws::String&& value) { m_serviceNameHasBeenSet = true; m_serviceName = std::move(value); } 70 71 /** 72 * <p>A name for the new service. It must be unique across all the running App 73 * Runner services in your Amazon Web Services account in the Amazon Web Services 74 * Region.</p> 75 */ SetServiceName(const char * value)76 inline void SetServiceName(const char* value) { m_serviceNameHasBeenSet = true; m_serviceName.assign(value); } 77 78 /** 79 * <p>A name for the new service. It must be unique across all the running App 80 * Runner services in your Amazon Web Services account in the Amazon Web Services 81 * Region.</p> 82 */ WithServiceName(const Aws::String & value)83 inline CreateServiceRequest& WithServiceName(const Aws::String& value) { SetServiceName(value); return *this;} 84 85 /** 86 * <p>A name for the new service. It must be unique across all the running App 87 * Runner services in your Amazon Web Services account in the Amazon Web Services 88 * Region.</p> 89 */ WithServiceName(Aws::String && value)90 inline CreateServiceRequest& WithServiceName(Aws::String&& value) { SetServiceName(std::move(value)); return *this;} 91 92 /** 93 * <p>A name for the new service. It must be unique across all the running App 94 * Runner services in your Amazon Web Services account in the Amazon Web Services 95 * Region.</p> 96 */ WithServiceName(const char * value)97 inline CreateServiceRequest& WithServiceName(const char* value) { SetServiceName(value); return *this;} 98 99 100 /** 101 * <p>The source to deploy to the App Runner service. It can be a code or an image 102 * repository.</p> 103 */ GetSourceConfiguration()104 inline const SourceConfiguration& GetSourceConfiguration() const{ return m_sourceConfiguration; } 105 106 /** 107 * <p>The source to deploy to the App Runner service. It can be a code or an image 108 * repository.</p> 109 */ SourceConfigurationHasBeenSet()110 inline bool SourceConfigurationHasBeenSet() const { return m_sourceConfigurationHasBeenSet; } 111 112 /** 113 * <p>The source to deploy to the App Runner service. It can be a code or an image 114 * repository.</p> 115 */ SetSourceConfiguration(const SourceConfiguration & value)116 inline void SetSourceConfiguration(const SourceConfiguration& value) { m_sourceConfigurationHasBeenSet = true; m_sourceConfiguration = value; } 117 118 /** 119 * <p>The source to deploy to the App Runner service. It can be a code or an image 120 * repository.</p> 121 */ SetSourceConfiguration(SourceConfiguration && value)122 inline void SetSourceConfiguration(SourceConfiguration&& value) { m_sourceConfigurationHasBeenSet = true; m_sourceConfiguration = std::move(value); } 123 124 /** 125 * <p>The source to deploy to the App Runner service. It can be a code or an image 126 * repository.</p> 127 */ WithSourceConfiguration(const SourceConfiguration & value)128 inline CreateServiceRequest& WithSourceConfiguration(const SourceConfiguration& value) { SetSourceConfiguration(value); return *this;} 129 130 /** 131 * <p>The source to deploy to the App Runner service. It can be a code or an image 132 * repository.</p> 133 */ WithSourceConfiguration(SourceConfiguration && value)134 inline CreateServiceRequest& WithSourceConfiguration(SourceConfiguration&& value) { SetSourceConfiguration(std::move(value)); return *this;} 135 136 137 /** 138 * <p>The runtime configuration of instances (scaling units) of the App Runner 139 * service.</p> 140 */ GetInstanceConfiguration()141 inline const InstanceConfiguration& GetInstanceConfiguration() const{ return m_instanceConfiguration; } 142 143 /** 144 * <p>The runtime configuration of instances (scaling units) of the App Runner 145 * service.</p> 146 */ InstanceConfigurationHasBeenSet()147 inline bool InstanceConfigurationHasBeenSet() const { return m_instanceConfigurationHasBeenSet; } 148 149 /** 150 * <p>The runtime configuration of instances (scaling units) of the App Runner 151 * service.</p> 152 */ SetInstanceConfiguration(const InstanceConfiguration & value)153 inline void SetInstanceConfiguration(const InstanceConfiguration& value) { m_instanceConfigurationHasBeenSet = true; m_instanceConfiguration = value; } 154 155 /** 156 * <p>The runtime configuration of instances (scaling units) of the App Runner 157 * service.</p> 158 */ SetInstanceConfiguration(InstanceConfiguration && value)159 inline void SetInstanceConfiguration(InstanceConfiguration&& value) { m_instanceConfigurationHasBeenSet = true; m_instanceConfiguration = std::move(value); } 160 161 /** 162 * <p>The runtime configuration of instances (scaling units) of the App Runner 163 * service.</p> 164 */ WithInstanceConfiguration(const InstanceConfiguration & value)165 inline CreateServiceRequest& WithInstanceConfiguration(const InstanceConfiguration& value) { SetInstanceConfiguration(value); return *this;} 166 167 /** 168 * <p>The runtime configuration of instances (scaling units) of the App Runner 169 * service.</p> 170 */ WithInstanceConfiguration(InstanceConfiguration && value)171 inline CreateServiceRequest& WithInstanceConfiguration(InstanceConfiguration&& value) { SetInstanceConfiguration(std::move(value)); return *this;} 172 173 174 /** 175 * <p>An optional list of metadata items that you can associate with your service 176 * resource. A tag is a key-value pair.</p> 177 */ GetTags()178 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; } 179 180 /** 181 * <p>An optional list of metadata items that you can associate with your service 182 * resource. A tag is a key-value pair.</p> 183 */ TagsHasBeenSet()184 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 185 186 /** 187 * <p>An optional list of metadata items that you can associate with your service 188 * resource. A tag is a key-value pair.</p> 189 */ SetTags(const Aws::Vector<Tag> & value)190 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; } 191 192 /** 193 * <p>An optional list of metadata items that you can associate with your service 194 * resource. A tag is a key-value pair.</p> 195 */ SetTags(Aws::Vector<Tag> && value)196 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 197 198 /** 199 * <p>An optional list of metadata items that you can associate with your service 200 * resource. A tag is a key-value pair.</p> 201 */ WithTags(const Aws::Vector<Tag> & value)202 inline CreateServiceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;} 203 204 /** 205 * <p>An optional list of metadata items that you can associate with your service 206 * resource. A tag is a key-value pair.</p> 207 */ WithTags(Aws::Vector<Tag> && value)208 inline CreateServiceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;} 209 210 /** 211 * <p>An optional list of metadata items that you can associate with your service 212 * resource. A tag is a key-value pair.</p> 213 */ AddTags(const Tag & value)214 inline CreateServiceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } 215 216 /** 217 * <p>An optional list of metadata items that you can associate with your service 218 * resource. A tag is a key-value pair.</p> 219 */ AddTags(Tag && value)220 inline CreateServiceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } 221 222 223 /** 224 * <p>An optional custom encryption key that App Runner uses to encrypt the copy of 225 * your source repository that it maintains and your service logs. By default, App 226 * Runner uses an Amazon Web Services managed CMK.</p> 227 */ GetEncryptionConfiguration()228 inline const EncryptionConfiguration& GetEncryptionConfiguration() const{ return m_encryptionConfiguration; } 229 230 /** 231 * <p>An optional custom encryption key that App Runner uses to encrypt the copy of 232 * your source repository that it maintains and your service logs. By default, App 233 * Runner uses an Amazon Web Services managed CMK.</p> 234 */ EncryptionConfigurationHasBeenSet()235 inline bool EncryptionConfigurationHasBeenSet() const { return m_encryptionConfigurationHasBeenSet; } 236 237 /** 238 * <p>An optional custom encryption key that App Runner uses to encrypt the copy of 239 * your source repository that it maintains and your service logs. By default, App 240 * Runner uses an Amazon Web Services managed CMK.</p> 241 */ SetEncryptionConfiguration(const EncryptionConfiguration & value)242 inline void SetEncryptionConfiguration(const EncryptionConfiguration& value) { m_encryptionConfigurationHasBeenSet = true; m_encryptionConfiguration = value; } 243 244 /** 245 * <p>An optional custom encryption key that App Runner uses to encrypt the copy of 246 * your source repository that it maintains and your service logs. By default, App 247 * Runner uses an Amazon Web Services managed CMK.</p> 248 */ SetEncryptionConfiguration(EncryptionConfiguration && value)249 inline void SetEncryptionConfiguration(EncryptionConfiguration&& value) { m_encryptionConfigurationHasBeenSet = true; m_encryptionConfiguration = std::move(value); } 250 251 /** 252 * <p>An optional custom encryption key that App Runner uses to encrypt the copy of 253 * your source repository that it maintains and your service logs. By default, App 254 * Runner uses an Amazon Web Services managed CMK.</p> 255 */ WithEncryptionConfiguration(const EncryptionConfiguration & value)256 inline CreateServiceRequest& WithEncryptionConfiguration(const EncryptionConfiguration& value) { SetEncryptionConfiguration(value); return *this;} 257 258 /** 259 * <p>An optional custom encryption key that App Runner uses to encrypt the copy of 260 * your source repository that it maintains and your service logs. By default, App 261 * Runner uses an Amazon Web Services managed CMK.</p> 262 */ WithEncryptionConfiguration(EncryptionConfiguration && value)263 inline CreateServiceRequest& WithEncryptionConfiguration(EncryptionConfiguration&& value) { SetEncryptionConfiguration(std::move(value)); return *this;} 264 265 266 /** 267 * <p>The settings for the health check that App Runner performs to monitor the 268 * health of your service.</p> 269 */ GetHealthCheckConfiguration()270 inline const HealthCheckConfiguration& GetHealthCheckConfiguration() const{ return m_healthCheckConfiguration; } 271 272 /** 273 * <p>The settings for the health check that App Runner performs to monitor the 274 * health of your service.</p> 275 */ HealthCheckConfigurationHasBeenSet()276 inline bool HealthCheckConfigurationHasBeenSet() const { return m_healthCheckConfigurationHasBeenSet; } 277 278 /** 279 * <p>The settings for the health check that App Runner performs to monitor the 280 * health of your service.</p> 281 */ SetHealthCheckConfiguration(const HealthCheckConfiguration & value)282 inline void SetHealthCheckConfiguration(const HealthCheckConfiguration& value) { m_healthCheckConfigurationHasBeenSet = true; m_healthCheckConfiguration = value; } 283 284 /** 285 * <p>The settings for the health check that App Runner performs to monitor the 286 * health of your service.</p> 287 */ SetHealthCheckConfiguration(HealthCheckConfiguration && value)288 inline void SetHealthCheckConfiguration(HealthCheckConfiguration&& value) { m_healthCheckConfigurationHasBeenSet = true; m_healthCheckConfiguration = std::move(value); } 289 290 /** 291 * <p>The settings for the health check that App Runner performs to monitor the 292 * health of your service.</p> 293 */ WithHealthCheckConfiguration(const HealthCheckConfiguration & value)294 inline CreateServiceRequest& WithHealthCheckConfiguration(const HealthCheckConfiguration& value) { SetHealthCheckConfiguration(value); return *this;} 295 296 /** 297 * <p>The settings for the health check that App Runner performs to monitor the 298 * health of your service.</p> 299 */ WithHealthCheckConfiguration(HealthCheckConfiguration && value)300 inline CreateServiceRequest& WithHealthCheckConfiguration(HealthCheckConfiguration&& value) { SetHealthCheckConfiguration(std::move(value)); return *this;} 301 302 303 /** 304 * <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling 305 * configuration resource that you want to associate with your service. If not 306 * provided, App Runner associates the latest revision of a default auto scaling 307 * configuration.</p> 308 */ GetAutoScalingConfigurationArn()309 inline const Aws::String& GetAutoScalingConfigurationArn() const{ return m_autoScalingConfigurationArn; } 310 311 /** 312 * <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling 313 * configuration resource that you want to associate with your service. If not 314 * provided, App Runner associates the latest revision of a default auto scaling 315 * configuration.</p> 316 */ AutoScalingConfigurationArnHasBeenSet()317 inline bool AutoScalingConfigurationArnHasBeenSet() const { return m_autoScalingConfigurationArnHasBeenSet; } 318 319 /** 320 * <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling 321 * configuration resource that you want to associate with your service. If not 322 * provided, App Runner associates the latest revision of a default auto scaling 323 * configuration.</p> 324 */ SetAutoScalingConfigurationArn(const Aws::String & value)325 inline void SetAutoScalingConfigurationArn(const Aws::String& value) { m_autoScalingConfigurationArnHasBeenSet = true; m_autoScalingConfigurationArn = value; } 326 327 /** 328 * <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling 329 * configuration resource that you want to associate with your service. If not 330 * provided, App Runner associates the latest revision of a default auto scaling 331 * configuration.</p> 332 */ SetAutoScalingConfigurationArn(Aws::String && value)333 inline void SetAutoScalingConfigurationArn(Aws::String&& value) { m_autoScalingConfigurationArnHasBeenSet = true; m_autoScalingConfigurationArn = std::move(value); } 334 335 /** 336 * <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling 337 * configuration resource that you want to associate with your service. If not 338 * provided, App Runner associates the latest revision of a default auto scaling 339 * configuration.</p> 340 */ SetAutoScalingConfigurationArn(const char * value)341 inline void SetAutoScalingConfigurationArn(const char* value) { m_autoScalingConfigurationArnHasBeenSet = true; m_autoScalingConfigurationArn.assign(value); } 342 343 /** 344 * <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling 345 * configuration resource that you want to associate with your service. If not 346 * provided, App Runner associates the latest revision of a default auto scaling 347 * configuration.</p> 348 */ WithAutoScalingConfigurationArn(const Aws::String & value)349 inline CreateServiceRequest& WithAutoScalingConfigurationArn(const Aws::String& value) { SetAutoScalingConfigurationArn(value); return *this;} 350 351 /** 352 * <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling 353 * configuration resource that you want to associate with your service. If not 354 * provided, App Runner associates the latest revision of a default auto scaling 355 * configuration.</p> 356 */ WithAutoScalingConfigurationArn(Aws::String && value)357 inline CreateServiceRequest& WithAutoScalingConfigurationArn(Aws::String&& value) { SetAutoScalingConfigurationArn(std::move(value)); return *this;} 358 359 /** 360 * <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling 361 * configuration resource that you want to associate with your service. If not 362 * provided, App Runner associates the latest revision of a default auto scaling 363 * configuration.</p> 364 */ WithAutoScalingConfigurationArn(const char * value)365 inline CreateServiceRequest& WithAutoScalingConfigurationArn(const char* value) { SetAutoScalingConfigurationArn(value); return *this;} 366 367 private: 368 369 Aws::String m_serviceName; 370 bool m_serviceNameHasBeenSet; 371 372 SourceConfiguration m_sourceConfiguration; 373 bool m_sourceConfigurationHasBeenSet; 374 375 InstanceConfiguration m_instanceConfiguration; 376 bool m_instanceConfigurationHasBeenSet; 377 378 Aws::Vector<Tag> m_tags; 379 bool m_tagsHasBeenSet; 380 381 EncryptionConfiguration m_encryptionConfiguration; 382 bool m_encryptionConfigurationHasBeenSet; 383 384 HealthCheckConfiguration m_healthCheckConfiguration; 385 bool m_healthCheckConfigurationHasBeenSet; 386 387 Aws::String m_autoScalingConfigurationArn; 388 bool m_autoScalingConfigurationArnHasBeenSet; 389 }; 390 391 } // namespace Model 392 } // namespace AppRunner 393 } // namespace Aws 394