/* * 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.RunScheduledInstancesRequestMarshaller; /** * Container for the parameters to the {@link com.amazonaws.services.ec2.AmazonEC2#runScheduledInstances(RunScheduledInstancesRequest) RunScheduledInstances operation}. *
* Launches the specified Scheduled Instances. *
** Before you can launch a Scheduled Instance, you must purchase it and * obtain an identifier using PurchaseScheduledInstances. *
** You must launch a Scheduled Instance during its scheduled time period. * You can't stop or reboot a Scheduled Instance, but you can terminate * it as needed. If you terminate a Scheduled Instance before the current * scheduled time period ends, you can launch it again after a few * minutes. For more information, see * Scheduled Instances * in the Amazon Elastic Compute Cloud User Guide . *
* * @see com.amazonaws.services.ec2.AmazonEC2#runScheduledInstances(RunScheduledInstancesRequest) */ public class RunScheduledInstancesRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequestDefault: 1 */ private Integer instanceCount; /** * The Scheduled Instance ID. */ private String scheduledInstanceId; /** * The launch specification. */ private ScheduledInstancesLaunchSpecification launchSpecification; /** * Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency. * * @return Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency. */ public String getClientToken() { return clientToken; } /** * Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency. * * @param clientToken Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** * Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency. *
* Returns a reference to this object so that method calls can be chained together. * * @param clientToken Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency. * * @return A reference to this updated object so that method calls can be chained * together. */ public RunScheduledInstancesRequest withClientToken(String clientToken) { this.clientToken = clientToken; return this; } /** * The number of instances.
Default: 1 * * @return The number of instances.
Default: 1 */ public Integer getInstanceCount() { return instanceCount; } /** * The number of instances.
Default: 1 * * @param instanceCount The number of instances.
Default: 1 */ public void setInstanceCount(Integer instanceCount) { this.instanceCount = instanceCount; } /** * The number of instances.
Default: 1 *
* Returns a reference to this object so that method calls can be chained together. * * @param instanceCount The number of instances.
Default: 1 * * @return A reference to this updated object so that method calls can be chained * together. */ public RunScheduledInstancesRequest withInstanceCount(Integer instanceCount) { this.instanceCount = instanceCount; return this; } /** * The Scheduled Instance ID. * * @return The Scheduled Instance ID. */ public String getScheduledInstanceId() { return scheduledInstanceId; } /** * The Scheduled Instance ID. * * @param scheduledInstanceId The Scheduled Instance ID. */ public void setScheduledInstanceId(String scheduledInstanceId) { this.scheduledInstanceId = scheduledInstanceId; } /** * The Scheduled Instance ID. *
* Returns a reference to this object so that method calls can be chained together. * * @param scheduledInstanceId The Scheduled Instance ID. * * @return A reference to this updated object so that method calls can be chained * together. */ public RunScheduledInstancesRequest withScheduledInstanceId(String scheduledInstanceId) { this.scheduledInstanceId = scheduledInstanceId; return this; } /** * The launch specification. * * @return The launch specification. */ public ScheduledInstancesLaunchSpecification getLaunchSpecification() { return launchSpecification; } /** * The launch specification. * * @param launchSpecification The launch specification. */ public void setLaunchSpecification(ScheduledInstancesLaunchSpecification launchSpecification) { this.launchSpecification = launchSpecification; } /** * The launch specification. *
* Returns a reference to this object so that method calls can be chained together.
*
* @param launchSpecification The launch specification.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public RunScheduledInstancesRequest withLaunchSpecification(ScheduledInstancesLaunchSpecification launchSpecification) {
this.launchSpecification = launchSpecification;
return this;
}
/**
* This method is intended for internal use only.
* Returns the marshaled request configured with additional parameters to
* enable operation dry-run.
*/
@Override
public Request