/* * Copyright 2010-2018 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.ec2.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.TerminateInstancesRequestMarshaller; /** * Container for the parameters to the {@link com.amazonaws.services.ec2.AmazonEC2#terminateInstances(TerminateInstancesRequest) TerminateInstances operation}. *
* Shuts down one or more instances. This operation is idempotent; if you * terminate an instance more than once, each call succeeds. *
** Terminated instances remain visible after termination (for * approximately one hour). *
** By default, Amazon EC2 deletes all EBS volumes that were attached when * the instance launched. Volumes attached after instance launch continue * running. *
*
* You can stop, start, and terminate EBS-backed instances. You can only
* terminate instance store-backed instances. What happens to an instance
* differs if you stop it or terminate it. For example, when you stop an
* instance, the root device and any other devices attached to the
* instance persist. When you terminate an instance, any attached EBS
* volumes with the DeleteOnTermination
block device mapping
* parameter set to true
are automatically deleted. For more
* information about the differences between stopping and terminating
* instances, see
* Instance Lifecycle
* in the Amazon Elastic Compute Cloud User Guide .
*
* For more information about troubleshooting, see * Troubleshooting Terminating Your Instance * in the Amazon Elastic Compute Cloud User Guide . *
* * @see com.amazonaws.services.ec2.AmazonEC2#terminateInstances(TerminateInstancesRequest) */ public class TerminateInstancesRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest
* Returns a reference to this object so that method calls can be chained together.
*
* @param instanceIds One or more instance IDs.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public TerminateInstancesRequest withInstanceIds(String... instanceIds) {
if (getInstanceIds() == null) setInstanceIds(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param instanceIds One or more instance IDs.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public TerminateInstancesRequest withInstanceIds(java.util.Collection