/* * Copyright 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. */ /* * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.EC2.Model { /// /// Container for the parameters to the ModifyInstancePlacement operation. /// Modifies the placement attributes for a specified instance. You can do the following: /// /// /// /// At least one attribute for affinity, host ID, tenancy, or placement group name must /// be specified in the request. Affinity and tenancy can be modified in the same request. /// /// /// /// To modify the host ID, tenancy, placement group, or partition for an instance, the /// instance must be in the stopped state. /// /// public partial class ModifyInstancePlacementRequest : AmazonEC2Request { private Affinity _affinity; private string _groupId; private string _groupName; private string _hostId; private string _hostResourceGroupArn; private string _instanceId; private int? _partitionNumber; private HostTenancy _tenancy; /// /// Gets and sets the property Affinity. /// /// The affinity setting for the instance. /// /// public Affinity Affinity { get { return this._affinity; } set { this._affinity = value; } } // Check to see if Affinity property is set internal bool IsSetAffinity() { return this._affinity != null; } /// /// Gets and sets the property 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 string GroupId { get { return this._groupId; } set { this._groupId = value; } } // Check to see if GroupId property is set internal bool IsSetGroupId() { return this._groupId != null; } /// /// Gets and sets the property 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 (""). /// /// public string GroupName { get { return this._groupName; } set { this._groupName = value; } } // Check to see if GroupName property is set internal bool IsSetGroupName() { return this._groupName != null; } /// /// Gets and sets the property HostId. /// /// The ID of the Dedicated Host with which to associate the instance. /// /// public string HostId { get { return this._hostId; } set { this._hostId = value; } } // Check to see if HostId property is set internal bool IsSetHostId() { return this._hostId != null; } /// /// Gets and sets the property 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. /// /// public string HostResourceGroupArn { get { return this._hostResourceGroupArn; } set { this._hostResourceGroupArn = value; } } // Check to see if HostResourceGroupArn property is set internal bool IsSetHostResourceGroupArn() { return this._hostResourceGroupArn != null; } /// /// Gets and sets the property InstanceId. /// /// The ID of the instance that you are modifying. /// /// [AWSProperty(Required=true)] public string InstanceId { get { return this._instanceId; } set { this._instanceId = value; } } // Check to see if InstanceId property is set internal bool IsSetInstanceId() { return this._instanceId != null; } /// /// Gets and sets the property PartitionNumber. /// /// The number of the partition in which to place the instance. Valid only if the placement /// group strategy is set to partition. /// /// public int PartitionNumber { get { return this._partitionNumber.GetValueOrDefault(); } set { this._partitionNumber = value; } } // Check to see if PartitionNumber property is set internal bool IsSetPartitionNumber() { return this._partitionNumber.HasValue; } /// /// Gets and sets the property Tenancy. /// /// 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. /// /// /// public HostTenancy Tenancy { get { return this._tenancy; } set { this._tenancy = value; } } // Check to see if Tenancy property is set internal bool IsSetTenancy() { return this._tenancy != null; } } }