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 GetConsoleOutput operation. Gets the console output for the specified instance. For Linux instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. For Windows instances, the instance console output includes the last three system event log errors.

By default, the console output returns buffered information that was posted shortly after an instance transition state (start, stop, reboot, or terminate). This information is available for at least one hour after the most recent post. Only the most recent 64 KB of console output is available.

You can optionally retrieve the latest serial console output at any time during the instance lifecycle. This option is supported on instance types that use the Nitro hypervisor.

For more information, see Instance console output in the Amazon EC2 User Guide.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.EC2.AmazonEC2Request
      Amazon.EC2.Model.GetConsoleOutputRequest

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

Syntax

C#
public class GetConsoleOutputRequest : AmazonEC2Request
         IAmazonWebServiceRequest

The GetConsoleOutputRequest type exposes the following members

Constructors

NameDescription
Public Method GetConsoleOutputRequest()

Empty constructor used to set properties independently even when a simple constructor is available

Public Method GetConsoleOutputRequest(string)

Instantiates GetConsoleOutputRequest with the parameterized properties

Properties

NameTypeDescription
Public Property InstanceId System.String

Gets and sets the property InstanceId.

The ID of the instance.

Public Property Latest System.Boolean

Gets and sets the property Latest.

When enabled, retrieves the latest console output for the instance.

Default: disabled (false)

Examples

This example gets the console output for the specified instance.

To get the console output


var client = new AmazonEC2Client();
var response = client.GetConsoleOutput(new GetConsoleOutputRequest 
{
    InstanceId = "i-1234567890abcdef0"
});

string instanceId = response.InstanceId;
string output = response.Output;
DateTime timestamp = response.Timestamp;

            

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