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

Describes the Amazon Elastic Compute Cloud instance and related resources to * be created using the create cloud formation stack * operation.

See Also:

AWS * API Reference

*/ class AWS_LIGHTSAIL_API InstanceEntry { public: InstanceEntry(); InstanceEntry(Aws::Utils::Json::JsonView jsonValue); InstanceEntry& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the export snapshot record, which contains the exported Lightsail * instance snapshot that will be used as the source of the new Amazon EC2 * instance.

Use the get export snapshot records operation to * get a list of export snapshot records that you can use to create a * CloudFormation stack.

*/ inline const Aws::String& GetSourceName() const{ return m_sourceName; } /** *

The name of the export snapshot record, which contains the exported Lightsail * instance snapshot that will be used as the source of the new Amazon EC2 * instance.

Use the get export snapshot records operation to * get a list of export snapshot records that you can use to create a * CloudFormation stack.

*/ inline bool SourceNameHasBeenSet() const { return m_sourceNameHasBeenSet; } /** *

The name of the export snapshot record, which contains the exported Lightsail * instance snapshot that will be used as the source of the new Amazon EC2 * instance.

Use the get export snapshot records operation to * get a list of export snapshot records that you can use to create a * CloudFormation stack.

*/ inline void SetSourceName(const Aws::String& value) { m_sourceNameHasBeenSet = true; m_sourceName = value; } /** *

The name of the export snapshot record, which contains the exported Lightsail * instance snapshot that will be used as the source of the new Amazon EC2 * instance.

Use the get export snapshot records operation to * get a list of export snapshot records that you can use to create a * CloudFormation stack.

*/ inline void SetSourceName(Aws::String&& value) { m_sourceNameHasBeenSet = true; m_sourceName = std::move(value); } /** *

The name of the export snapshot record, which contains the exported Lightsail * instance snapshot that will be used as the source of the new Amazon EC2 * instance.

Use the get export snapshot records operation to * get a list of export snapshot records that you can use to create a * CloudFormation stack.

*/ inline void SetSourceName(const char* value) { m_sourceNameHasBeenSet = true; m_sourceName.assign(value); } /** *

The name of the export snapshot record, which contains the exported Lightsail * instance snapshot that will be used as the source of the new Amazon EC2 * instance.

Use the get export snapshot records operation to * get a list of export snapshot records that you can use to create a * CloudFormation stack.

*/ inline InstanceEntry& WithSourceName(const Aws::String& value) { SetSourceName(value); return *this;} /** *

The name of the export snapshot record, which contains the exported Lightsail * instance snapshot that will be used as the source of the new Amazon EC2 * instance.

Use the get export snapshot records operation to * get a list of export snapshot records that you can use to create a * CloudFormation stack.

*/ inline InstanceEntry& WithSourceName(Aws::String&& value) { SetSourceName(std::move(value)); return *this;} /** *

The name of the export snapshot record, which contains the exported Lightsail * instance snapshot that will be used as the source of the new Amazon EC2 * instance.

Use the get export snapshot records operation to * get a list of export snapshot records that you can use to create a * CloudFormation stack.

*/ inline InstanceEntry& WithSourceName(const char* value) { SetSourceName(value); return *this;} /** *

The instance type (e.g., t2.micro) to use for the new Amazon EC2 * instance.

*/ inline const Aws::String& GetInstanceType() const{ return m_instanceType; } /** *

The instance type (e.g., t2.micro) to use for the new Amazon EC2 * instance.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

The instance type (e.g., t2.micro) to use for the new Amazon EC2 * instance.

*/ inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

The instance type (e.g., t2.micro) to use for the new Amazon EC2 * instance.

*/ inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

The instance type (e.g., t2.micro) to use for the new Amazon EC2 * instance.

*/ inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); } /** *

The instance type (e.g., t2.micro) to use for the new Amazon EC2 * instance.

*/ inline InstanceEntry& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;} /** *

The instance type (e.g., t2.micro) to use for the new Amazon EC2 * instance.

*/ inline InstanceEntry& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;} /** *

The instance type (e.g., t2.micro) to use for the new Amazon EC2 * instance.

*/ inline InstanceEntry& WithInstanceType(const char* value) { SetInstanceType(value); return *this;} /** *

The port configuration to use for the new Amazon EC2 instance.

The * following configuration options are available:

  • * DEFAULT - Use the default firewall settings from the Lightsail * instance blueprint.

  • INSTANCE - Use the * configured firewall settings from the source Lightsail instance.

  • *

    NONE - Use the default Amazon EC2 security group.

  • *
  • CLOSED - All ports closed.

If * you configured lightsail-connect as a cidrListAliases * on your instance, or if you chose to allow the Lightsail browser-based SSH or * RDP clients to connect to your instance, that configuration is not carried over * to your new Amazon EC2 instance.

*/ inline const PortInfoSourceType& GetPortInfoSource() const{ return m_portInfoSource; } /** *

The port configuration to use for the new Amazon EC2 instance.

The * following configuration options are available:

  • * DEFAULT - Use the default firewall settings from the Lightsail * instance blueprint.

  • INSTANCE - Use the * configured firewall settings from the source Lightsail instance.

  • *

    NONE - Use the default Amazon EC2 security group.

  • *
  • CLOSED - All ports closed.

If * you configured lightsail-connect as a cidrListAliases * on your instance, or if you chose to allow the Lightsail browser-based SSH or * RDP clients to connect to your instance, that configuration is not carried over * to your new Amazon EC2 instance.

*/ inline bool PortInfoSourceHasBeenSet() const { return m_portInfoSourceHasBeenSet; } /** *

The port configuration to use for the new Amazon EC2 instance.

The * following configuration options are available:

  • * DEFAULT - Use the default firewall settings from the Lightsail * instance blueprint.

  • INSTANCE - Use the * configured firewall settings from the source Lightsail instance.

  • *

    NONE - Use the default Amazon EC2 security group.

  • *
  • CLOSED - All ports closed.

If * you configured lightsail-connect as a cidrListAliases * on your instance, or if you chose to allow the Lightsail browser-based SSH or * RDP clients to connect to your instance, that configuration is not carried over * to your new Amazon EC2 instance.

*/ inline void SetPortInfoSource(const PortInfoSourceType& value) { m_portInfoSourceHasBeenSet = true; m_portInfoSource = value; } /** *

The port configuration to use for the new Amazon EC2 instance.

The * following configuration options are available:

  • * DEFAULT - Use the default firewall settings from the Lightsail * instance blueprint.

  • INSTANCE - Use the * configured firewall settings from the source Lightsail instance.

  • *

    NONE - Use the default Amazon EC2 security group.

  • *
  • CLOSED - All ports closed.

If * you configured lightsail-connect as a cidrListAliases * on your instance, or if you chose to allow the Lightsail browser-based SSH or * RDP clients to connect to your instance, that configuration is not carried over * to your new Amazon EC2 instance.

*/ inline void SetPortInfoSource(PortInfoSourceType&& value) { m_portInfoSourceHasBeenSet = true; m_portInfoSource = std::move(value); } /** *

The port configuration to use for the new Amazon EC2 instance.

The * following configuration options are available:

  • * DEFAULT - Use the default firewall settings from the Lightsail * instance blueprint.

  • INSTANCE - Use the * configured firewall settings from the source Lightsail instance.

  • *

    NONE - Use the default Amazon EC2 security group.

  • *
  • CLOSED - All ports closed.

If * you configured lightsail-connect as a cidrListAliases * on your instance, or if you chose to allow the Lightsail browser-based SSH or * RDP clients to connect to your instance, that configuration is not carried over * to your new Amazon EC2 instance.

*/ inline InstanceEntry& WithPortInfoSource(const PortInfoSourceType& value) { SetPortInfoSource(value); return *this;} /** *

The port configuration to use for the new Amazon EC2 instance.

The * following configuration options are available:

  • * DEFAULT - Use the default firewall settings from the Lightsail * instance blueprint.

  • INSTANCE - Use the * configured firewall settings from the source Lightsail instance.

  • *

    NONE - Use the default Amazon EC2 security group.

  • *
  • CLOSED - All ports closed.

If * you configured lightsail-connect as a cidrListAliases * on your instance, or if you chose to allow the Lightsail browser-based SSH or * RDP clients to connect to your instance, that configuration is not carried over * to your new Amazon EC2 instance.

*/ inline InstanceEntry& WithPortInfoSource(PortInfoSourceType&& value) { SetPortInfoSource(std::move(value)); return *this;} /** *

A launch script you can create that configures a server with additional user * data. For example, you might want to run apt-get -y update.

*

Depending on the machine image you choose, the command to get software * on your instance varies. Amazon Linux and CentOS use yum, Debian * and Ubuntu use apt-get, and FreeBSD uses pkg.

* */ inline const Aws::String& GetUserData() const{ return m_userData; } /** *

A launch script you can create that configures a server with additional user * data. For example, you might want to run apt-get -y update.

*

Depending on the machine image you choose, the command to get software * on your instance varies. Amazon Linux and CentOS use yum, Debian * and Ubuntu use apt-get, and FreeBSD uses pkg.

* */ inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; } /** *

A launch script you can create that configures a server with additional user * data. For example, you might want to run apt-get -y update.

*

Depending on the machine image you choose, the command to get software * on your instance varies. Amazon Linux and CentOS use yum, Debian * and Ubuntu use apt-get, and FreeBSD uses pkg.

* */ inline void SetUserData(const Aws::String& value) { m_userDataHasBeenSet = true; m_userData = value; } /** *

A launch script you can create that configures a server with additional user * data. For example, you might want to run apt-get -y update.

*

Depending on the machine image you choose, the command to get software * on your instance varies. Amazon Linux and CentOS use yum, Debian * and Ubuntu use apt-get, and FreeBSD uses pkg.

* */ inline void SetUserData(Aws::String&& value) { m_userDataHasBeenSet = true; m_userData = std::move(value); } /** *

A launch script you can create that configures a server with additional user * data. For example, you might want to run apt-get -y update.

*

Depending on the machine image you choose, the command to get software * on your instance varies. Amazon Linux and CentOS use yum, Debian * and Ubuntu use apt-get, and FreeBSD uses pkg.

* */ inline void SetUserData(const char* value) { m_userDataHasBeenSet = true; m_userData.assign(value); } /** *

A launch script you can create that configures a server with additional user * data. For example, you might want to run apt-get -y update.

*

Depending on the machine image you choose, the command to get software * on your instance varies. Amazon Linux and CentOS use yum, Debian * and Ubuntu use apt-get, and FreeBSD uses pkg.

* */ inline InstanceEntry& WithUserData(const Aws::String& value) { SetUserData(value); return *this;} /** *

A launch script you can create that configures a server with additional user * data. For example, you might want to run apt-get -y update.

*

Depending on the machine image you choose, the command to get software * on your instance varies. Amazon Linux and CentOS use yum, Debian * and Ubuntu use apt-get, and FreeBSD uses pkg.

* */ inline InstanceEntry& WithUserData(Aws::String&& value) { SetUserData(std::move(value)); return *this;} /** *

A launch script you can create that configures a server with additional user * data. For example, you might want to run apt-get -y update.

*

Depending on the machine image you choose, the command to get software * on your instance varies. Amazon Linux and CentOS use yum, Debian * and Ubuntu use apt-get, and FreeBSD uses pkg.

* */ inline InstanceEntry& WithUserData(const char* value) { SetUserData(value); return *this;} /** *

The Availability Zone for the new Amazon EC2 instance.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone for the new Amazon EC2 instance.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone for the new Amazon EC2 instance.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone for the new Amazon EC2 instance.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone for the new Amazon EC2 instance.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone for the new Amazon EC2 instance.

*/ inline InstanceEntry& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone for the new Amazon EC2 instance.

*/ inline InstanceEntry& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone for the new Amazon EC2 instance.

*/ inline InstanceEntry& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} private: Aws::String m_sourceName; bool m_sourceNameHasBeenSet; Aws::String m_instanceType; bool m_instanceTypeHasBeenSet; PortInfoSourceType m_portInfoSource; bool m_portInfoSourceHasBeenSet; Aws::String m_userData; bool m_userDataHasBeenSet; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet; }; } // namespace Model } // namespace Lightsail } // namespace Aws