/* * 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 CreatePlacementGroup operation. /// Creates a placement group in which to launch instances. The strategy of the placement /// group determines how the instances are organized within the group. /// /// /// /// A cluster placement group is a logical grouping of instances within a /// single Availability Zone that benefit from low network latency, high network throughput. /// A spread placement group places instances on distinct hardware. A partition /// placement group places groups of instances in different partitions, where instances /// in one partition do not share the same hardware with instances in another partition. /// /// /// /// For more information, see Placement /// groups in the Amazon EC2 User Guide. /// /// public partial class CreatePlacementGroupRequest : AmazonEC2Request { private string _groupName; private int? _partitionCount; private SpreadLevel _spreadLevel; private PlacementStrategy _strategy; private List _tagSpecifications = new List(); /// /// Empty constructor used to set properties independently even when a simple constructor is available /// public CreatePlacementGroupRequest() { } /// /// Instantiates CreatePlacementGroupRequest with the parameterized properties /// /// A name for the placement group. Must be unique within the scope of your account for the Region. Constraints: Up to 255 ASCII characters /// The placement strategy. public CreatePlacementGroupRequest(string groupName, PlacementStrategy strategy) { _groupName = groupName; _strategy = strategy; } /// /// Gets and sets the property GroupName. /// /// A name for the placement group. Must be unique within the scope of your account for /// the Region. /// /// /// /// Constraints: Up to 255 ASCII characters /// /// 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 PartitionCount. /// /// The number of partitions. Valid only when Strategy is set to partition. /// /// public int PartitionCount { get { return this._partitionCount.GetValueOrDefault(); } set { this._partitionCount = value; } } // Check to see if PartitionCount property is set internal bool IsSetPartitionCount() { return this._partitionCount.HasValue; } /// /// Gets and sets the property SpreadLevel. /// /// Determines how placement groups spread instances. /// ///
  • /// /// Host – You can use host only with Outpost placement groups. /// ///
  • /// /// Rack – No usage restrictions. /// ///
///
public SpreadLevel SpreadLevel { get { return this._spreadLevel; } set { this._spreadLevel = value; } } // Check to see if SpreadLevel property is set internal bool IsSetSpreadLevel() { return this._spreadLevel != null; } /// /// Gets and sets the property Strategy. /// /// The placement strategy. /// /// public PlacementStrategy Strategy { get { return this._strategy; } set { this._strategy = value; } } // Check to see if Strategy property is set internal bool IsSetStrategy() { return this._strategy != null; } /// /// Gets and sets the property TagSpecifications. /// /// The tags to apply to the new placement group. /// /// public List TagSpecifications { get { return this._tagSpecifications; } set { this._tagSpecifications = value; } } // Check to see if TagSpecifications property is set internal bool IsSetTagSpecifications() { return this._tagSpecifications != null && this._tagSpecifications.Count > 0; } } }