/*
* 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
{
///
/// Describes the placement of an instance.
///
public partial class Placement
{
private string _affinity;
private string _availabilityZone;
private string _groupId;
private string _groupName;
private string _hostId;
private string _hostResourceGroupArn;
private int? _partitionNumber;
private string _spreadDomain;
private Tenancy _tenancy;
///
/// Empty constructor used to set properties independently even when a simple constructor is available
///
public Placement() { }
///
/// Instantiates Placement with the parameterized properties
///
/// The Availability Zone of the instance. If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region. This parameter is not supported for CreateFleet.
public Placement(string availabilityZone)
{
_availabilityZone = availabilityZone;
}
///
/// Gets and sets the property Affinity.
///
/// The affinity setting for the instance on the Dedicated Host.
///
///
///
/// This parameter is not supported for CreateFleet
/// or ImportInstance.
///
///
public string 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 AvailabilityZone.
///
/// The Availability Zone of the instance.
///
///
///
/// If not specified, an Availability Zone will be automatically chosen for you based
/// on the load balancing criteria for the Region.
///
///
///
/// This parameter is not supported for CreateFleet.
///
///
public string AvailabilityZone
{
get { return this._availabilityZone; }
set { this._availabilityZone = value; }
}
// Check to see if AvailabilityZone property is set
internal bool IsSetAvailabilityZone()
{
return this._availabilityZone != null;
}
///
/// Gets and sets the property GroupId.
///
/// The ID of the placement group that the instance is in. If you specify GroupId
,
/// you can't specify GroupName
.
///
///
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 that the instance is in. If you specify GroupName
,
/// you can't specify GroupId
.
///
///
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 on which the instance resides.
///
///
///
/// This parameter is not supported for CreateFleet
/// or ImportInstance.
///
///
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 launch the instances.
///
///
///
/// If you specify this parameter, either omit the Tenancy parameter or set it
/// to host
.
///
///
///
/// This parameter is not supported for CreateFleet.
///
///
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 PartitionNumber.
///
/// The number of the partition that the instance is in. Valid only if the placement group
/// strategy is set to partition
.
///
///
///
/// This parameter is not supported for CreateFleet.
///
///
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 SpreadDomain.
///
/// Reserved for future use.
///
///
public string SpreadDomain
{
get { return this._spreadDomain; }
set { this._spreadDomain = value; }
}
// Check to see if SpreadDomain property is set
internal bool IsSetSpreadDomain()
{
return this._spreadDomain != null;
}
///
/// Gets and sets the property Tenancy.
///
/// The tenancy of the instance. An instance with a tenancy of dedicated
/// runs on single-tenant hardware.
///
///
///
/// This parameter is not supported for CreateFleet.
/// The host
tenancy is not supported for ImportInstance
/// or for T3 instances that are configured for the unlimited
CPU credit
/// option.
///
///
public Tenancy Tenancy
{
get { return this._tenancy; }
set { this._tenancy = value; }
}
// Check to see if Tenancy property is set
internal bool IsSetTenancy()
{
return this._tenancy != null;
}
}
}