/* * 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; /** *
* Detailed information about an the execution state of an Automation step. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StepExecution implements Serializable, Cloneable, StructuredPojo { /** ** The name of this execution step. *
*/ private String stepName; /** ** The action this step performs. The action determines the behavior of the step. *
*/ private String action; /** ** The timeout seconds of the step. *
*/ private Long timeoutSeconds; /** *
* The action to take if the step fails. The default value is Abort
.
*
* The maximum number of tries to run the action of the step. The default value is 1
.
*
* If a step has begun execution, this contains the time the step started. If the step is in Pending status, this * field isn't populated. *
*/ private java.util.Date executionStartTime; /** ** If a step has finished execution, this contains the time the execution ended. If the step hasn't yet concluded, * this field isn't populated. *
*/ private java.util.Date executionEndTime; /** ** The execution status for this step. *
*/ private String stepStatus; /** ** The response code returned by the execution of the step. *
*/ private String responseCode; /** ** Fully-resolved values passed into the step before execution. *
*/ private java.util.Map* Returned values from the execution of the step. *
*/ private java.util.Map* A message associated with the response code for an execution. *
*/ private String response; /** ** If a step failed, this message explains why the execution failed. *
*/ private String failureMessage; /** ** Information about the Automation failure. *
*/ private FailureDetails failureDetails; /** ** The unique ID of a step execution. *
*/ private String stepExecutionId; /** ** A user-specified list of parameters to override when running a step. *
*/ private java.util.Map* The flag which can be used to end automation no matter whether the step succeeds or fails. *
*/ private Boolean isEnd; /** ** The next step after the step succeeds. *
*/ private String nextStep; /** ** The flag which can be used to help decide whether the failure of current step leads to the Automation failure. *
*/ private Boolean isCritical; /** ** Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the step * fails. Continue will ignore the failure of current step and allow automation to run the next step. With * conditional branching, we add step:stepName to support the automation to go to another specific step. *
*/ private com.amazonaws.internal.SdkInternalList* The targets for the step execution. *
*/ private com.amazonaws.internal.SdkInternalList* The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current * Automation execution. *
*/ private TargetLocation targetLocation; /** ** The CloudWatch alarms that were invoked by the automation. *
*/ private com.amazonaws.internal.SdkInternalList* The name of this execution step. *
* * @param stepName * The name of this execution step. */ public void setStepName(String stepName) { this.stepName = stepName; } /** ** The name of this execution step. *
* * @return The name of this execution step. */ public String getStepName() { return this.stepName; } /** ** The name of this execution step. *
* * @param stepName * The name of this execution step. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withStepName(String stepName) { setStepName(stepName); return this; } /** ** The action this step performs. The action determines the behavior of the step. *
* * @param action * The action this step performs. The action determines the behavior of the step. */ public void setAction(String action) { this.action = action; } /** ** The action this step performs. The action determines the behavior of the step. *
* * @return The action this step performs. The action determines the behavior of the step. */ public String getAction() { return this.action; } /** ** The action this step performs. The action determines the behavior of the step. *
* * @param action * The action this step performs. The action determines the behavior of the step. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withAction(String action) { setAction(action); return this; } /** ** The timeout seconds of the step. *
* * @param timeoutSeconds * The timeout seconds of the step. */ public void setTimeoutSeconds(Long timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; } /** ** The timeout seconds of the step. *
* * @return The timeout seconds of the step. */ public Long getTimeoutSeconds() { return this.timeoutSeconds; } /** ** The timeout seconds of the step. *
* * @param timeoutSeconds * The timeout seconds of the step. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withTimeoutSeconds(Long timeoutSeconds) { setTimeoutSeconds(timeoutSeconds); return this; } /** *
* The action to take if the step fails. The default value is Abort
.
*
Abort
.
*/
public void setOnFailure(String onFailure) {
this.onFailure = onFailure;
}
/**
*
* The action to take if the step fails. The default value is Abort
.
*
Abort
.
*/
public String getOnFailure() {
return this.onFailure;
}
/**
*
* The action to take if the step fails. The default value is Abort
.
*
Abort
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StepExecution withOnFailure(String onFailure) {
setOnFailure(onFailure);
return this;
}
/**
*
* The maximum number of tries to run the action of the step. The default value is 1
.
*
1
.
*/
public void setMaxAttempts(Integer maxAttempts) {
this.maxAttempts = maxAttempts;
}
/**
*
* The maximum number of tries to run the action of the step. The default value is 1
.
*
1
.
*/
public Integer getMaxAttempts() {
return this.maxAttempts;
}
/**
*
* The maximum number of tries to run the action of the step. The default value is 1
.
*
1
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StepExecution withMaxAttempts(Integer maxAttempts) {
setMaxAttempts(maxAttempts);
return this;
}
/**
* * If a step has begun execution, this contains the time the step started. If the step is in Pending status, this * field isn't populated. *
* * @param executionStartTime * If a step has begun execution, this contains the time the step started. If the step is in Pending status, * this field isn't populated. */ public void setExecutionStartTime(java.util.Date executionStartTime) { this.executionStartTime = executionStartTime; } /** ** If a step has begun execution, this contains the time the step started. If the step is in Pending status, this * field isn't populated. *
* * @return If a step has begun execution, this contains the time the step started. If the step is in Pending status, * this field isn't populated. */ public java.util.Date getExecutionStartTime() { return this.executionStartTime; } /** ** If a step has begun execution, this contains the time the step started. If the step is in Pending status, this * field isn't populated. *
* * @param executionStartTime * If a step has begun execution, this contains the time the step started. If the step is in Pending status, * this field isn't populated. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withExecutionStartTime(java.util.Date executionStartTime) { setExecutionStartTime(executionStartTime); return this; } /** ** If a step has finished execution, this contains the time the execution ended. If the step hasn't yet concluded, * this field isn't populated. *
* * @param executionEndTime * If a step has finished execution, this contains the time the execution ended. If the step hasn't yet * concluded, this field isn't populated. */ public void setExecutionEndTime(java.util.Date executionEndTime) { this.executionEndTime = executionEndTime; } /** ** If a step has finished execution, this contains the time the execution ended. If the step hasn't yet concluded, * this field isn't populated. *
* * @return If a step has finished execution, this contains the time the execution ended. If the step hasn't yet * concluded, this field isn't populated. */ public java.util.Date getExecutionEndTime() { return this.executionEndTime; } /** ** If a step has finished execution, this contains the time the execution ended. If the step hasn't yet concluded, * this field isn't populated. *
* * @param executionEndTime * If a step has finished execution, this contains the time the execution ended. If the step hasn't yet * concluded, this field isn't populated. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withExecutionEndTime(java.util.Date executionEndTime) { setExecutionEndTime(executionEndTime); return this; } /** ** The execution status for this step. *
* * @param stepStatus * The execution status for this step. * @see AutomationExecutionStatus */ public void setStepStatus(String stepStatus) { this.stepStatus = stepStatus; } /** ** The execution status for this step. *
* * @return The execution status for this step. * @see AutomationExecutionStatus */ public String getStepStatus() { return this.stepStatus; } /** ** The execution status for this step. *
* * @param stepStatus * The execution status for this step. * @return Returns a reference to this object so that method calls can be chained together. * @see AutomationExecutionStatus */ public StepExecution withStepStatus(String stepStatus) { setStepStatus(stepStatus); return this; } /** ** The execution status for this step. *
* * @param stepStatus * The execution status for this step. * @see AutomationExecutionStatus */ public void setStepStatus(AutomationExecutionStatus stepStatus) { withStepStatus(stepStatus); } /** ** The execution status for this step. *
* * @param stepStatus * The execution status for this step. * @return Returns a reference to this object so that method calls can be chained together. * @see AutomationExecutionStatus */ public StepExecution withStepStatus(AutomationExecutionStatus stepStatus) { this.stepStatus = stepStatus.toString(); return this; } /** ** The response code returned by the execution of the step. *
* * @param responseCode * The response code returned by the execution of the step. */ public void setResponseCode(String responseCode) { this.responseCode = responseCode; } /** ** The response code returned by the execution of the step. *
* * @return The response code returned by the execution of the step. */ public String getResponseCode() { return this.responseCode; } /** ** The response code returned by the execution of the step. *
* * @param responseCode * The response code returned by the execution of the step. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withResponseCode(String responseCode) { setResponseCode(responseCode); return this; } /** ** Fully-resolved values passed into the step before execution. *
* * @return Fully-resolved values passed into the step before execution. */ public java.util.Map* Fully-resolved values passed into the step before execution. *
* * @param inputs * Fully-resolved values passed into the step before execution. */ public void setInputs(java.util.Map* Fully-resolved values passed into the step before execution. *
* * @param inputs * Fully-resolved values passed into the step before execution. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withInputs(java.util.Map* Returned values from the execution of the step. *
* * @return Returned values from the execution of the step. */ public java.util.Map* Returned values from the execution of the step. *
* * @param outputs * Returned values from the execution of the step. */ public void setOutputs(java.util.Map* Returned values from the execution of the step. *
* * @param outputs * Returned values from the execution of the step. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withOutputs(java.util.Map* A message associated with the response code for an execution. *
* * @param response * A message associated with the response code for an execution. */ public void setResponse(String response) { this.response = response; } /** ** A message associated with the response code for an execution. *
* * @return A message associated with the response code for an execution. */ public String getResponse() { return this.response; } /** ** A message associated with the response code for an execution. *
* * @param response * A message associated with the response code for an execution. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withResponse(String response) { setResponse(response); return this; } /** ** If a step failed, this message explains why the execution failed. *
* * @param failureMessage * If a step failed, this message explains why the execution failed. */ public void setFailureMessage(String failureMessage) { this.failureMessage = failureMessage; } /** ** If a step failed, this message explains why the execution failed. *
* * @return If a step failed, this message explains why the execution failed. */ public String getFailureMessage() { return this.failureMessage; } /** ** If a step failed, this message explains why the execution failed. *
* * @param failureMessage * If a step failed, this message explains why the execution failed. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withFailureMessage(String failureMessage) { setFailureMessage(failureMessage); return this; } /** ** Information about the Automation failure. *
* * @param failureDetails * Information about the Automation failure. */ public void setFailureDetails(FailureDetails failureDetails) { this.failureDetails = failureDetails; } /** ** Information about the Automation failure. *
* * @return Information about the Automation failure. */ public FailureDetails getFailureDetails() { return this.failureDetails; } /** ** Information about the Automation failure. *
* * @param failureDetails * Information about the Automation failure. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withFailureDetails(FailureDetails failureDetails) { setFailureDetails(failureDetails); return this; } /** ** The unique ID of a step execution. *
* * @param stepExecutionId * The unique ID of a step execution. */ public void setStepExecutionId(String stepExecutionId) { this.stepExecutionId = stepExecutionId; } /** ** The unique ID of a step execution. *
* * @return The unique ID of a step execution. */ public String getStepExecutionId() { return this.stepExecutionId; } /** ** The unique ID of a step execution. *
* * @param stepExecutionId * The unique ID of a step execution. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withStepExecutionId(String stepExecutionId) { setStepExecutionId(stepExecutionId); return this; } /** ** A user-specified list of parameters to override when running a step. *
* * @return A user-specified list of parameters to override when running a step. */ public java.util.Map* A user-specified list of parameters to override when running a step. *
* * @param overriddenParameters * A user-specified list of parameters to override when running a step. */ public void setOverriddenParameters(java.util.Map* A user-specified list of parameters to override when running a step. *
* * @param overriddenParameters * A user-specified list of parameters to override when running a step. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withOverriddenParameters(java.util.Map* The flag which can be used to end automation no matter whether the step succeeds or fails. *
* * @param isEnd * The flag which can be used to end automation no matter whether the step succeeds or fails. */ public void setIsEnd(Boolean isEnd) { this.isEnd = isEnd; } /** ** The flag which can be used to end automation no matter whether the step succeeds or fails. *
* * @return The flag which can be used to end automation no matter whether the step succeeds or fails. */ public Boolean getIsEnd() { return this.isEnd; } /** ** The flag which can be used to end automation no matter whether the step succeeds or fails. *
* * @param isEnd * The flag which can be used to end automation no matter whether the step succeeds or fails. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withIsEnd(Boolean isEnd) { setIsEnd(isEnd); return this; } /** ** The flag which can be used to end automation no matter whether the step succeeds or fails. *
* * @return The flag which can be used to end automation no matter whether the step succeeds or fails. */ public Boolean isEnd() { return this.isEnd; } /** ** The next step after the step succeeds. *
* * @param nextStep * The next step after the step succeeds. */ public void setNextStep(String nextStep) { this.nextStep = nextStep; } /** ** The next step after the step succeeds. *
* * @return The next step after the step succeeds. */ public String getNextStep() { return this.nextStep; } /** ** The next step after the step succeeds. *
* * @param nextStep * The next step after the step succeeds. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withNextStep(String nextStep) { setNextStep(nextStep); return this; } /** ** The flag which can be used to help decide whether the failure of current step leads to the Automation failure. *
* * @param isCritical * The flag which can be used to help decide whether the failure of current step leads to the Automation * failure. */ public void setIsCritical(Boolean isCritical) { this.isCritical = isCritical; } /** ** The flag which can be used to help decide whether the failure of current step leads to the Automation failure. *
* * @return The flag which can be used to help decide whether the failure of current step leads to the Automation * failure. */ public Boolean getIsCritical() { return this.isCritical; } /** ** The flag which can be used to help decide whether the failure of current step leads to the Automation failure. *
* * @param isCritical * The flag which can be used to help decide whether the failure of current step leads to the Automation * failure. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withIsCritical(Boolean isCritical) { setIsCritical(isCritical); return this; } /** ** The flag which can be used to help decide whether the failure of current step leads to the Automation failure. *
* * @return The flag which can be used to help decide whether the failure of current step leads to the Automation * failure. */ public Boolean isCritical() { return this.isCritical; } /** ** Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the step * fails. Continue will ignore the failure of current step and allow automation to run the next step. With * conditional branching, we add step:stepName to support the automation to go to another specific step. *
* * @return Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the * step fails. Continue will ignore the failure of current step and allow automation to run the next step. * With conditional branching, we add step:stepName to support the automation to go to another specific * step. */ public java.util.List* Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the step * fails. Continue will ignore the failure of current step and allow automation to run the next step. With * conditional branching, we add step:stepName to support the automation to go to another specific step. *
* * @param validNextSteps * Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the * step fails. Continue will ignore the failure of current step and allow automation to run the next step. * With conditional branching, we add step:stepName to support the automation to go to another specific step. */ public void setValidNextSteps(java.util.Collection* Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the step * fails. Continue will ignore the failure of current step and allow automation to run the next step. With * conditional branching, we add step:stepName to support the automation to go to another specific step. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setValidNextSteps(java.util.Collection)} or {@link #withValidNextSteps(java.util.Collection)} if you want * to override the existing values. *
* * @param validNextSteps * Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the * step fails. Continue will ignore the failure of current step and allow automation to run the next step. * With conditional branching, we add step:stepName to support the automation to go to another specific step. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withValidNextSteps(String... validNextSteps) { if (this.validNextSteps == null) { setValidNextSteps(new com.amazonaws.internal.SdkInternalList* Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the step * fails. Continue will ignore the failure of current step and allow automation to run the next step. With * conditional branching, we add step:stepName to support the automation to go to another specific step. *
* * @param validNextSteps * Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the * step fails. Continue will ignore the failure of current step and allow automation to run the next step. * With conditional branching, we add step:stepName to support the automation to go to another specific step. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withValidNextSteps(java.util.Collection* The targets for the step execution. *
* * @return The targets for the step execution. */ public java.util.List* The targets for the step execution. *
* * @param targets * The targets for the step execution. */ public void setTargets(java.util.Collection* The targets for the step execution. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTargets(java.util.Collection)} or {@link #withTargets(java.util.Collection)} if you want to override * the existing values. *
* * @param targets * The targets for the step execution. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withTargets(Target... targets) { if (this.targets == null) { setTargets(new com.amazonaws.internal.SdkInternalList* The targets for the step execution. *
* * @param targets * The targets for the step execution. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withTargets(java.util.Collection* The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current * Automation execution. *
* * @param targetLocation * The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current * Automation execution. */ public void setTargetLocation(TargetLocation targetLocation) { this.targetLocation = targetLocation; } /** ** The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current * Automation execution. *
* * @return The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current * Automation execution. */ public TargetLocation getTargetLocation() { return this.targetLocation; } /** ** The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current * Automation execution. *
* * @param targetLocation * The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current * Automation execution. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withTargetLocation(TargetLocation targetLocation) { setTargetLocation(targetLocation); return this; } /** ** The CloudWatch alarms that were invoked by the automation. *
* * @return The CloudWatch alarms that were invoked by the automation. */ public java.util.List* The CloudWatch alarms that were invoked by the automation. *
* * @param triggeredAlarms * The CloudWatch alarms that were invoked by the automation. */ public void setTriggeredAlarms(java.util.Collection* The CloudWatch alarms that were invoked by the automation. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTriggeredAlarms(java.util.Collection)} or {@link #withTriggeredAlarms(java.util.Collection)} if you * want to override the existing values. *
* * @param triggeredAlarms * The CloudWatch alarms that were invoked by the automation. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withTriggeredAlarms(AlarmStateInformation... triggeredAlarms) { if (this.triggeredAlarms == null) { setTriggeredAlarms(new com.amazonaws.internal.SdkInternalList* The CloudWatch alarms that were invoked by the automation. *
* * @param triggeredAlarms * The CloudWatch alarms that were invoked by the automation. * @return Returns a reference to this object so that method calls can be chained together. */ public StepExecution withTriggeredAlarms(java.util.Collection