/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace ElasticBeanstalk { namespace Model { /** *

The resource lifecycle configuration for an application. Defines lifecycle * settings for resources that belong to the application, and the service role that * AWS Elastic Beanstalk assumes in order to apply lifecycle settings. The version * lifecycle configuration defines lifecycle settings for application * versions.

See Also:

AWS * API Reference

*/ class ApplicationResourceLifecycleConfig { public: AWS_ELASTICBEANSTALK_API ApplicationResourceLifecycleConfig(); AWS_ELASTICBEANSTALK_API ApplicationResourceLifecycleConfig(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICBEANSTALK_API ApplicationResourceLifecycleConfig& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICBEANSTALK_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_ELASTICBEANSTALK_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The ARN of an IAM service role that Elastic Beanstalk has permission to * assume.

The ServiceRole property is required the first time * that you provide a VersionLifecycleConfig for the application in * one of the supporting calls (CreateApplication or * UpdateApplicationResourceLifecycle). After you provide it once, in * either one of the calls, Elastic Beanstalk persists the Service Role with the * application, and you don't need to specify it again in subsequent * UpdateApplicationResourceLifecycle calls. You can, however, specify * it in subsequent calls to change the Service Role to another value.

*/ inline const Aws::String& GetServiceRole() const{ return m_serviceRole; } /** *

The ARN of an IAM service role that Elastic Beanstalk has permission to * assume.

The ServiceRole property is required the first time * that you provide a VersionLifecycleConfig for the application in * one of the supporting calls (CreateApplication or * UpdateApplicationResourceLifecycle). After you provide it once, in * either one of the calls, Elastic Beanstalk persists the Service Role with the * application, and you don't need to specify it again in subsequent * UpdateApplicationResourceLifecycle calls. You can, however, specify * it in subsequent calls to change the Service Role to another value.

*/ inline bool ServiceRoleHasBeenSet() const { return m_serviceRoleHasBeenSet; } /** *

The ARN of an IAM service role that Elastic Beanstalk has permission to * assume.

The ServiceRole property is required the first time * that you provide a VersionLifecycleConfig for the application in * one of the supporting calls (CreateApplication or * UpdateApplicationResourceLifecycle). After you provide it once, in * either one of the calls, Elastic Beanstalk persists the Service Role with the * application, and you don't need to specify it again in subsequent * UpdateApplicationResourceLifecycle calls. You can, however, specify * it in subsequent calls to change the Service Role to another value.

*/ inline void SetServiceRole(const Aws::String& value) { m_serviceRoleHasBeenSet = true; m_serviceRole = value; } /** *

The ARN of an IAM service role that Elastic Beanstalk has permission to * assume.

The ServiceRole property is required the first time * that you provide a VersionLifecycleConfig for the application in * one of the supporting calls (CreateApplication or * UpdateApplicationResourceLifecycle). After you provide it once, in * either one of the calls, Elastic Beanstalk persists the Service Role with the * application, and you don't need to specify it again in subsequent * UpdateApplicationResourceLifecycle calls. You can, however, specify * it in subsequent calls to change the Service Role to another value.

*/ inline void SetServiceRole(Aws::String&& value) { m_serviceRoleHasBeenSet = true; m_serviceRole = std::move(value); } /** *

The ARN of an IAM service role that Elastic Beanstalk has permission to * assume.

The ServiceRole property is required the first time * that you provide a VersionLifecycleConfig for the application in * one of the supporting calls (CreateApplication or * UpdateApplicationResourceLifecycle). After you provide it once, in * either one of the calls, Elastic Beanstalk persists the Service Role with the * application, and you don't need to specify it again in subsequent * UpdateApplicationResourceLifecycle calls. You can, however, specify * it in subsequent calls to change the Service Role to another value.

*/ inline void SetServiceRole(const char* value) { m_serviceRoleHasBeenSet = true; m_serviceRole.assign(value); } /** *

The ARN of an IAM service role that Elastic Beanstalk has permission to * assume.

The ServiceRole property is required the first time * that you provide a VersionLifecycleConfig for the application in * one of the supporting calls (CreateApplication or * UpdateApplicationResourceLifecycle). After you provide it once, in * either one of the calls, Elastic Beanstalk persists the Service Role with the * application, and you don't need to specify it again in subsequent * UpdateApplicationResourceLifecycle calls. You can, however, specify * it in subsequent calls to change the Service Role to another value.

*/ inline ApplicationResourceLifecycleConfig& WithServiceRole(const Aws::String& value) { SetServiceRole(value); return *this;} /** *

The ARN of an IAM service role that Elastic Beanstalk has permission to * assume.

The ServiceRole property is required the first time * that you provide a VersionLifecycleConfig for the application in * one of the supporting calls (CreateApplication or * UpdateApplicationResourceLifecycle). After you provide it once, in * either one of the calls, Elastic Beanstalk persists the Service Role with the * application, and you don't need to specify it again in subsequent * UpdateApplicationResourceLifecycle calls. You can, however, specify * it in subsequent calls to change the Service Role to another value.

*/ inline ApplicationResourceLifecycleConfig& WithServiceRole(Aws::String&& value) { SetServiceRole(std::move(value)); return *this;} /** *

The ARN of an IAM service role that Elastic Beanstalk has permission to * assume.

The ServiceRole property is required the first time * that you provide a VersionLifecycleConfig for the application in * one of the supporting calls (CreateApplication or * UpdateApplicationResourceLifecycle). After you provide it once, in * either one of the calls, Elastic Beanstalk persists the Service Role with the * application, and you don't need to specify it again in subsequent * UpdateApplicationResourceLifecycle calls. You can, however, specify * it in subsequent calls to change the Service Role to another value.

*/ inline ApplicationResourceLifecycleConfig& WithServiceRole(const char* value) { SetServiceRole(value); return *this;} /** *

Defines lifecycle settings for application versions.

*/ inline const ApplicationVersionLifecycleConfig& GetVersionLifecycleConfig() const{ return m_versionLifecycleConfig; } /** *

Defines lifecycle settings for application versions.

*/ inline bool VersionLifecycleConfigHasBeenSet() const { return m_versionLifecycleConfigHasBeenSet; } /** *

Defines lifecycle settings for application versions.

*/ inline void SetVersionLifecycleConfig(const ApplicationVersionLifecycleConfig& value) { m_versionLifecycleConfigHasBeenSet = true; m_versionLifecycleConfig = value; } /** *

Defines lifecycle settings for application versions.

*/ inline void SetVersionLifecycleConfig(ApplicationVersionLifecycleConfig&& value) { m_versionLifecycleConfigHasBeenSet = true; m_versionLifecycleConfig = std::move(value); } /** *

Defines lifecycle settings for application versions.

*/ inline ApplicationResourceLifecycleConfig& WithVersionLifecycleConfig(const ApplicationVersionLifecycleConfig& value) { SetVersionLifecycleConfig(value); return *this;} /** *

Defines lifecycle settings for application versions.

*/ inline ApplicationResourceLifecycleConfig& WithVersionLifecycleConfig(ApplicationVersionLifecycleConfig&& value) { SetVersionLifecycleConfig(std::move(value)); return *this;} private: Aws::String m_serviceRole; bool m_serviceRoleHasBeenSet = false; ApplicationVersionLifecycleConfig m_versionLifecycleConfig; bool m_versionLifecycleConfigHasBeenSet = false; }; } // namespace Model } // namespace ElasticBeanstalk } // namespace Aws