Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates one or more Amazon Lightsail instances.
The create instances
operation supports tag-based access control via
request tags. For more information, see the
Lightsail Developer Guide.
Synopsis
- data CreateInstances = CreateInstances' {
- customImageName :: Maybe Text
- addOns :: Maybe [AddOnRequest]
- userData :: Maybe Text
- ipAddressType :: Maybe IpAddressType
- keyPairName :: Maybe Text
- tags :: Maybe [Tag]
- instanceNames :: [Text]
- availabilityZone :: Text
- blueprintId :: Text
- bundleId :: Text
- newCreateInstances :: Text -> Text -> Text -> CreateInstances
- createInstances_customImageName :: Lens' CreateInstances (Maybe Text)
- createInstances_addOns :: Lens' CreateInstances (Maybe [AddOnRequest])
- createInstances_userData :: Lens' CreateInstances (Maybe Text)
- createInstances_ipAddressType :: Lens' CreateInstances (Maybe IpAddressType)
- createInstances_keyPairName :: Lens' CreateInstances (Maybe Text)
- createInstances_tags :: Lens' CreateInstances (Maybe [Tag])
- createInstances_instanceNames :: Lens' CreateInstances [Text]
- createInstances_availabilityZone :: Lens' CreateInstances Text
- createInstances_blueprintId :: Lens' CreateInstances Text
- createInstances_bundleId :: Lens' CreateInstances Text
- data CreateInstancesResponse = CreateInstancesResponse' {
- operations :: Maybe [Operation]
- httpStatus :: Int
- newCreateInstancesResponse :: Int -> CreateInstancesResponse
- createInstancesResponse_operations :: Lens' CreateInstancesResponse (Maybe [Operation])
- createInstancesResponse_httpStatus :: Lens' CreateInstancesResponse Int
Creating a Request
data CreateInstances Source #
See: newCreateInstances
smart constructor.
CreateInstances' | |
|
Instances
:: Text | |
-> Text | |
-> Text | |
-> CreateInstances |
Create a value of CreateInstances
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:customImageName:CreateInstances'
, createInstances_customImageName
- (Deprecated) The name for your custom image.
In releases prior to June 12, 2017, this parameter was ignored by the API. It is now deprecated.
$sel:addOns:CreateInstances'
, createInstances_addOns
- An array of objects representing the add-ons to enable for the new
instance.
$sel:userData:CreateInstances'
, createInstances_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.
$sel:ipAddressType:CreateInstances'
, createInstances_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
.
$sel:keyPairName:CreateInstances'
, createInstances_keyPairName
- The name of your key pair.
$sel:tags:CreateInstances'
, createInstances_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.
$sel:instanceNames:CreateInstances'
, createInstances_instanceNames
- The names to use for your new Lightsail instances. Separate multiple
values using quotation marks and commas, for example:
["MyFirstInstance","MySecondInstance"]
$sel:availabilityZone:CreateInstances'
, createInstances_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.
$sel:blueprintId:CreateInstances'
, createInstances_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.
$sel:bundleId:CreateInstances'
, createInstances_bundleId
- The bundle of specification information for your virtual private server
(or instance), including the pricing plan (e.g., micro_1_0
).
Request Lenses
createInstances_customImageName :: Lens' CreateInstances (Maybe Text) Source #
(Deprecated) The name for your custom image.
In releases prior to June 12, 2017, this parameter was ignored by the API. It is now deprecated.
createInstances_addOns :: Lens' CreateInstances (Maybe [AddOnRequest]) Source #
An array of objects representing the add-ons to enable for the new instance.
createInstances_userData :: Lens' CreateInstances (Maybe Text) Source #
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.
createInstances_ipAddressType :: Lens' CreateInstances (Maybe IpAddressType) Source #
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
.
createInstances_keyPairName :: Lens' CreateInstances (Maybe Text) Source #
The name of your key pair.
createInstances_tags :: Lens' CreateInstances (Maybe [Tag]) Source #
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.
createInstances_instanceNames :: Lens' CreateInstances [Text] Source #
The names to use for your new Lightsail instances. Separate multiple
values using quotation marks and commas, for example:
["MyFirstInstance","MySecondInstance"]
createInstances_availabilityZone :: Lens' CreateInstances Text Source #
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.
createInstances_blueprintId :: Lens' CreateInstances Text Source #
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.
createInstances_bundleId :: Lens' CreateInstances Text Source #
The bundle of specification information for your virtual private server
(or instance), including the pricing plan (e.g., micro_1_0
).
Destructuring the Response
data CreateInstancesResponse Source #
See: newCreateInstancesResponse
smart constructor.
CreateInstancesResponse' | |
|
Instances
newCreateInstancesResponse Source #
Create a value of CreateInstancesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:operations:CreateInstancesResponse'
, createInstancesResponse_operations
- An array of objects that describe the result of the action, such as the
status of the request, the timestamp of the request, and the resources
affected by the request.
$sel:httpStatus:CreateInstancesResponse'
, createInstancesResponse_httpStatus
- The response's http status code.
Response Lenses
createInstancesResponse_operations :: Lens' CreateInstancesResponse (Maybe [Operation]) Source #
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
createInstancesResponse_httpStatus :: Lens' CreateInstancesResponse Int Source #
The response's http status code.