/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace Lightsail { namespace Model { /** */ class CreateInstancesRequest : public LightsailRequest { public: AWS_LIGHTSAIL_API CreateInstancesRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateInstances"; } AWS_LIGHTSAIL_API Aws::String SerializePayload() const override; AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The names to use for your new Lightsail instances. Separate multiple values * using quotation marks and commas, for example: * ["MyFirstInstance","MySecondInstance"]

*/ inline const Aws::Vector& GetInstanceNames() const{ return m_instanceNames; } /** *

The names to use for your new Lightsail instances. Separate multiple values * using quotation marks and commas, for example: * ["MyFirstInstance","MySecondInstance"]

*/ inline bool InstanceNamesHasBeenSet() const { return m_instanceNamesHasBeenSet; } /** *

The names to use for your new Lightsail instances. Separate multiple values * using quotation marks and commas, for example: * ["MyFirstInstance","MySecondInstance"]

*/ inline void SetInstanceNames(const Aws::Vector& value) { m_instanceNamesHasBeenSet = true; m_instanceNames = value; } /** *

The names to use for your new Lightsail instances. Separate multiple values * using quotation marks and commas, for example: * ["MyFirstInstance","MySecondInstance"]

*/ inline void SetInstanceNames(Aws::Vector&& value) { m_instanceNamesHasBeenSet = true; m_instanceNames = std::move(value); } /** *

The names to use for your new Lightsail instances. Separate multiple values * using quotation marks and commas, for example: * ["MyFirstInstance","MySecondInstance"]

*/ inline CreateInstancesRequest& WithInstanceNames(const Aws::Vector& value) { SetInstanceNames(value); return *this;} /** *

The names to use for your new Lightsail instances. Separate multiple values * using quotation marks and commas, for example: * ["MyFirstInstance","MySecondInstance"]

*/ inline CreateInstancesRequest& WithInstanceNames(Aws::Vector&& value) { SetInstanceNames(std::move(value)); return *this;} /** *

The names to use for your new Lightsail instances. Separate multiple values * using quotation marks and commas, for example: * ["MyFirstInstance","MySecondInstance"]

*/ inline CreateInstancesRequest& AddInstanceNames(const Aws::String& value) { m_instanceNamesHasBeenSet = true; m_instanceNames.push_back(value); return *this; } /** *

The names to use for your new Lightsail instances. Separate multiple values * using quotation marks and commas, for example: * ["MyFirstInstance","MySecondInstance"]

*/ inline CreateInstancesRequest& AddInstanceNames(Aws::String&& value) { m_instanceNamesHasBeenSet = true; m_instanceNames.push_back(std::move(value)); return *this; } /** *

The names to use for your new Lightsail instances. Separate multiple values * using quotation marks and commas, for example: * ["MyFirstInstance","MySecondInstance"]

*/ inline CreateInstancesRequest& AddInstanceNames(const char* value) { m_instanceNamesHasBeenSet = true; m_instanceNames.push_back(value); return *this; } /** *

The Availability Zone in which to create your instance. Use the following * format: us-east-2a (case sensitive). You can get a list of * Availability Zones by using the get * regions operation. Be sure to add the include Availability * Zones parameter to your request.

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

The Availability Zone in which to create your instance. Use the following * format: us-east-2a (case sensitive). You can get a list of * Availability Zones by using the get * regions operation. Be sure to add the include Availability * Zones parameter to your request.

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

The Availability Zone in which to create your instance. Use the following * format: us-east-2a (case sensitive). You can get a list of * Availability Zones by using the get * regions operation. Be sure to add the include Availability * Zones parameter to your request.

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

The Availability Zone in which to create your instance. Use the following * format: us-east-2a (case sensitive). You can get a list of * Availability Zones by using the get * regions operation. Be sure to add the include Availability * Zones parameter to your request.

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

The Availability Zone in which to create your instance. Use the following * format: us-east-2a (case sensitive). You can get a list of * Availability Zones by using the get * regions operation. Be sure to add the include Availability * Zones parameter to your request.

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

The Availability Zone in which to create your instance. Use the following * format: us-east-2a (case sensitive). You can get a list of * Availability Zones by using the get * regions operation. Be sure to add the include Availability * Zones parameter to your request.

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

The Availability Zone in which to create your instance. Use the following * format: us-east-2a (case sensitive). You can get a list of * Availability Zones by using the get * regions operation. Be sure to add the include Availability * Zones parameter to your request.

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

The Availability Zone in which to create your instance. Use the following * format: us-east-2a (case sensitive). You can get a list of * Availability Zones by using the get * regions operation. Be sure to add the include Availability * Zones parameter to your request.

*/ inline CreateInstancesRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

The ID for a virtual private server image (e.g., * app_wordpress_4_4 or app_lamp_7_0). Use the get * blueprints operation to return a list of available images (or * blueprints).

Use active blueprints when creating new * instances. Inactive blueprints are listed to support customers with existing * instances and are not necessarily available to create new instances. Blueprints * are marked inactive when they become outdated due to operating system updates or * new application releases.

*/ inline const Aws::String& GetBlueprintId() const{ return m_blueprintId; } /** *

The ID for a virtual private server image (e.g., * app_wordpress_4_4 or app_lamp_7_0). Use the get * blueprints operation to return a list of available images (or * blueprints).

Use active blueprints when creating new * instances. Inactive blueprints are listed to support customers with existing * instances and are not necessarily available to create new instances. Blueprints * are marked inactive when they become outdated due to operating system updates or * new application releases.

*/ inline bool BlueprintIdHasBeenSet() const { return m_blueprintIdHasBeenSet; } /** *

The ID for a virtual private server image (e.g., * app_wordpress_4_4 or app_lamp_7_0). Use the get * blueprints operation to return a list of available images (or * blueprints).

Use active blueprints when creating new * instances. Inactive blueprints are listed to support customers with existing * instances and are not necessarily available to create new instances. Blueprints * are marked inactive when they become outdated due to operating system updates or * new application releases.

*/ inline void SetBlueprintId(const Aws::String& value) { m_blueprintIdHasBeenSet = true; m_blueprintId = value; } /** *

The ID for a virtual private server image (e.g., * app_wordpress_4_4 or app_lamp_7_0). Use the get * blueprints operation to return a list of available images (or * blueprints).

Use active blueprints when creating new * instances. Inactive blueprints are listed to support customers with existing * instances and are not necessarily available to create new instances. Blueprints * are marked inactive when they become outdated due to operating system updates or * new application releases.

*/ inline void SetBlueprintId(Aws::String&& value) { m_blueprintIdHasBeenSet = true; m_blueprintId = std::move(value); } /** *

The ID for a virtual private server image (e.g., * app_wordpress_4_4 or app_lamp_7_0). Use the get * blueprints operation to return a list of available images (or * blueprints).

Use active blueprints when creating new * instances. Inactive blueprints are listed to support customers with existing * instances and are not necessarily available to create new instances. Blueprints * are marked inactive when they become outdated due to operating system updates or * new application releases.

*/ inline void SetBlueprintId(const char* value) { m_blueprintIdHasBeenSet = true; m_blueprintId.assign(value); } /** *

The ID for a virtual private server image (e.g., * app_wordpress_4_4 or app_lamp_7_0). Use the get * blueprints operation to return a list of available images (or * blueprints).

Use active blueprints when creating new * instances. Inactive blueprints are listed to support customers with existing * instances and are not necessarily available to create new instances. Blueprints * are marked inactive when they become outdated due to operating system updates or * new application releases.

*/ inline CreateInstancesRequest& WithBlueprintId(const Aws::String& value) { SetBlueprintId(value); return *this;} /** *

The ID for a virtual private server image (e.g., * app_wordpress_4_4 or app_lamp_7_0). Use the get * blueprints operation to return a list of available images (or * blueprints).

Use active blueprints when creating new * instances. Inactive blueprints are listed to support customers with existing * instances and are not necessarily available to create new instances. Blueprints * are marked inactive when they become outdated due to operating system updates or * new application releases.

*/ inline CreateInstancesRequest& WithBlueprintId(Aws::String&& value) { SetBlueprintId(std::move(value)); return *this;} /** *

The ID for a virtual private server image (e.g., * app_wordpress_4_4 or app_lamp_7_0). Use the get * blueprints operation to return a list of available images (or * blueprints).

Use active blueprints when creating new * instances. Inactive blueprints are listed to support customers with existing * instances and are not necessarily available to create new instances. Blueprints * are marked inactive when they become outdated due to operating system updates or * new application releases.

*/ inline CreateInstancesRequest& WithBlueprintId(const char* value) { SetBlueprintId(value); return *this;} /** *

The bundle of specification information for your virtual private server (or * instance), including the pricing plan (e.g., micro_1_0).

*/ inline const Aws::String& GetBundleId() const{ return m_bundleId; } /** *

The bundle of specification information for your virtual private server (or * instance), including the pricing plan (e.g., micro_1_0).

*/ inline bool BundleIdHasBeenSet() const { return m_bundleIdHasBeenSet; } /** *

The bundle of specification information for your virtual private server (or * instance), including the pricing plan (e.g., micro_1_0).

*/ inline void SetBundleId(const Aws::String& value) { m_bundleIdHasBeenSet = true; m_bundleId = value; } /** *

The bundle of specification information for your virtual private server (or * instance), including the pricing plan (e.g., micro_1_0).

*/ inline void SetBundleId(Aws::String&& value) { m_bundleIdHasBeenSet = true; m_bundleId = std::move(value); } /** *

The bundle of specification information for your virtual private server (or * instance), including the pricing plan (e.g., micro_1_0).

*/ inline void SetBundleId(const char* value) { m_bundleIdHasBeenSet = true; m_bundleId.assign(value); } /** *

The bundle of specification information for your virtual private server (or * instance), including the pricing plan (e.g., micro_1_0).

*/ inline CreateInstancesRequest& WithBundleId(const Aws::String& value) { SetBundleId(value); return *this;} /** *

The bundle of specification information for your virtual private server (or * instance), including the pricing plan (e.g., micro_1_0).

*/ inline CreateInstancesRequest& WithBundleId(Aws::String&& value) { SetBundleId(std::move(value)); return *this;} /** *

The bundle of specification information for your virtual private server (or * instance), including the pricing plan (e.g., micro_1_0).

*/ inline CreateInstancesRequest& WithBundleId(const char* value) { SetBundleId(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. For a * complete list, see the Amazon * Lightsail Developer Guide.

*/ 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. For a * complete list, see the Amazon * Lightsail Developer Guide.

*/ 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. For a * complete list, see the Amazon * Lightsail Developer Guide.

*/ 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. For a * complete list, see the Amazon * Lightsail Developer Guide.

*/ 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. For a * complete list, see the Amazon * Lightsail Developer Guide.

*/ 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. For a * complete list, see the Amazon * Lightsail Developer Guide.

*/ inline CreateInstancesRequest& 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. For a * complete list, see the Amazon * Lightsail Developer Guide.

*/ inline CreateInstancesRequest& 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. For a * complete list, see the Amazon * Lightsail Developer Guide.

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

The name of your key pair.

*/ inline const Aws::String& GetKeyPairName() const{ return m_keyPairName; } /** *

The name of your key pair.

*/ inline bool KeyPairNameHasBeenSet() const { return m_keyPairNameHasBeenSet; } /** *

The name of your key pair.

*/ inline void SetKeyPairName(const Aws::String& value) { m_keyPairNameHasBeenSet = true; m_keyPairName = value; } /** *

The name of your key pair.

*/ inline void SetKeyPairName(Aws::String&& value) { m_keyPairNameHasBeenSet = true; m_keyPairName = std::move(value); } /** *

The name of your key pair.

*/ inline void SetKeyPairName(const char* value) { m_keyPairNameHasBeenSet = true; m_keyPairName.assign(value); } /** *

The name of your key pair.

*/ inline CreateInstancesRequest& WithKeyPairName(const Aws::String& value) { SetKeyPairName(value); return *this;} /** *

The name of your key pair.

*/ inline CreateInstancesRequest& WithKeyPairName(Aws::String&& value) { SetKeyPairName(std::move(value)); return *this;} /** *

The name of your key pair.

*/ inline CreateInstancesRequest& WithKeyPairName(const char* value) { SetKeyPairName(value); return *this;} /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline CreateInstancesRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline CreateInstancesRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline CreateInstancesRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline CreateInstancesRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

An array of objects representing the add-ons to enable for the new * instance.

*/ inline const Aws::Vector& GetAddOns() const{ return m_addOns; } /** *

An array of objects representing the add-ons to enable for the new * instance.

*/ inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; } /** *

An array of objects representing the add-ons to enable for the new * instance.

*/ inline void SetAddOns(const Aws::Vector& value) { m_addOnsHasBeenSet = true; m_addOns = value; } /** *

An array of objects representing the add-ons to enable for the new * instance.

*/ inline void SetAddOns(Aws::Vector&& value) { m_addOnsHasBeenSet = true; m_addOns = std::move(value); } /** *

An array of objects representing the add-ons to enable for the new * instance.

*/ inline CreateInstancesRequest& WithAddOns(const Aws::Vector& value) { SetAddOns(value); return *this;} /** *

An array of objects representing the add-ons to enable for the new * instance.

*/ inline CreateInstancesRequest& WithAddOns(Aws::Vector&& value) { SetAddOns(std::move(value)); return *this;} /** *

An array of objects representing the add-ons to enable for the new * instance.

*/ inline CreateInstancesRequest& AddAddOns(const AddOnRequest& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(value); return *this; } /** *

An array of objects representing the add-ons to enable for the new * instance.

*/ inline CreateInstancesRequest& AddAddOns(AddOnRequest&& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(std::move(value)); return *this; } /** *

The IP address type for the instance.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline const IpAddressType& GetIpAddressType() const{ return m_ipAddressType; } /** *

The IP address type for the instance.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; } /** *

The IP address type for the instance.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline void SetIpAddressType(const IpAddressType& value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = value; } /** *

The IP address type for the instance.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline void SetIpAddressType(IpAddressType&& value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = std::move(value); } /** *

The IP address type for the instance.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline CreateInstancesRequest& WithIpAddressType(const IpAddressType& value) { SetIpAddressType(value); return *this;} /** *

The IP address type for the instance.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline CreateInstancesRequest& WithIpAddressType(IpAddressType&& value) { SetIpAddressType(std::move(value)); return *this;} private: Aws::Vector m_instanceNames; bool m_instanceNamesHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; Aws::String m_blueprintId; bool m_blueprintIdHasBeenSet = false; Aws::String m_bundleId; bool m_bundleIdHasBeenSet = false; Aws::String m_userData; bool m_userDataHasBeenSet = false; Aws::String m_keyPairName; bool m_keyPairNameHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::Vector m_addOns; bool m_addOnsHasBeenSet = false; IpAddressType m_ipAddressType; bool m_ipAddressTypeHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws