/** * <p> * Current status of the stack. * </p> * * @param stackStatus * Current status of the stack. * @return Returns a reference to this object so that method calls can be chained together. * @see StackStatus */ public Stack withStackStatus(StackStatus stackStatus) { this.stackStatus = stackStatus.toString(); return this; }
/** * Use this in place of valueOf. * * @param value * real value * @return StackStatus corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static StackStatus fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (StackStatus enumEntry : StackStatus.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
private boolean checkIfStackCreationFailed(Stack stack) { StackStatus status = StackStatus.fromValue(stack.getStackStatus()); return status.equals(StackStatus.CREATE_FAILED) || status.equals( StackStatus.ROLLBACK_FAILED) || status.equals(StackStatus.UPDATE_ROLLBACK_COMPLETE) || status.equals(StackStatus.UPDATE_ROLLBACK_FAILED); } }
private StackStatus getStackStatus(String status) { StackStatus result = StackStatus.fromValue(status); return result; }
public void setStatusesToMatch(String statusesToMatch) { this.statusesToMatch = new LinkedHashSet<>(); this.statusesToMatch.addAll( Arrays.asList(statusesToMatch.split(",")) .stream() .map(this::extractNVPair) .map(x -> StackStatus.fromValue(x.getValue().toUpperCase())) .collect(Collectors.toList())); }
/** * <p> * The current status of the stack. * </p> * * @param stackStatus * The current status of the stack. * @return Returns a reference to this object so that method calls can be chained together. * @see StackStatus */ public StackSummary withStackStatus(StackStatus stackStatus) { this.stackStatus = stackStatus.toString(); return this; }
stacks.getStacks().stream().filter(stack -> ctx.getStatusesToMatch().contains(StackStatus.fromValue(stack.getStackStatus()))).findFirst();
/** * Use this in place of valueOf. * * @param value * real value * @return StackStatus corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static StackStatus fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (StackStatus enumEntry : StackStatus.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
/** * <p> * Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified * status codes. For a complete list of stack status codes, see the <code>StackStatus</code> parameter of the * <a>Stack</a> data type. * </p> * * @param stackStatusFilters * Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the * specified status codes. For a complete list of stack status codes, see the <code>StackStatus</code> * parameter of the <a>Stack</a> data type. * @return Returns a reference to this object so that method calls can be chained together. * @see StackStatus */ public ListStacksRequest withStackStatusFilters(StackStatus... stackStatusFilters) { com.amazonaws.internal.SdkInternalList<String> stackStatusFiltersCopy = new com.amazonaws.internal.SdkInternalList<String>(stackStatusFilters.length); for (StackStatus value : stackStatusFilters) { stackStatusFiltersCopy.add(value.toString()); } if (getStackStatusFilters() == null) { setStackStatusFilters(stackStatusFiltersCopy); } else { getStackStatusFilters().addAll(stackStatusFiltersCopy); } return this; }
/** * <p> * The current status of the stack. * </p> * * @param stackStatus * The current status of the stack. * @return Returns a reference to this object so that method calls can be chained together. * @see StackStatus */ public StackSummary withStackStatus(StackStatus stackStatus) { this.stackStatus = stackStatus.toString(); return this; }
/** * <p> * Current status of the stack. * </p> * * @param stackStatus * Current status of the stack. * @return Returns a reference to this object so that method calls can be chained together. * @see StackStatus */ public Stack withStackStatus(StackStatus stackStatus) { this.stackStatus = stackStatus.toString(); return this; }
|| stack.getStackStatus().equals(StackStatus.UPDATE_ROLLBACK_COMPLETE.toString()) || stack.getStackStatus().equals(StackStatus.ROLLBACK_COMPLETE.toString()) ) { throw new Exception("Cloudformation failed. Please check AWS Console for details"); if (stack.getStackStatus().equals(StackStatus.UPDATE_COMPLETE.toString()) || stack.getStackStatus().equals(StackStatus.CREATE_COMPLETE.toString()) ) { completed = true;
/** * <p> * Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified * status codes. For a complete list of stack status codes, see the <code>StackStatus</code> parameter of the * <a>Stack</a> data type. * </p> * * @param stackStatusFilters * Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the * specified status codes. For a complete list of stack status codes, see the <code>StackStatus</code> * parameter of the <a>Stack</a> data type. * @return Returns a reference to this object so that method calls can be chained together. * @see StackStatus */ public ListStacksRequest withStackStatusFilters(StackStatus... stackStatusFilters) { com.amazonaws.internal.SdkInternalList<String> stackStatusFiltersCopy = new com.amazonaws.internal.SdkInternalList<String>(stackStatusFilters.length); for (StackStatus value : stackStatusFilters) { stackStatusFiltersCopy.add(value.toString()); } if (getStackStatusFilters() == null) { setStackStatusFilters(stackStatusFiltersCopy); } else { getStackStatusFilters().addAll(stackStatusFiltersCopy); } return this; }