AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the SetInstanceHealth operation. Sets the health status of the specified instance.
For more information, see Set up a custom health check for your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
Namespace: Amazon.AutoScaling.Model
Assembly: AWSSDK.AutoScaling.dll
Version: 3.x.y.z
public class SetInstanceHealthRequest : AmazonAutoScalingRequest IAmazonWebServiceRequest
The SetInstanceHealthRequest type exposes the following members
Name | Description | |
---|---|---|
SetInstanceHealthRequest() |
Name | Type | Description | |
---|---|---|---|
HealthStatus | System.String |
Gets and sets the property HealthStatus.
The health status of the instance. Set to |
|
InstanceId | System.String |
Gets and sets the property InstanceId. The ID of the instance. |
|
ShouldRespectGracePeriod | System.Boolean |
Gets and sets the property ShouldRespectGracePeriod.
If the Auto Scaling group of the specified instance has a For more information about the health check grace period, see Set the health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide. |
This example sets the health status of the specified instance to Unhealthy.
var client = new AmazonAutoScalingClient(); var response = client.SetInstanceHealth(new SetInstanceHealthRequest { HealthStatus = "Unhealthy", InstanceId = "i-93633f9b" });
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5