All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ec2.model.AllocateHostsRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EC2 module holds the client classes that are used for communicating with Amazon EC2 Service

The newest version!
/*
 * Copyright 2019-2024 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.AllocateHostsRequestMarshaller;

/**
 * 
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AllocateHostsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest {

    /**
     * 

* Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, * or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see * Understanding auto-placement and affinity in the Amazon EC2 User Guide. *

*

* Default: off *

*/ private String autoPlacement; /** *

* The Availability Zone in which to allocate the Dedicated Host. *

*/ private String availabilityZone; /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. *

*/ private String clientToken; /** *

* Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the * Dedicated Hosts support instances of the specified instance type only. *

*

* If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit this * parameter and specify InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request. *

*/ private String instanceType; /** *

* Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, the * Dedicated Hosts support multiple instance types within that instance family. *

*

* If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify * InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same * request. *

*/ private String instanceFamily; /** *

* The number of Dedicated Hosts to allocate to your account with these parameters. If you are allocating the * Dedicated Hosts on an Outpost, and you specify AssetIds, you can omit this parameter. In this case, Amazon * EC2 allocates a Dedicated Host on each specified hardware asset. If you specify both AssetIds and * Quantity, then the value that you specify for Quantity must be equal to the number of asset IDs * specified. *

*/ private Integer quantity; /** *

* The tags to apply to the Dedicated Host during creation. *

*/ private com.amazonaws.internal.SdkInternalList tagSpecifications; /** *

* Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host recovery in * the Amazon EC2 User Guide. *

*

* Default: off *

*/ private String hostRecovery; /** *

* The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated Host. If you * specify OutpostArn, you can optionally specify AssetIds. *

*

* If you are allocating the Dedicated Host in a Region, omit this parameter. *

*/ private String outpostArn; /** *

* Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see Host maintenance * in the Amazon EC2 User Guide. *

*/ private String hostMaintenance; /** *

* The IDs of the Outpost hardware assets on which to allocate the Dedicated Hosts. Targeting specific hardware * assets on an Outpost can help to minimize latency between your workloads. This parameter is supported only if you * specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, omit this parameter. *

*
    *
  • *

    * If you specify this parameter, you can omit Quantity. In this case, Amazon EC2 allocates a Dedicated Host * on each specified hardware asset. *

    *
  • *
  • *

    * If you specify both AssetIds and Quantity, then the value for Quantity must be equal to the * number of asset IDs specified. *

    *
  • *
*/ private com.amazonaws.internal.SdkInternalList assetIds; /** *

* Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, * or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see * Understanding auto-placement and affinity in the Amazon EC2 User Guide. *

*

* Default: off *

* * @param autoPlacement * Indicates whether the host accepts any untargeted instance launches that match its instance type * configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For * more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide.

*

* Default: off * @see AutoPlacement */ public void setAutoPlacement(String autoPlacement) { this.autoPlacement = autoPlacement; } /** *

* Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, * or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see * Understanding auto-placement and affinity in the Amazon EC2 User Guide. *

*

* Default: off *

* * @return Indicates whether the host accepts any untargeted instance launches that match its instance type * configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For * more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide.

*

* Default: off * @see AutoPlacement */ public String getAutoPlacement() { return this.autoPlacement; } /** *

* Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, * or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see * Understanding auto-placement and affinity in the Amazon EC2 User Guide. *

*

* Default: off *

* * @param autoPlacement * Indicates whether the host accepts any untargeted instance launches that match its instance type * configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For * more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide.

*

* Default: off * @return Returns a reference to this object so that method calls can be chained together. * @see AutoPlacement */ public AllocateHostsRequest withAutoPlacement(String autoPlacement) { setAutoPlacement(autoPlacement); return this; } /** *

* Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, * or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see * Understanding auto-placement and affinity in the Amazon EC2 User Guide. *

*

* Default: off *

* * @param autoPlacement * Indicates whether the host accepts any untargeted instance launches that match its instance type * configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For * more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide.

*

* Default: off * @see AutoPlacement */ public void setAutoPlacement(AutoPlacement autoPlacement) { withAutoPlacement(autoPlacement); } /** *

* Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, * or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see * Understanding auto-placement and affinity in the Amazon EC2 User Guide. *

*

* Default: off *

* * @param autoPlacement * Indicates whether the host accepts any untargeted instance launches that match its instance type * configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For * more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide.

*

* Default: off * @return Returns a reference to this object so that method calls can be chained together. * @see AutoPlacement */ public AllocateHostsRequest withAutoPlacement(AutoPlacement autoPlacement) { this.autoPlacement = autoPlacement.toString(); return this; } /** *

* The Availability Zone in which to allocate the Dedicated Host. *

* * @param availabilityZone * The Availability Zone in which to allocate the Dedicated Host. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** *

* The Availability Zone in which to allocate the Dedicated Host. *

* * @return The Availability Zone in which to allocate the Dedicated Host. */ public String getAvailabilityZone() { return this.availabilityZone; } /** *

* The Availability Zone in which to allocate the Dedicated Host. *

* * @param availabilityZone * The Availability Zone in which to allocate the Dedicated Host. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateHostsRequest withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. *

* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. *

* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. */ public String getClientToken() { return this.clientToken; } /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. *

* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateHostsRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the * Dedicated Hosts support instances of the specified instance type only. *

*

* If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit this * parameter and specify InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request. *

* * @param instanceType * Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the * Dedicated Hosts support instances of the specified instance type only.

*

* If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit * this parameter and specify InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request. */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the * Dedicated Hosts support instances of the specified instance type only. *

*

* If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit this * parameter and specify InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request. *

* * @return Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the * Dedicated Hosts support instances of the specified instance type only.

*

* If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit * this parameter and specify InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request. */ public String getInstanceType() { return this.instanceType; } /** *

* Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the * Dedicated Hosts support instances of the specified instance type only. *

*

* If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit this * parameter and specify InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request. *

* * @param instanceType * Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the * Dedicated Hosts support instances of the specified instance type only.

*

* If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit * this parameter and specify InstanceFamily instead. You cannot specify InstanceType and * InstanceFamily in the same request. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateHostsRequest withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *

* Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, the * Dedicated Hosts support multiple instance types within that instance family. *

*

* If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify * InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same * request. *

* * @param instanceFamily * Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, * the Dedicated Hosts support multiple instance types within that instance family.

*

* If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify * InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same * request. */ public void setInstanceFamily(String instanceFamily) { this.instanceFamily = instanceFamily; } /** *

* Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, the * Dedicated Hosts support multiple instance types within that instance family. *

*

* If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify * InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same * request. *

* * @return Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, * the Dedicated Hosts support multiple instance types within that instance family.

*

* If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify * InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same * request. */ public String getInstanceFamily() { return this.instanceFamily; } /** *

* Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, the * Dedicated Hosts support multiple instance types within that instance family. *

*

* If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify * InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same * request. *

* * @param instanceFamily * Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, * the Dedicated Hosts support multiple instance types within that instance family.

*

* If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify * InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same * request. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateHostsRequest withInstanceFamily(String instanceFamily) { setInstanceFamily(instanceFamily); return this; } /** *

* The number of Dedicated Hosts to allocate to your account with these parameters. If you are allocating the * Dedicated Hosts on an Outpost, and you specify AssetIds, you can omit this parameter. In this case, Amazon * EC2 allocates a Dedicated Host on each specified hardware asset. If you specify both AssetIds and * Quantity, then the value that you specify for Quantity must be equal to the number of asset IDs * specified. *

* * @param quantity * The number of Dedicated Hosts to allocate to your account with these parameters. If you are allocating the * Dedicated Hosts on an Outpost, and you specify AssetIds, you can omit this parameter. In this case, * Amazon EC2 allocates a Dedicated Host on each specified hardware asset. If you specify both * AssetIds and Quantity, then the value that you specify for Quantity must be equal to * the number of asset IDs specified. */ public void setQuantity(Integer quantity) { this.quantity = quantity; } /** *

* The number of Dedicated Hosts to allocate to your account with these parameters. If you are allocating the * Dedicated Hosts on an Outpost, and you specify AssetIds, you can omit this parameter. In this case, Amazon * EC2 allocates a Dedicated Host on each specified hardware asset. If you specify both AssetIds and * Quantity, then the value that you specify for Quantity must be equal to the number of asset IDs * specified. *

* * @return The number of Dedicated Hosts to allocate to your account with these parameters. If you are allocating * the Dedicated Hosts on an Outpost, and you specify AssetIds, you can omit this parameter. In this * case, Amazon EC2 allocates a Dedicated Host on each specified hardware asset. If you specify both * AssetIds and Quantity, then the value that you specify for Quantity must be equal to * the number of asset IDs specified. */ public Integer getQuantity() { return this.quantity; } /** *

* The number of Dedicated Hosts to allocate to your account with these parameters. If you are allocating the * Dedicated Hosts on an Outpost, and you specify AssetIds, you can omit this parameter. In this case, Amazon * EC2 allocates a Dedicated Host on each specified hardware asset. If you specify both AssetIds and * Quantity, then the value that you specify for Quantity must be equal to the number of asset IDs * specified. *

* * @param quantity * The number of Dedicated Hosts to allocate to your account with these parameters. If you are allocating the * Dedicated Hosts on an Outpost, and you specify AssetIds, you can omit this parameter. In this case, * Amazon EC2 allocates a Dedicated Host on each specified hardware asset. If you specify both * AssetIds and Quantity, then the value that you specify for Quantity must be equal to * the number of asset IDs specified. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateHostsRequest withQuantity(Integer quantity) { setQuantity(quantity); return this; } /** *

* The tags to apply to the Dedicated Host during creation. *

* * @return The tags to apply to the Dedicated Host during creation. */ public java.util.List getTagSpecifications() { if (tagSpecifications == null) { tagSpecifications = new com.amazonaws.internal.SdkInternalList(); } return tagSpecifications; } /** *

* The tags to apply to the Dedicated Host during creation. *

* * @param tagSpecifications * The tags to apply to the Dedicated Host during creation. */ public void setTagSpecifications(java.util.Collection tagSpecifications) { if (tagSpecifications == null) { this.tagSpecifications = null; return; } this.tagSpecifications = new com.amazonaws.internal.SdkInternalList(tagSpecifications); } /** *

* The tags to apply to the Dedicated Host during creation. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if * you want to override the existing values. *

* * @param tagSpecifications * The tags to apply to the Dedicated Host during creation. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateHostsRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList(tagSpecifications.length)); } for (TagSpecification ele : tagSpecifications) { this.tagSpecifications.add(ele); } return this; } /** *

* The tags to apply to the Dedicated Host during creation. *

* * @param tagSpecifications * The tags to apply to the Dedicated Host during creation. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateHostsRequest withTagSpecifications(java.util.Collection tagSpecifications) { setTagSpecifications(tagSpecifications); return this; } /** *

* Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host recovery in * the Amazon EC2 User Guide. *

*

* Default: off *

* * @param hostRecovery * Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host * recovery in the Amazon EC2 User Guide.

*

* Default: off * @see HostRecovery */ public void setHostRecovery(String hostRecovery) { this.hostRecovery = hostRecovery; } /** *

* Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host recovery in * the Amazon EC2 User Guide. *

*

* Default: off *

* * @return Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host * recovery in the Amazon EC2 User Guide.

*

* Default: off * @see HostRecovery */ public String getHostRecovery() { return this.hostRecovery; } /** *

* Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host recovery in * the Amazon EC2 User Guide. *

*

* Default: off *

* * @param hostRecovery * Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host * recovery in the Amazon EC2 User Guide.

*

* Default: off * @return Returns a reference to this object so that method calls can be chained together. * @see HostRecovery */ public AllocateHostsRequest withHostRecovery(String hostRecovery) { setHostRecovery(hostRecovery); return this; } /** *

* Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host recovery in * the Amazon EC2 User Guide. *

*

* Default: off *

* * @param hostRecovery * Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host * recovery in the Amazon EC2 User Guide.

*

* Default: off * @see HostRecovery */ public void setHostRecovery(HostRecovery hostRecovery) { withHostRecovery(hostRecovery); } /** *

* Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host recovery in * the Amazon EC2 User Guide. *

*

* Default: off *

* * @param hostRecovery * Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by * default. For more information, see Host * recovery in the Amazon EC2 User Guide.

*

* Default: off * @return Returns a reference to this object so that method calls can be chained together. * @see HostRecovery */ public AllocateHostsRequest withHostRecovery(HostRecovery hostRecovery) { this.hostRecovery = hostRecovery.toString(); return this; } /** *

* The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated Host. If you * specify OutpostArn, you can optionally specify AssetIds. *

*

* If you are allocating the Dedicated Host in a Region, omit this parameter. *

* * @param outpostArn * The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated Host. * If you specify OutpostArn, you can optionally specify AssetIds.

*

* If you are allocating the Dedicated Host in a Region, omit this parameter. */ public void setOutpostArn(String outpostArn) { this.outpostArn = outpostArn; } /** *

* The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated Host. If you * specify OutpostArn, you can optionally specify AssetIds. *

*

* If you are allocating the Dedicated Host in a Region, omit this parameter. *

* * @return The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated * Host. If you specify OutpostArn, you can optionally specify AssetIds.

*

* If you are allocating the Dedicated Host in a Region, omit this parameter. */ public String getOutpostArn() { return this.outpostArn; } /** *

* The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated Host. If you * specify OutpostArn, you can optionally specify AssetIds. *

*

* If you are allocating the Dedicated Host in a Region, omit this parameter. *

* * @param outpostArn * The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated Host. * If you specify OutpostArn, you can optionally specify AssetIds.

*

* If you are allocating the Dedicated Host in a Region, omit this parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateHostsRequest withOutpostArn(String outpostArn) { setOutpostArn(outpostArn); return this; } /** *

* Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see Host maintenance * in the Amazon EC2 User Guide. *

* * @param hostMaintenance * Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see * Host * maintenance in the Amazon EC2 User Guide. * @see HostMaintenance */ public void setHostMaintenance(String hostMaintenance) { this.hostMaintenance = hostMaintenance; } /** *

* Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see Host maintenance * in the Amazon EC2 User Guide. *

* * @return Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see * Host * maintenance in the Amazon EC2 User Guide. * @see HostMaintenance */ public String getHostMaintenance() { return this.hostMaintenance; } /** *

* Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see Host maintenance * in the Amazon EC2 User Guide. *

* * @param hostMaintenance * Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see * Host * maintenance in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see HostMaintenance */ public AllocateHostsRequest withHostMaintenance(String hostMaintenance) { setHostMaintenance(hostMaintenance); return this; } /** *

* Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see Host maintenance * in the Amazon EC2 User Guide. *

* * @param hostMaintenance * Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see * Host * maintenance in the Amazon EC2 User Guide. * @see HostMaintenance */ public void setHostMaintenance(HostMaintenance hostMaintenance) { withHostMaintenance(hostMaintenance); } /** *

* Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see Host maintenance * in the Amazon EC2 User Guide. *

* * @param hostMaintenance * Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see * Host * maintenance in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see HostMaintenance */ public AllocateHostsRequest withHostMaintenance(HostMaintenance hostMaintenance) { this.hostMaintenance = hostMaintenance.toString(); return this; } /** *

* The IDs of the Outpost hardware assets on which to allocate the Dedicated Hosts. Targeting specific hardware * assets on an Outpost can help to minimize latency between your workloads. This parameter is supported only if you * specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, omit this parameter. *

*
    *
  • *

    * If you specify this parameter, you can omit Quantity. In this case, Amazon EC2 allocates a Dedicated Host * on each specified hardware asset. *

    *
  • *
  • *

    * If you specify both AssetIds and Quantity, then the value for Quantity must be equal to the * number of asset IDs specified. *

    *
  • *
* * @return The IDs of the Outpost hardware assets on which to allocate the Dedicated Hosts. Targeting specific * hardware assets on an Outpost can help to minimize latency between your workloads. This parameter is * supported only if you specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, * omit this parameter.

*
    *
  • *

    * If you specify this parameter, you can omit Quantity. In this case, Amazon EC2 allocates a * Dedicated Host on each specified hardware asset. *

    *
  • *
  • *

    * If you specify both AssetIds and Quantity, then the value for Quantity must be equal * to the number of asset IDs specified. *

    *
  • */ public java.util.List getAssetIds() { if (assetIds == null) { assetIds = new com.amazonaws.internal.SdkInternalList(); } return assetIds; } /** *

    * The IDs of the Outpost hardware assets on which to allocate the Dedicated Hosts. Targeting specific hardware * assets on an Outpost can help to minimize latency between your workloads. This parameter is supported only if you * specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, omit this parameter. *

    *
      *
    • *

      * If you specify this parameter, you can omit Quantity. In this case, Amazon EC2 allocates a Dedicated Host * on each specified hardware asset. *

      *
    • *
    • *

      * If you specify both AssetIds and Quantity, then the value for Quantity must be equal to the * number of asset IDs specified. *

      *
    • *
    * * @param assetIds * The IDs of the Outpost hardware assets on which to allocate the Dedicated Hosts. Targeting specific * hardware assets on an Outpost can help to minimize latency between your workloads. This parameter is * supported only if you specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, * omit this parameter.

    *
      *
    • *

      * If you specify this parameter, you can omit Quantity. In this case, Amazon EC2 allocates a * Dedicated Host on each specified hardware asset. *

      *
    • *
    • *

      * If you specify both AssetIds and Quantity, then the value for Quantity must be equal * to the number of asset IDs specified. *

      *
    • */ public void setAssetIds(java.util.Collection assetIds) { if (assetIds == null) { this.assetIds = null; return; } this.assetIds = new com.amazonaws.internal.SdkInternalList(assetIds); } /** *

      * The IDs of the Outpost hardware assets on which to allocate the Dedicated Hosts. Targeting specific hardware * assets on an Outpost can help to minimize latency between your workloads. This parameter is supported only if you * specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, omit this parameter. *

      *
        *
      • *

        * If you specify this parameter, you can omit Quantity. In this case, Amazon EC2 allocates a Dedicated Host * on each specified hardware asset. *

        *
      • *
      • *

        * If you specify both AssetIds and Quantity, then the value for Quantity must be equal to the * number of asset IDs specified. *

        *
      • *
      *

      * NOTE: This method appends the values to the existing list (if any). Use * {@link #setAssetIds(java.util.Collection)} or {@link #withAssetIds(java.util.Collection)} if you want to override * the existing values. *

      * * @param assetIds * The IDs of the Outpost hardware assets on which to allocate the Dedicated Hosts. Targeting specific * hardware assets on an Outpost can help to minimize latency between your workloads. This parameter is * supported only if you specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, * omit this parameter.

      *
        *
      • *

        * If you specify this parameter, you can omit Quantity. In this case, Amazon EC2 allocates a * Dedicated Host on each specified hardware asset. *

        *
      • *
      • *

        * If you specify both AssetIds and Quantity, then the value for Quantity must be equal * to the number of asset IDs specified. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateHostsRequest withAssetIds(String... assetIds) { if (this.assetIds == null) { setAssetIds(new com.amazonaws.internal.SdkInternalList(assetIds.length)); } for (String ele : assetIds) { this.assetIds.add(ele); } return this; } /** *

        * The IDs of the Outpost hardware assets on which to allocate the Dedicated Hosts. Targeting specific hardware * assets on an Outpost can help to minimize latency between your workloads. This parameter is supported only if you * specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, omit this parameter. *

        *
          *
        • *

          * If you specify this parameter, you can omit Quantity. In this case, Amazon EC2 allocates a Dedicated Host * on each specified hardware asset. *

          *
        • *
        • *

          * If you specify both AssetIds and Quantity, then the value for Quantity must be equal to the * number of asset IDs specified. *

          *
        • *
        * * @param assetIds * The IDs of the Outpost hardware assets on which to allocate the Dedicated Hosts. Targeting specific * hardware assets on an Outpost can help to minimize latency between your workloads. This parameter is * supported only if you specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, * omit this parameter.

        *
          *
        • *

          * If you specify this parameter, you can omit Quantity. In this case, Amazon EC2 allocates a * Dedicated Host on each specified hardware asset. *

          *
        • *
        • *

          * If you specify both AssetIds and Quantity, then the value for Quantity must be equal * to the number of asset IDs specified. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateHostsRequest withAssetIds(java.util.Collection assetIds) { setAssetIds(assetIds); 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 getDryRunRequest() { Request request = new AllocateHostsRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAutoPlacement() != null) sb.append("AutoPlacement: ").append(getAutoPlacement()).append(","); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getInstanceFamily() != null) sb.append("InstanceFamily: ").append(getInstanceFamily()).append(","); if (getQuantity() != null) sb.append("Quantity: ").append(getQuantity()).append(","); if (getTagSpecifications() != null) sb.append("TagSpecifications: ").append(getTagSpecifications()).append(","); if (getHostRecovery() != null) sb.append("HostRecovery: ").append(getHostRecovery()).append(","); if (getOutpostArn() != null) sb.append("OutpostArn: ").append(getOutpostArn()).append(","); if (getHostMaintenance() != null) sb.append("HostMaintenance: ").append(getHostMaintenance()).append(","); if (getAssetIds() != null) sb.append("AssetIds: ").append(getAssetIds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AllocateHostsRequest == false) return false; AllocateHostsRequest other = (AllocateHostsRequest) obj; if (other.getAutoPlacement() == null ^ this.getAutoPlacement() == null) return false; if (other.getAutoPlacement() != null && other.getAutoPlacement().equals(this.getAutoPlacement()) == false) return false; if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false; if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getInstanceFamily() == null ^ this.getInstanceFamily() == null) return false; if (other.getInstanceFamily() != null && other.getInstanceFamily().equals(this.getInstanceFamily()) == false) return false; if (other.getQuantity() == null ^ this.getQuantity() == null) return false; if (other.getQuantity() != null && other.getQuantity().equals(this.getQuantity()) == false) return false; if (other.getTagSpecifications() == null ^ this.getTagSpecifications() == null) return false; if (other.getTagSpecifications() != null && other.getTagSpecifications().equals(this.getTagSpecifications()) == false) return false; if (other.getHostRecovery() == null ^ this.getHostRecovery() == null) return false; if (other.getHostRecovery() != null && other.getHostRecovery().equals(this.getHostRecovery()) == false) return false; if (other.getOutpostArn() == null ^ this.getOutpostArn() == null) return false; if (other.getOutpostArn() != null && other.getOutpostArn().equals(this.getOutpostArn()) == false) return false; if (other.getHostMaintenance() == null ^ this.getHostMaintenance() == null) return false; if (other.getHostMaintenance() != null && other.getHostMaintenance().equals(this.getHostMaintenance()) == false) return false; if (other.getAssetIds() == null ^ this.getAssetIds() == null) return false; if (other.getAssetIds() != null && other.getAssetIds().equals(this.getAssetIds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoPlacement() == null) ? 0 : getAutoPlacement().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getInstanceFamily() == null) ? 0 : getInstanceFamily().hashCode()); hashCode = prime * hashCode + ((getQuantity() == null) ? 0 : getQuantity().hashCode()); hashCode = prime * hashCode + ((getTagSpecifications() == null) ? 0 : getTagSpecifications().hashCode()); hashCode = prime * hashCode + ((getHostRecovery() == null) ? 0 : getHostRecovery().hashCode()); hashCode = prime * hashCode + ((getOutpostArn() == null) ? 0 : getOutpostArn().hashCode()); hashCode = prime * hashCode + ((getHostMaintenance() == null) ? 0 : getHostMaintenance().hashCode()); hashCode = prime * hashCode + ((getAssetIds() == null) ? 0 : getAssetIds().hashCode()); return hashCode; } @Override public AllocateHostsRequest clone() { return (AllocateHostsRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy