Tabnine Logo
GetConsoleOutputRequest
Code IndexAdd Tabnine to your IDE (free)

How to use
GetConsoleOutputRequest
in
com.amazonaws.services.ec2.model

Best Java code snippets using com.amazonaws.services.ec2.model.GetConsoleOutputRequest (Showing top 20 results out of 315)

origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
  hashCode = prime * hashCode + ((getLatest() == null) ? 0 : getLatest().hashCode());
  return hashCode;
}
origin: aws/aws-sdk-java

/**
 * Constructs a new GetConsoleOutputRequest object. Callers should use the setter or fluent setter (with...) methods
 * to initialize any additional object members.
 * 
 * @param instanceId
 *        The ID of the instance.
 */
public GetConsoleOutputRequest(String instanceId) {
  setInstanceId(instanceId);
}
origin: aws/aws-sdk-java

/**
 * <p>
 * When enabled, retrieves the latest console output for the instance.
 * </p>
 * <p>
 * Default: disabled (<code>false</code>)
 * </p>
 * 
 * @param latest
 *        When enabled, retrieves the latest console output for the instance.</p>
 *        <p>
 *        Default: disabled (<code>false</code>)
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public GetConsoleOutputRequest withLatest(Boolean latest) {
  setLatest(latest);
  return this;
}
origin: com.amazonaws.resources/aws-resources-ec2

@Override
public GetConsoleOutputResult consoleOutput(
    ResultCapture<GetConsoleOutputResult> extractor) {
  GetConsoleOutputRequest request = new GetConsoleOutputRequest();
  return consoleOutput(request, extractor);
}
origin: aws-amplify/aws-sdk-android

@Override
public boolean equals(Object obj) {
  if (this == obj) return true;
  if (obj == null) return false;
  if (obj instanceof GetConsoleOutputRequest == false) return false;
  GetConsoleOutputRequest other = (GetConsoleOutputRequest)obj;
  
  if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false;
  if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; 
  return true;
}

origin: amazon-archives/aws-sdk-java-resources

@Override
public GetConsoleOutputResult consoleOutput(
    ResultCapture<GetConsoleOutputResult> extractor) {
  GetConsoleOutputRequest request = new GetConsoleOutputRequest();
  return consoleOutput(request, extractor);
}
origin: aws-amplify/aws-sdk-android

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  
  hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); 
  return hashCode;
}

origin: aws/aws-sdk-java

@Override
public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (obj instanceof GetConsoleOutputRequest == false)
    return false;
  GetConsoleOutputRequest other = (GetConsoleOutputRequest) obj;
  if (other.getInstanceId() == null ^ this.getInstanceId() == null)
    return false;
  if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false)
    return false;
  if (other.getLatest() == null ^ this.getLatest() == null)
    return false;
  if (other.getLatest() != null && other.getLatest().equals(this.getLatest()) == false)
    return false;
  return true;
}
origin: jenkinsci/ec2-plugin

/**
 * Gets the EC2 console output.
 */
public String getConsoleOutput() throws AmazonClientException {
  AmazonEC2 ec2 = getCloud().connect();
  GetConsoleOutputRequest request = new GetConsoleOutputRequest(getInstanceId());
  return ec2.getConsoleOutput(request).getOutput();
}
origin: aws/aws-sdk-java

/**
 * <p>
 * The ID of the instance.
 * </p>
 * 
 * @param instanceId
 *        The ID of the instance.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public GetConsoleOutputRequest withInstanceId(String instanceId) {
  setInstanceId(instanceId);
  return this;
}
origin: aws-amplify/aws-sdk-android

/**
 * Returns a string representation of this object; useful for testing and
 * debugging.
 *
 * @return A string representation of this object.
 *
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append("{");
  if (getInstanceId() != null) sb.append("InstanceId: " + getInstanceId() );
  sb.append("}");
  return sb.toString();
}

origin: com.amazonaws/aws-java-sdk-ec2

/**
 * <p>
 * When enabled, retrieves the latest console output for the instance.
 * </p>
 * <p>
 * Default: disabled (<code>false</code>)
 * </p>
 * 
 * @param latest
 *        When enabled, retrieves the latest console output for the instance.</p>
 *        <p>
 *        Default: disabled (<code>false</code>)
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public GetConsoleOutputRequest withLatest(Boolean latest) {
  setLatest(latest);
  return this;
}
origin: aws/aws-sdk-java

/**
 * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
 * redacted from this string using a placeholder value.
 *
 * @return A string representation of this object.
 *
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append("{");
  if (getInstanceId() != null)
    sb.append("InstanceId: ").append(getInstanceId()).append(",");
  if (getLatest() != null)
    sb.append("Latest: ").append(getLatest());
  sb.append("}");
  return sb.toString();
}
origin: org.jenkins-ci.plugins/ec2

/**
 * Gets the EC2 console output.
 */
public String getConsoleOutput() throws AmazonClientException {
  AmazonEC2 ec2 = getCloud().connect();
  GetConsoleOutputRequest request = new GetConsoleOutputRequest(getInstanceId());
  return ec2.getConsoleOutput(request).getOutput();
}
origin: aws-amplify/aws-sdk-android

/**
 * Constructs a new GetConsoleOutputRequest object.
 * Callers should use the setter or fluent setter (with...) methods to
 * initialize any additional object members.
 * 
 * @param instanceId The ID of the instance.
 */
public GetConsoleOutputRequest(String instanceId) {
  setInstanceId(instanceId);
}
origin: aws-amplify/aws-sdk-android

  public Request<GetConsoleOutputRequest> marshall(GetConsoleOutputRequest getConsoleOutputRequest) {

    if (getConsoleOutputRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<GetConsoleOutputRequest> request = new DefaultRequest<GetConsoleOutputRequest>(getConsoleOutputRequest, "AmazonEC2");
    request.addParameter("Action", "GetConsoleOutput");
    request.addParameter("Version", "2015-10-01");

    if (getConsoleOutputRequest.getInstanceId() != null) {
      request.addParameter("InstanceId", StringUtils.fromString(getConsoleOutputRequest.getInstanceId()));
    }

    return request;
  }
}
origin: aws/aws-sdk-java

public Request<GetConsoleOutputRequest> marshall(GetConsoleOutputRequest getConsoleOutputRequest) {
  if (getConsoleOutputRequest == null) {
    throw new SdkClientException("Invalid argument passed to marshall(...)");
  }
  Request<GetConsoleOutputRequest> request = new DefaultRequest<GetConsoleOutputRequest>(getConsoleOutputRequest, "AmazonEC2");
  request.addParameter("Action", "GetConsoleOutput");
  request.addParameter("Version", "2016-11-15");
  request.setHttpMethod(HttpMethodName.POST);
  if (getConsoleOutputRequest.getInstanceId() != null) {
    request.addParameter("InstanceId", StringUtils.fromString(getConsoleOutputRequest.getInstanceId()));
  }
  if (getConsoleOutputRequest.getLatest() != null) {
    request.addParameter("Latest", StringUtils.fromBoolean(getConsoleOutputRequest.getLatest()));
  }
  return request;
}
origin: com.atlassian.buildeng/ecs-scheduler

public static void logEC2InstanceOutputToCloudwatch(String t, ECSConfiguration configuration) {
  AwsLogs.Driver driver = AwsLogs.getAwsLogsDriver(configuration);
  if (driver != null && driver.getRegion() != null && driver.getLogGroupName() != null) {
    try {
      AmazonEC2 client = AmazonEC2ClientBuilder.defaultClient();
      GetConsoleOutputResult result = client.getConsoleOutput(new GetConsoleOutputRequest(t));
      AWSLogsClient logs = new AWSLogsClient().withRegion(Regions.fromName(driver.getRegion()));
      // t (ec2 instance id) should be unique within reason
      final String logStreamName = "pbc-ec2-instance-stale/" + t;
      logs.createLogStream(new CreateLogStreamRequest(driver.getLogGroupName(), logStreamName));
      logs.putLogEvents(new PutLogEventsRequest().withLogGroupName(driver.getLogGroupName()).withLogStreamName(logStreamName).withLogEvents(new InputLogEvent().withMessage(result.getDecodedOutput()).withTimestamp(System.currentTimeMillis())));
    } catch (Exception th) {
      //we are fine swallowing any errors, has no direct influence on proper function.
      logger.error("failed to retrieve ec2 instance logs or send them to cloudwatch", th);
    }
  }
}
origin: com.amazonaws/aws-java-sdk-ec2

/**
 * Constructs a new GetConsoleOutputRequest object. Callers should use the setter or fluent setter (with...) methods
 * to initialize any additional object members.
 * 
 * @param instanceId
 *        The ID of the instance.
 */
public GetConsoleOutputRequest(String instanceId) {
  setInstanceId(instanceId);
}
origin: com.amazonaws/aws-java-sdk-ec2

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
  hashCode = prime * hashCode + ((getLatest() == null) ? 0 : getLatest().hashCode());
  return hashCode;
}
com.amazonaws.services.ec2.modelGetConsoleOutputRequest

Javadoc

Container for the parameters to the com.amazonaws.services.ec2.AmazonEC2#getConsoleOutput(GetConsoleOutputRequest).

Gets the console output for the specified instance.

Instances do not have a physical monitor through which you can view their console output. They also lack physical controls that allow you to power up, reboot, or shut them down. To allow these actions, we provide them through the Amazon EC2 API and command line interface.

Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which is available for at least one hour after the most recent post.

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. This output is buffered because the instance produces it and then posts it to a store where the instance's owner can retrieve it.

For Windows instances, the instance console output includes output from the EC2Config service.

Most used methods

  • <init>
    Constructs a new GetConsoleOutputRequest object. Callers should use the setter or fluent setter (wit
  • getInstanceId
    The ID of the instance.
  • setInstanceId
    The ID of the instance.
  • getLatest
    When enabled, retrieves the latest console output for the instance. Default: disabled (false)
  • setLatest
    When enabled, retrieves the latest console output for the instance. Default: disabled (false)

Popular in Java

  • Updating database using SQL prepared statement
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • compareTo (BigDecimal)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now