/* * 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 elasticmapreduce-2009-03-31.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.ElasticMapReduce.Model { /// /// Configuration defining a new instance group. /// public partial class InstanceGroupConfig { private AutoScalingPolicy _autoScalingPolicy; private string _bidPrice; private List _configurations = new List(); private string _customAmiId; private EbsConfiguration _ebsConfiguration; private int? _instanceCount; private InstanceRoleType _instanceRole; private string _instanceType; private MarketType _market; private string _name; /// /// Empty constructor used to set properties independently even when a simple constructor is available /// public InstanceGroupConfig() { } /// /// Instantiates InstanceGroupConfig with the parameterized properties /// /// The role of the instance group in the cluster. /// The Amazon EC2 instance type for all instances in the instance group. /// Target number of instances for the instance group. public InstanceGroupConfig(InstanceRoleType instanceRole, string instanceType, int instanceCount) { _instanceRole = instanceRole; _instanceType = instanceType; _instanceCount = instanceCount; } /// /// Gets and sets the property AutoScalingPolicy. /// /// An automatic scaling policy for a core instance group or task instance group in an /// Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically /// adds and terminates Amazon EC2 instances in response to the value of a CloudWatch /// metric. See PutAutoScalingPolicy. /// /// public AutoScalingPolicy AutoScalingPolicy { get { return this._autoScalingPolicy; } set { this._autoScalingPolicy = value; } } // Check to see if AutoScalingPolicy property is set internal bool IsSetAutoScalingPolicy() { return this._autoScalingPolicy != null; } /// /// Gets and sets the property BidPrice. /// /// If specified, indicates that the instance group uses Spot Instances. This is the maximum /// price you are willing to pay for Spot Instances. Specify OnDemandPrice /// to set the amount equal to the On-Demand price, or specify an amount in USD. /// /// [AWSProperty(Min=0, Max=256)] public string BidPrice { get { return this._bidPrice; } set { this._bidPrice = value; } } // Check to see if BidPrice property is set internal bool IsSetBidPrice() { return this._bidPrice != null; } /// /// Gets and sets the property Configurations. /// /// Amazon EMR releases 4.x or later. /// /// /// /// The list of configurations supplied for an Amazon EMR cluster instance group. You /// can specify a separate configuration for each instance group (master, core, and task). /// /// public List Configurations { get { return this._configurations; } set { this._configurations = value; } } // Check to see if Configurations property is set internal bool IsSetConfigurations() { return this._configurations != null && this._configurations.Count > 0; } /// /// Gets and sets the property CustomAmiId. /// /// The custom AMI ID to use for the provisioned instance group. /// /// [AWSProperty(Min=0, Max=256)] public string CustomAmiId { get { return this._customAmiId; } set { this._customAmiId = value; } } // Check to see if CustomAmiId property is set internal bool IsSetCustomAmiId() { return this._customAmiId != null; } /// /// Gets and sets the property EbsConfiguration. /// /// EBS configurations that will be attached to each Amazon EC2 instance in the instance /// group. /// /// public EbsConfiguration EbsConfiguration { get { return this._ebsConfiguration; } set { this._ebsConfiguration = value; } } // Check to see if EbsConfiguration property is set internal bool IsSetEbsConfiguration() { return this._ebsConfiguration != null; } /// /// Gets and sets the property InstanceCount. /// /// Target number of instances for the instance group. /// /// [AWSProperty(Required=true)] public int InstanceCount { get { return this._instanceCount.GetValueOrDefault(); } set { this._instanceCount = value; } } // Check to see if InstanceCount property is set internal bool IsSetInstanceCount() { return this._instanceCount.HasValue; } /// /// Gets and sets the property InstanceRole. /// /// The role of the instance group in the cluster. /// /// [AWSProperty(Required=true)] public InstanceRoleType InstanceRole { get { return this._instanceRole; } set { this._instanceRole = value; } } // Check to see if InstanceRole property is set internal bool IsSetInstanceRole() { return this._instanceRole != null; } /// /// Gets and sets the property InstanceType. /// /// The Amazon EC2 instance type for all instances in the instance group. /// /// [AWSProperty(Required=true, Min=1, Max=256)] public string InstanceType { get { return this._instanceType; } set { this._instanceType = value; } } // Check to see if InstanceType property is set internal bool IsSetInstanceType() { return this._instanceType != null; } /// /// Gets and sets the property Market. /// /// Market type of the Amazon EC2 instances used to create a cluster node. /// /// public MarketType Market { get { return this._market; } set { this._market = value; } } // Check to see if Market property is set internal bool IsSetMarket() { return this._market != null; } /// /// Gets and sets the property Name. /// /// Friendly name given to the instance group. /// /// [AWSProperty(Min=0, Max=256)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } } }