/* * Copyright 2018-2023 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. */ package com.amazonaws.services.simplesystemsmanagement.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* An invocation is a copy of a command sent to a specific managed node. A command can apply to one or more managed * nodes. A command invocation applies to one managed node. For example, if a user runs SendCommand against * three managed nodes, then a command invocation is created for each requested managed node ID. A command invocation * returns status and detail information about a command you ran. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CommandInvocation implements Serializable, Cloneable, StructuredPojo { /** *

* The command against which this invocation was requested. *

*/ private String commandId; /** *

* The managed node ID in which this invocation was requested. *

*/ private String instanceId; /** *

* The fully qualified host name of the managed node. *

*/ private String instanceName; /** *

* User-specified information about the command, such as a brief description of what the command should do. *

*/ private String comment; /** *

* The document name that was requested for execution. *

*/ private String documentName; /** *

* The Systems Manager document (SSM document) version. *

*/ private String documentVersion; /** *

* The time and date the request was sent to this managed node. *

*/ private java.util.Date requestedDateTime; /** *

* Whether or not the invocation succeeded, failed, or is pending. *

*/ private String status; /** *

* A detailed status of the command execution for each invocation (each managed node targeted by the command). * StatusDetails includes more information than Status because it includes states resulting from error and * concurrency control parameters. StatusDetails can show different results than Status. For more information about * these statuses, see Understanding command * statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the * following values: *

* */ private String statusDetails; /** *

* Gets the trace output sent by the agent. *

*/ private String traceOutput; /** *

* The URL to the plugin's StdOut file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined * for the parent command. For an invocation, StandardOutputUrl is populated if there is just one * plugin defined for the command, and the S3 bucket was defined for the command. *

*/ private String standardOutputUrl; /** *

* The URL to the plugin's StdErr file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined * for the parent command. For an invocation, StandardErrorUrl is populated if there is just one plugin * defined for the command, and the S3 bucket was defined for the command. *

*/ private String standardErrorUrl; /** *

* Plugins processed by the command. *

*/ private com.amazonaws.internal.SdkInternalList commandPlugins; /** *

* The Identity and Access Management (IAM) service role that Run Command, a capability of Amazon Web Services * Systems Manager, uses to act on your behalf when sending notifications about command status changes on a per * managed node basis. *

*/ private String serviceRole; /** *

* Configurations for sending notifications about command status changes on a per managed node basis. *

*/ private NotificationConfig notificationConfig; /** *

* Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output. *

*/ private CloudWatchOutputConfig cloudWatchOutputConfig; /** *

* The command against which this invocation was requested. *

* * @param commandId * The command against which this invocation was requested. */ public void setCommandId(String commandId) { this.commandId = commandId; } /** *

* The command against which this invocation was requested. *

* * @return The command against which this invocation was requested. */ public String getCommandId() { return this.commandId; } /** *

* The command against which this invocation was requested. *

* * @param commandId * The command against which this invocation was requested. * @return Returns a reference to this object so that method calls can be chained together. */ public CommandInvocation withCommandId(String commandId) { setCommandId(commandId); return this; } /** *

* The managed node ID in which this invocation was requested. *

* * @param instanceId * The managed node ID in which this invocation was requested. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** *

* The managed node ID in which this invocation was requested. *

* * @return The managed node ID in which this invocation was requested. */ public String getInstanceId() { return this.instanceId; } /** *

* The managed node ID in which this invocation was requested. *

* * @param instanceId * The managed node ID in which this invocation was requested. * @return Returns a reference to this object so that method calls can be chained together. */ public CommandInvocation withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** *

* The fully qualified host name of the managed node. *

* * @param instanceName * The fully qualified host name of the managed node. */ public void setInstanceName(String instanceName) { this.instanceName = instanceName; } /** *

* The fully qualified host name of the managed node. *

* * @return The fully qualified host name of the managed node. */ public String getInstanceName() { return this.instanceName; } /** *

* The fully qualified host name of the managed node. *

* * @param instanceName * The fully qualified host name of the managed node. * @return Returns a reference to this object so that method calls can be chained together. */ public CommandInvocation withInstanceName(String instanceName) { setInstanceName(instanceName); return this; } /** *

* User-specified information about the command, such as a brief description of what the command should do. *

* * @param comment * User-specified information about the command, such as a brief description of what the command should do. */ public void setComment(String comment) { this.comment = comment; } /** *

* User-specified information about the command, such as a brief description of what the command should do. *

* * @return User-specified information about the command, such as a brief description of what the command should do. */ public String getComment() { return this.comment; } /** *

* User-specified information about the command, such as a brief description of what the command should do. *

* * @param comment * User-specified information about the command, such as a brief description of what the command should do. * @return Returns a reference to this object so that method calls can be chained together. */ public CommandInvocation withComment(String comment) { setComment(comment); return this; } /** *

* The document name that was requested for execution. *

* * @param documentName * The document name that was requested for execution. */ public void setDocumentName(String documentName) { this.documentName = documentName; } /** *

* The document name that was requested for execution. *

* * @return The document name that was requested for execution. */ public String getDocumentName() { return this.documentName; } /** *

* The document name that was requested for execution. *

* * @param documentName * The document name that was requested for execution. * @return Returns a reference to this object so that method calls can be chained together. */ public CommandInvocation withDocumentName(String documentName) { setDocumentName(documentName); return this; } /** *

* The Systems Manager document (SSM document) version. *

* * @param documentVersion * The Systems Manager document (SSM document) version. */ public void setDocumentVersion(String documentVersion) { this.documentVersion = documentVersion; } /** *

* The Systems Manager document (SSM document) version. *

* * @return The Systems Manager document (SSM document) version. */ public String getDocumentVersion() { return this.documentVersion; } /** *

* The Systems Manager document (SSM document) version. *

* * @param documentVersion * The Systems Manager document (SSM document) version. * @return Returns a reference to this object so that method calls can be chained together. */ public CommandInvocation withDocumentVersion(String documentVersion) { setDocumentVersion(documentVersion); return this; } /** *

* The time and date the request was sent to this managed node. *

* * @param requestedDateTime * The time and date the request was sent to this managed node. */ public void setRequestedDateTime(java.util.Date requestedDateTime) { this.requestedDateTime = requestedDateTime; } /** *

* The time and date the request was sent to this managed node. *

* * @return The time and date the request was sent to this managed node. */ public java.util.Date getRequestedDateTime() { return this.requestedDateTime; } /** *

* The time and date the request was sent to this managed node. *

* * @param requestedDateTime * The time and date the request was sent to this managed node. * @return Returns a reference to this object so that method calls can be chained together. */ public CommandInvocation withRequestedDateTime(java.util.Date requestedDateTime) { setRequestedDateTime(requestedDateTime); return this; } /** *

* Whether or not the invocation succeeded, failed, or is pending. *

* * @param status * Whether or not the invocation succeeded, failed, or is pending. * @see CommandInvocationStatus */ public void setStatus(String status) { this.status = status; } /** *

* Whether or not the invocation succeeded, failed, or is pending. *

* * @return Whether or not the invocation succeeded, failed, or is pending. * @see CommandInvocationStatus */ public String getStatus() { return this.status; } /** *

* Whether or not the invocation succeeded, failed, or is pending. *

* * @param status * Whether or not the invocation succeeded, failed, or is pending. * @return Returns a reference to this object so that method calls can be chained together. * @see CommandInvocationStatus */ public CommandInvocation withStatus(String status) { setStatus(status); return this; } /** *

* Whether or not the invocation succeeded, failed, or is pending. *

* * @param status * Whether or not the invocation succeeded, failed, or is pending. * @see CommandInvocationStatus */ public void setStatus(CommandInvocationStatus status) { withStatus(status); } /** *

* Whether or not the invocation succeeded, failed, or is pending. *

* * @param status * Whether or not the invocation succeeded, failed, or is pending. * @return Returns a reference to this object so that method calls can be chained together. * @see CommandInvocationStatus */ public CommandInvocation withStatus(CommandInvocationStatus status) { this.status = status.toString(); return this; } /** *

* A detailed status of the command execution for each invocation (each managed node targeted by the command). * StatusDetails includes more information than Status because it includes states resulting from error and * concurrency control parameters. StatusDetails can show different results than Status. For more information about * these statuses, see Understanding command * statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the * following values: *

* * * @param statusDetails * A detailed status of the command execution for each invocation (each managed node targeted by the * command). StatusDetails includes more information than Status because it includes states resulting from * error and concurrency control parameters. StatusDetails can show different results than Status. For more * information about these statuses, see Understanding * command statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be * one of the following values:

*