AWS SDK Version 3 for .NET
API Reference

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 CancelInstanceRefresh operation. Cancels an instance refresh or rollback that is in progress. If an instance refresh or rollback is not in progress, an ActiveInstanceRefreshNotFound error occurs.

This operation is part of the instance refresh feature in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group after you make configuration changes.

When you cancel an instance refresh, this does not roll back any changes that it made. Use the RollbackInstanceRefresh API to roll back instead.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.AutoScaling.AmazonAutoScalingRequest
      Amazon.AutoScaling.Model.CancelInstanceRefreshRequest

Namespace: Amazon.AutoScaling.Model
Assembly: AWSSDK.AutoScaling.dll
Version: 3.x.y.z

Syntax

C#
public class CancelInstanceRefreshRequest : AmazonAutoScalingRequest
         IAmazonWebServiceRequest

The CancelInstanceRefreshRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property AutoScalingGroupName System.String

Gets and sets the property AutoScalingGroupName.

The name of the Auto Scaling group.

Examples

This example cancels an instance refresh operation in progress.

To cancel an instance refresh


var client = new AmazonAutoScalingClient();
var response = client.CancelInstanceRefresh(new CancelInstanceRefreshRequest 
{
    AutoScalingGroupName = "my-auto-scaling-group"
});

string instanceRefreshId = response.InstanceRefreshId;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5