/* * 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 autoscaling-2011-01-01.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.AutoScaling.Model { /// /// Describes an EC2 instance. /// public partial class Instance { private string _availabilityZone; private string _healthStatus; private string _instanceId; private string _instanceType; private string _launchConfigurationName; private LaunchTemplateSpecification _launchTemplate; private LifecycleState _lifecycleState; private bool? _protectedFromScaleIn; private string _weightedCapacity; /// /// Gets and sets the property AvailabilityZone. /// /// The Availability Zone in which the instance is running. /// /// [AWSProperty(Required=true, Min=1, Max=255)] 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 HealthStatus. /// /// The last reported health status of the instance. Healthy means that the /// instance is healthy and should remain in service. Unhealthy means that /// the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate and replace /// it. /// /// [AWSProperty(Required=true, Min=1, Max=32)] public string HealthStatus { get { return this._healthStatus; } set { this._healthStatus = value; } } // Check to see if HealthStatus property is set internal bool IsSetHealthStatus() { return this._healthStatus != null; } /// /// Gets and sets the property InstanceId. /// /// The ID of the instance. /// /// [AWSProperty(Required=true, Min=1, Max=19)] 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 InstanceType. /// /// The instance type of the EC2 instance. /// /// [AWSProperty(Min=1, Max=255)] 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 LaunchConfigurationName. /// /// The launch configuration associated with the instance. /// /// [AWSProperty(Min=1, Max=255)] public string LaunchConfigurationName { get { return this._launchConfigurationName; } set { this._launchConfigurationName = value; } } // Check to see if LaunchConfigurationName property is set internal bool IsSetLaunchConfigurationName() { return this._launchConfigurationName != null; } /// /// Gets and sets the property LaunchTemplate. /// /// The launch template for the instance. /// /// public LaunchTemplateSpecification LaunchTemplate { get { return this._launchTemplate; } set { this._launchTemplate = value; } } // Check to see if LaunchTemplate property is set internal bool IsSetLaunchTemplate() { return this._launchTemplate != null; } /// /// Gets and sets the property LifecycleState. /// /// A description of the current lifecycle state. The Quarantined state is /// not used. For information about lifecycle states, see Instance /// lifecycle in the Amazon EC2 Auto Scaling User Guide. /// /// [AWSProperty(Required=true)] public LifecycleState LifecycleState { get { return this._lifecycleState; } set { this._lifecycleState = value; } } // Check to see if LifecycleState property is set internal bool IsSetLifecycleState() { return this._lifecycleState != null; } /// /// Gets and sets the property ProtectedFromScaleIn. /// /// Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling /// when scaling in. /// /// [AWSProperty(Required=true)] public bool ProtectedFromScaleIn { get { return this._protectedFromScaleIn.GetValueOrDefault(); } set { this._protectedFromScaleIn = value; } } // Check to see if ProtectedFromScaleIn property is set internal bool IsSetProtectedFromScaleIn() { return this._protectedFromScaleIn.HasValue; } /// /// Gets and sets the property WeightedCapacity. /// /// The number of capacity units contributed by the instance based on its instance type. /// /// /// /// Valid Range: Minimum value of 1. Maximum value of 999. /// /// [AWSProperty(Min=1, Max=32)] public string WeightedCapacity { get { return this._weightedCapacity; } set { this._weightedCapacity = value; } } // Check to see if WeightedCapacity property is set internal bool IsSetWeightedCapacity() { return this._weightedCapacity != null; } } }