Class StepExecution

    • Method Detail

      • stepName

        public final String stepName()

        The name of this execution step.

        Returns:
        The name of this execution step.
      • action

        public final String action()

        The action this step performs. The action determines the behavior of the step.

        Returns:
        The action this step performs. The action determines the behavior of the step.
      • timeoutSeconds

        public final Long timeoutSeconds()

        The timeout seconds of the step.

        Returns:
        The timeout seconds of the step.
      • onFailure

        public final String onFailure()

        The action to take if the step fails. The default value is Abort.

        Returns:
        The action to take if the step fails. The default value is Abort.
      • maxAttempts

        public final Integer maxAttempts()

        The maximum number of tries to run the action of the step. The default value is 1.

        Returns:
        The maximum number of tries to run the action of the step. The default value is 1.
      • executionStartTime

        public final Instant 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.

        Returns:
        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.
      • executionEndTime

        public final Instant 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.

        Returns:
        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.
      • responseCode

        public final String responseCode()

        The response code returned by the execution of the step.

        Returns:
        The response code returned by the execution of the step.
      • hasInputs

        public final boolean hasInputs()
        For responses, this returns true if the service returned a value for the Inputs property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • inputs

        public final Map<String,​String> inputs()

        Fully-resolved values passed into the step before execution.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasInputs() method.

        Returns:
        Fully-resolved values passed into the step before execution.
      • hasOutputs

        public final boolean hasOutputs()
        For responses, this returns true if the service returned a value for the Outputs property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • outputs

        public final Map<String,​List<String>> outputs()

        Returned values from the execution of the step.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasOutputs() method.

        Returns:
        Returned values from the execution of the step.
      • response

        public final String response()

        A message associated with the response code for an execution.

        Returns:
        A message associated with the response code for an execution.
      • failureMessage

        public final String failureMessage()

        If a step failed, this message explains why the execution failed.

        Returns:
        If a step failed, this message explains why the execution failed.
      • failureDetails

        public final FailureDetails failureDetails()

        Information about the Automation failure.

        Returns:
        Information about the Automation failure.
      • stepExecutionId

        public final String stepExecutionId()

        The unique ID of a step execution.

        Returns:
        The unique ID of a step execution.
      • hasOverriddenParameters

        public final boolean hasOverriddenParameters()
        For responses, this returns true if the service returned a value for the OverriddenParameters property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • overriddenParameters

        public final Map<String,​List<String>> overriddenParameters()

        A user-specified list of parameters to override when running a step.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasOverriddenParameters() method.

        Returns:
        A user-specified list of parameters to override when running a step.
      • isEnd

        public final Boolean isEnd()

        The flag which can be used to end automation no matter whether the step succeeds or fails.

        Returns:
        The flag which can be used to end automation no matter whether the step succeeds or fails.
      • nextStep

        public final String nextStep()

        The next step after the step succeeds.

        Returns:
        The next step after the step succeeds.
      • isCritical

        public final Boolean isCritical()

        The flag which can be used to help decide whether the failure of current step leads to the Automation failure.

        Returns:
        The flag which can be used to help decide whether the failure of current step leads to the Automation failure.
      • hasValidNextSteps

        public final boolean hasValidNextSteps()
        For responses, this returns true if the service returned a value for the ValidNextSteps property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • validNextSteps

        public final List<String> 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.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasValidNextSteps() method.

        Returns:
        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.
      • hasTargets

        public final boolean hasTargets()
        For responses, this returns true if the service returned a value for the Targets property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • targets

        public final List<Target> targets()

        The targets for the step execution.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasTargets() method.

        Returns:
        The targets for the step execution.
      • targetLocation

        public final TargetLocation targetLocation()

        The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.

        Returns:
        The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
      • hasTriggeredAlarms

        public final boolean hasTriggeredAlarms()
        For responses, this returns true if the service returned a value for the TriggeredAlarms property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • triggeredAlarms

        public final List<AlarmStateInformation> triggeredAlarms()

        The CloudWatch alarms that were invoked by the automation.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasTriggeredAlarms() method.

        Returns:
        The CloudWatch alarms that were invoked by the automation.
      • parentStepDetails

        public final ParentStepDetails parentStepDetails()

        Information about the parent step.

        Returns:
        Information about the parent step.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        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.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)