/*
* 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.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.ModifyInstancePlacementRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ModifyInstancePlacementRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest
* The affinity setting for the instance.
*
* The name of the placement group in which to place the instance. For spread placement groups, the instance must
* have a tenancy of
* To remove an instance from a placement group, specify an empty string ("").
*
* The ID of the Dedicated Host with which to associate the instance.
*
* The ID of the instance that you are modifying.
*
* The tenancy for the instance.
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of
* The number of the partition in which to place the instance. Valid only if the placement group strategy is set to
*
* The ARN of the host resource group in which to place the instance. The instance must have a tenancy of
*
* The Group Id of a placement group. You must specify the Placement Group Group Id to launch an instance in
* a shared placement group.
*
* The affinity setting for the instance.
*
* The affinity setting for the instance.
*
* The affinity setting for the instance.
*
* The affinity setting for the instance.
*
* The affinity setting for the instance.
*
* The name of the placement group in which to place the instance. For spread placement groups, the instance must
* have a tenancy of
* To remove an instance from a placement group, specify an empty string ("").
* default
. For cluster and partition placement groups, the instance must have a
* tenancy of default
or dedicated
.
* host
. You
* can't change the tenancy from host
to dedicated
or default
. Attempting to
* make one of these unsupported tenancy changes results in an InvalidRequest
error code.
* partition
.
* host
to specify this parameter.
* default
. For cluster and partition placement groups, the instance must have a
* tenancy of default
or dedicated
.
* default
. For cluster and partition placement groups, the instance must
* have a tenancy of default
or dedicated
.
* To remove an instance from a placement group, specify an empty string (""). */ public void setGroupName(String groupName) { this.groupName = groupName; } /** *
* The name of the placement group in which to place the instance. For spread placement groups, the instance must
* have a tenancy of default
. For cluster and partition placement groups, the instance must have a
* tenancy of default
or dedicated
.
*
* To remove an instance from a placement group, specify an empty string (""). *
* * @return The name of the placement group in which to place the instance. For spread placement groups, the instance * must have a tenancy ofdefault
. For cluster and partition placement groups, the instance
* must have a tenancy of default
or dedicated
.
* * To remove an instance from a placement group, specify an empty string (""). */ public String getGroupName() { return this.groupName; } /** *
* The name of the placement group in which to place the instance. For spread placement groups, the instance must
* have a tenancy of default
. For cluster and partition placement groups, the instance must have a
* tenancy of default
or dedicated
.
*
* To remove an instance from a placement group, specify an empty string (""). *
* * @param groupName * The name of the placement group in which to place the instance. For spread placement groups, the instance * must have a tenancy ofdefault
. For cluster and partition placement groups, the instance must
* have a tenancy of default
or dedicated
.
* * To remove an instance from a placement group, specify an empty string (""). * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyInstancePlacementRequest withGroupName(String groupName) { setGroupName(groupName); return this; } /** *
* The ID of the Dedicated Host with which to associate the instance. *
* * @param hostId * The ID of the Dedicated Host with which to associate the instance. */ public void setHostId(String hostId) { this.hostId = hostId; } /** ** The ID of the Dedicated Host with which to associate the instance. *
* * @return The ID of the Dedicated Host with which to associate the instance. */ public String getHostId() { return this.hostId; } /** ** The ID of the Dedicated Host with which to associate the instance. *
* * @param hostId * The ID of the Dedicated Host with which to associate the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyInstancePlacementRequest withHostId(String hostId) { setHostId(hostId); return this; } /** ** The ID of the instance that you are modifying. *
* * @param instanceId * The ID of the instance that you are modifying. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** ** The ID of the instance that you are modifying. *
* * @return The ID of the instance that you are modifying. */ public String getInstanceId() { return this.instanceId; } /** ** The ID of the instance that you are modifying. *
* * @param instanceId * The ID of the instance that you are modifying. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyInstancePlacementRequest withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** ** The tenancy for the instance. *
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host
. You
* can't change the tenancy from host
to dedicated
or default
. Attempting to
* make one of these unsupported tenancy changes results in an InvalidRequest
error code.
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host
.
* You can't change the tenancy from host
to dedicated
or default
.
* Attempting to make one of these unsupported tenancy changes results in an InvalidRequest
* error code.
*
* The tenancy for the instance. *
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host
. You
* can't change the tenancy from host
to dedicated
or default
. Attempting to
* make one of these unsupported tenancy changes results in an InvalidRequest
error code.
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host
.
* You can't change the tenancy from host
to dedicated
or default
.
* Attempting to make one of these unsupported tenancy changes results in an InvalidRequest
* error code.
*
* The tenancy for the instance. *
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host
. You
* can't change the tenancy from host
to dedicated
or default
. Attempting to
* make one of these unsupported tenancy changes results in an InvalidRequest
error code.
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host
.
* You can't change the tenancy from host
to dedicated
or default
.
* Attempting to make one of these unsupported tenancy changes results in an InvalidRequest
* error code.
*
* The tenancy for the instance. *
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host
. You
* can't change the tenancy from host
to dedicated
or default
. Attempting to
* make one of these unsupported tenancy changes results in an InvalidRequest
error code.
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host
.
* You can't change the tenancy from host
to dedicated
or default
.
* Attempting to make one of these unsupported tenancy changes results in an InvalidRequest
* error code.
*
* The tenancy for the instance. *
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host
. You
* can't change the tenancy from host
to dedicated
or default
. Attempting to
* make one of these unsupported tenancy changes results in an InvalidRequest
error code.
*
* For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host
.
* You can't change the tenancy from host
to dedicated
or default
.
* Attempting to make one of these unsupported tenancy changes results in an InvalidRequest
* error code.
*
* The number of the partition in which to place the instance. Valid only if the placement group strategy is set to
* partition
.
*
partition
.
*/
public void setPartitionNumber(Integer partitionNumber) {
this.partitionNumber = partitionNumber;
}
/**
*
* The number of the partition in which to place the instance. Valid only if the placement group strategy is set to
* partition
.
*
partition
.
*/
public Integer getPartitionNumber() {
return this.partitionNumber;
}
/**
*
* The number of the partition in which to place the instance. Valid only if the placement group strategy is set to
* partition
.
*
partition
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyInstancePlacementRequest withPartitionNumber(Integer partitionNumber) {
setPartitionNumber(partitionNumber);
return this;
}
/**
*
* The ARN of the host resource group in which to place the instance. The instance must have a tenancy of
* host
to specify this parameter.
*
host
to specify this parameter.
*/
public void setHostResourceGroupArn(String hostResourceGroupArn) {
this.hostResourceGroupArn = hostResourceGroupArn;
}
/**
*
* The ARN of the host resource group in which to place the instance. The instance must have a tenancy of
* host
to specify this parameter.
*
host
to specify this parameter.
*/
public String getHostResourceGroupArn() {
return this.hostResourceGroupArn;
}
/**
*
* The ARN of the host resource group in which to place the instance. The instance must have a tenancy of
* host
to specify this parameter.
*
host
to specify this parameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyInstancePlacementRequest withHostResourceGroupArn(String hostResourceGroupArn) {
setHostResourceGroupArn(hostResourceGroupArn);
return this;
}
/**
* * The Group Id of a placement group. You must specify the Placement Group Group Id to launch an instance in * a shared placement group. *
* * @param groupId * The Group Id of a placement group. You must specify the Placement Group Group Id to launch an * instance in a shared placement group. */ public void setGroupId(String groupId) { this.groupId = groupId; } /** ** The Group Id of a placement group. You must specify the Placement Group Group Id to launch an instance in * a shared placement group. *
* * @return The Group Id of a placement group. You must specify the Placement Group Group Id to launch an * instance in a shared placement group. */ public String getGroupId() { return this.groupId; } /** ** The Group Id of a placement group. You must specify the Placement Group Group Id to launch an instance in * a shared placement group. *
* * @param groupId * The Group Id of a placement group. You must specify the Placement Group Group Id to launch an * instance in a shared placement group. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyInstancePlacementRequest withGroupId(String groupId) { setGroupId(groupId); 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