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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.onExitCode(String onExitCode) Sets the value ofCustomReason.getOnExitCode()Sets the value ofCustomReason.getOnReason()onStatusReason(String onStatusReason) Sets the value ofCustomReason.getOnStatusReason()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
onExitCode
Sets the value ofCustomReason.getOnExitCode()- Parameters:
onExitCode- A glob string that will match on the job exit code. For example,'40*'will match 400, 404, 40123456789012- Returns:
this
-
onReason
Sets the value ofCustomReason.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
Sets the value ofCustomReason.getOnStatusReason()- 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
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CustomReason>- Returns:
- a new instance of
CustomReason - Throws:
NullPointerException- if any required attribute was not provided
-