Class CustomReason.Builder

java.lang.Object
software.amazon.awscdk.services.batch.CustomReason.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CustomReason>
Enclosing interface:
CustomReason

@Stability(Stable) public static final class CustomReason.Builder extends Object implements software.amazon.jsii.Builder<CustomReason>
A builder for CustomReason
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • onExitCode

      @Stability(Stable) public CustomReason.Builder onExitCode(String onExitCode)
      Parameters:
      onExitCode - A glob string that will match on the job exit code. For example, '40*' will match 400, 404, 40123456789012
      Returns:
      this
    • onReason

      @Stability(Stable) public CustomReason.Builder onReason(String onReason)
      Sets the value of CustomReason.getOnReason()
      Parameters:
      onReason - A glob string that will match on the reason returned by the exiting job For example, 'CannotPullContainerError*' indicates that container needed to start the job could not be pulled.
      Returns:
      this
    • onStatusReason

      @Stability(Stable) public CustomReason.Builder onStatusReason(String onStatusReason)
      Parameters:
      onStatusReason - A glob string that will match on the statusReason returned by the exiting job. For example, 'Host EC2*' indicates that the spot instance has been reclaimed.
      Returns:
      this
    • build

      @Stability(Stable) public CustomReason build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CustomReason>
      Returns:
      a new instance of CustomReason
      Throws:
      NullPointerException - if any required attribute was not provided