@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getEventId() == null) ? 0 : getEventId().hashCode()); hashCode = prime * hashCode + ((getStackName() == null) ? 0 : getStackName().hashCode()); hashCode = prime * hashCode + ((getLogicalResourceId() == null) ? 0 : getLogicalResourceId().hashCode()); hashCode = prime * hashCode + ((getPhysicalResourceId() == null) ? 0 : getPhysicalResourceId().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getResourceStatus() == null) ? 0 : getResourceStatus().hashCode()); hashCode = prime * hashCode + ((getResourceStatusReason() == null) ? 0 : getResourceStatusReason().hashCode()); hashCode = prime * hashCode + ((getResourceProperties() == null) ? 0 : getResourceProperties().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); return hashCode; }
cloudformation.describeStackEvents(request).getStackEvents() .stream() .filter(e -> e.getResourceStatus().equals("CREATE_FAILED")) .findFirst() .map(StackEvent::getResourceStatusReason)
if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()).append(","); if (getResourceStatus() != null) sb.append("ResourceStatus: ").append(getResourceStatus()).append(","); if (getResourceStatusReason() != null) sb.append("ResourceStatusReason: ").append(getResourceStatusReason()).append(",");
String.valueOf(CREATE_COMPLETE).equals(stackEvent.getResourceStatus())) {
if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getResourceStatus() == null ^ this.getResourceStatus() == null) return false; if (other.getResourceStatus() != null && other.getResourceStatus().equals(this.getResourceStatus()) == false) return false; if (other.getResourceStatusReason() == null ^ this.getResourceStatusReason() == null)
private void printEvent(SimpleDateFormat sdf, StackEvent event) { String time = this.padRight(sdf.format(event.getTimestamp()), 25); String logicalResourceId = this.padRight(event.getLogicalResourceId(), 20); String resourceStatus = this.padRight(event.getResourceStatus(), 36); String resourceStatusReason = this.padRight(event.getResourceStatusReason(), 140); this.listener.getLogger().format("| %s | %s | %s | %s |%n", time, logicalResourceId, resourceStatus, resourceStatusReason); }
private void printEvents(List<StackEvent> stackEvents) { if (printedEvents.isEmpty()) { getLogger().info("==== Events ===="); } stackEvents.stream() .forEach(o -> { String eventId = o.getEventId(); // If we haven't printed the event, then print it and add to list of printed events so we won't print again if (!printedEvents.contains(eventId)) { getLogger().info("{} {} {}: {} {}", o.getTimestamp(), o.getResourceStatus(), o.getResourceType(), o.getLogicalResourceId(), (o.getResourceStatusReason() == null) ? "" : o.getResourceStatusReason()); printedEvents.add(eventId); } }); }
private void printStackEvents() { DescribeStackEventsRequest r = new DescribeStackEventsRequest(); r.withStackName(getExpandedStackName()); DescribeStackEventsResult describeStackEvents = amazonClient.describeStackEvents(r); List<StackEvent> stackEvents = describeStackEvents.getStackEvents(); Collections.reverse(stackEvents); for (StackEvent event : stackEvents) { logger.println(event.getEventId() + " - " + event.getResourceType() + " - " + event.getResourceStatus() + " - " + event.getResourceStatusReason()); } }
if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()).append(","); if (getResourceStatus() != null) sb.append("ResourceStatus: ").append(getResourceStatus()).append(","); if (getResourceStatusReason() != null) sb.append("ResourceStatusReason: ").append(getResourceStatusReason()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getEventId() == null) ? 0 : getEventId().hashCode()); hashCode = prime * hashCode + ((getStackName() == null) ? 0 : getStackName().hashCode()); hashCode = prime * hashCode + ((getLogicalResourceId() == null) ? 0 : getLogicalResourceId().hashCode()); hashCode = prime * hashCode + ((getPhysicalResourceId() == null) ? 0 : getPhysicalResourceId().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getResourceStatus() == null) ? 0 : getResourceStatus().hashCode()); hashCode = prime * hashCode + ((getResourceStatusReason() == null) ? 0 : getResourceStatusReason().hashCode()); hashCode = prime * hashCode + ((getResourceProperties() == null) ? 0 : getResourceProperties().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); return hashCode; }
StackEvent stackEvent = li.previous(); stringBuilder.append(StringUtil.concatStrings( "Status: ", stackEvent.getResourceStatus(), ", ")); stringBuilder.append(StringUtil.concatStrings( "Resource Type: ", stackEvent.getResourceType(), ", "));
if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getResourceStatus() == null ^ this.getResourceStatus() == null) return false; if (other.getResourceStatus() != null && other.getResourceStatus().equals(this.getResourceStatus()) == false) return false; if (other.getResourceStatusReason() == null ^ this.getResourceStatusReason() == null)