/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.lightsail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateInstancesFromSnapshotRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The names for your new instances. *
*/ private java.util.List* An object containing information about one or more disk mappings. *
*/ private java.util.Map
* The Availability Zone where you want to create your instances. Use the following formatting:
* 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.
*
* The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots * operation to return information about your existing snapshots. *
** Constraint: *
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually exclusive.
*
* The bundle of specification information for your virtual private server (or instance), including the
* pricing plan (e.g., micro_1_0
).
*
* You can create a launch script that configures a server with additional user data. For example,
* 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.
*
* The name for your key pair. *
*/ private String keyPairName; /** ** 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.
*
* An array of objects representing the add-ons to enable for the new instance. *
*/ private java.util.List* 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
.
*
* The name of the source instance from which the source automatic snapshot was created. *
** Constraints: *
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
*
* The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
operation
* to identify the dates of the available automatic snapshots.
*
* Constraints: *
*
* Must be specified in YYYY-MM-DD
format.
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
** A Boolean value to indicate whether to use the latest available automatic snapshot. *
** Constraints: *
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
** The names for your new instances. *
* * @return The names for your new instances. */ public java.util.List* The names for your new instances. *
* * @param instanceNames * The names for your new instances. */ public void setInstanceNames(java.util.Collection* The names for your new instances. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setInstanceNames(java.util.Collection)} or {@link #withInstanceNames(java.util.Collection)} if you want * to override the existing values. *
* * @param instanceNames * The names for your new instances. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInstancesFromSnapshotRequest withInstanceNames(String... instanceNames) { if (this.instanceNames == null) { setInstanceNames(new java.util.ArrayList* The names for your new instances. *
* * @param instanceNames * The names for your new instances. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInstancesFromSnapshotRequest withInstanceNames(java.util.Collection* An object containing information about one or more disk mappings. *
* * @return An object containing information about one or more disk mappings. */ public java.util.Map* An object containing information about one or more disk mappings. *
* * @param attachedDiskMapping * An object containing information about one or more disk mappings. */ public void setAttachedDiskMapping(java.util.Map* An object containing information about one or more disk mappings. *
* * @param attachedDiskMapping * An object containing information about one or more disk mappings. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInstancesFromSnapshotRequest withAttachedDiskMapping(java.util.Map
* The Availability Zone where you want to create your instances. Use the following formatting:
* 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.
*
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.
*/
public void setAvailabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
}
/**
*
* The Availability Zone where you want to create your instances. Use the following formatting:
* 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.
*
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.
*/
public String getAvailabilityZone() {
return this.availabilityZone;
}
/**
*
* The Availability Zone where you want to create your instances. Use the following formatting:
* 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.
*
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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withAvailabilityZone(String availabilityZone) {
setAvailabilityZone(availabilityZone);
return this;
}
/**
* * The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots * operation to return information about your existing snapshots. *
** Constraint: *
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually exclusive.
*
* Constraint: *
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually
* exclusive.
*
* The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots * operation to return information about your existing snapshots. *
** Constraint: *
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually exclusive.
*
* Constraint: *
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually
* exclusive.
*
* The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots * operation to return information about your existing snapshots. *
** Constraint: *
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually exclusive.
*
* Constraint: *
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually
* exclusive.
*
* The bundle of specification information for your virtual private server (or instance), including the
* pricing plan (e.g., micro_1_0
).
*
micro_1_0
).
*/
public void setBundleId(String bundleId) {
this.bundleId = bundleId;
}
/**
*
* The bundle of specification information for your virtual private server (or instance), including the
* pricing plan (e.g., micro_1_0
).
*
micro_1_0
).
*/
public String getBundleId() {
return this.bundleId;
}
/**
*
* The bundle of specification information for your virtual private server (or instance), including the
* pricing plan (e.g., micro_1_0
).
*
micro_1_0
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withBundleId(String bundleId) {
setBundleId(bundleId);
return this;
}
/**
*
* You can create a launch script that configures a server with additional user data. For example,
* 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.
*
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.
*
* You can create a launch script that configures a server with additional user data. For example,
* 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.
*
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.
*
* You can create a launch script that configures a server with additional user data. For example,
* 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.
*
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.
*
* The name for your key pair. *
* * @param keyPairName * The name for your key pair. */ public void setKeyPairName(String keyPairName) { this.keyPairName = keyPairName; } /** ** The name for your key pair. *
* * @return The name for your key pair. */ public String getKeyPairName() { return this.keyPairName; } /** ** The name for your key pair. *
* * @param keyPairName * The name for your key pair. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInstancesFromSnapshotRequest withKeyPairName(String keyPairName) { setKeyPairName(keyPairName); 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.
*
* Use the
* 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.
*/
public java.util.ListTagResource
action to tag a resource after it's created.
*
* Use the
* The tag keys and optional values to add to the resource during create.
*
* Use the
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
* TagResource
action to tag a resource after it's created.
*/
public void setTags(java.util.CollectionTagResource
action to tag a resource after it's created.
*
* Use the
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayListTagResource
action to tag a resource after it's created.
*
* Use the
* An array of objects representing the add-ons to enable for the new instance.
*
* An array of objects representing the add-ons to enable for the new instance.
*
* An array of objects representing the add-ons to enable for the new instance.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAddOns(java.util.Collection)} or {@link #withAddOns(java.util.Collection)} if you want to override the
* existing values.
*
* An array of objects representing the add-ons to enable for the new instance.
*
* The IP address type for the instance.
*
* The possible values are
* The default value is TagResource
action to tag a resource after it's created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withTags(java.util.Collectionipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
* dualstack
.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
* @see IpAddressType
*/
public void setIpAddressType(String ipAddressType) {
this.ipAddressType = 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
.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
* @see IpAddressType
*/
public String getIpAddressType() {
return this.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
.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public CreateInstancesFromSnapshotRequest withIpAddressType(String ipAddressType) {
setIpAddressType(ipAddressType);
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
.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public CreateInstancesFromSnapshotRequest withIpAddressType(IpAddressType ipAddressType) {
this.ipAddressType = ipAddressType.toString();
return this;
}
/**
*
* The name of the source instance from which the source automatic snapshot was created. *
** Constraints: *
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
** Constraints: *
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, * see the Amazon Lightsail Developer Guide. *
** The name of the source instance from which the source automatic snapshot was created. *
** Constraints: *
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
** Constraints: *
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, * see the Amazon Lightsail Developer Guide. *
** The name of the source instance from which the source automatic snapshot was created. *
** Constraints: *
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
** Constraints: *
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, * see the Amazon Lightsail Developer Guide. *
*
* The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
operation
* to identify the dates of the available automatic snapshots.
*
* Constraints: *
*
* Must be specified in YYYY-MM-DD
format.
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
*get auto snapshots
* operation to identify the dates of the available automatic snapshots.
* * Constraints: *
*
* Must be specified in YYYY-MM-DD
format.
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
* parameter. The restore date
and use latest restorable auto snapshot
parameters
* are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, * see the Amazon Lightsail Developer Guide. *
*
* The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
operation
* to identify the dates of the available automatic snapshots.
*
* Constraints: *
*
* Must be specified in YYYY-MM-DD
format.
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
*get auto snapshots
* operation to identify the dates of the available automatic snapshots.
* * Constraints: *
*
* Must be specified in YYYY-MM-DD
format.
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
* parameter. The restore date
and use latest restorable auto snapshot
parameters
* are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, * see the Amazon Lightsail Developer Guide. *
*
* The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
operation
* to identify the dates of the available automatic snapshots.
*
* Constraints: *
*
* Must be specified in YYYY-MM-DD
format.
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
*get auto snapshots
* operation to identify the dates of the available automatic snapshots.
* * Constraints: *
*
* Must be specified in YYYY-MM-DD
format.
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
* parameter. The restore date
and use latest restorable auto snapshot
parameters
* are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, * see the Amazon Lightsail Developer Guide. *
** A Boolean value to indicate whether to use the latest available automatic snapshot. *
** Constraints: *
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
** Constraints: *
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, * see the Amazon Lightsail Developer Guide. *
** A Boolean value to indicate whether to use the latest available automatic snapshot. *
** Constraints: *
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
** Constraints: *
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, * see the Amazon Lightsail Developer Guide. *
** A Boolean value to indicate whether to use the latest available automatic snapshot. *
** Constraints: *
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
** Constraints: *
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, * see the Amazon Lightsail Developer Guide. *
** A Boolean value to indicate whether to use the latest available automatic snapshot. *
** Constraints: *
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the * Amazon Lightsail Developer Guide. *
** Constraints: *
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, * see the Amazon Lightsail Developer Guide. *
*