function detectChangeSetChanges()

in pipeline/statemachines/deploy/inspect_change_set.js [29:48]


    function detectChangeSetChanges(changeSetChanges) {
        console.log("Analyzing ChangeSet changes: " + JSON.stringify(changeSetChanges));
        if (changeSetChanges.ExecutionStatus != "AVAILABLE") {
            throw new Error("Expecting ExecutionStatus: 'AVAILABLE' but got: " + changeSetChanges.ExecutionStatus + " when analyzing ChangeSet changes");
        }
        for (var i = 0; i < changeSetChanges.Changes.length; i++) {
            var change = changeSetChanges.Changes[i];
            if (change.Type == "Resource") {
                if (change.ResourceChange.Action == "Delete") {
                    return RESOURCES_BEING_DELETED_OR_REPLACED;
                }
                if (change.ResourceChange.Action == "Modify") {
                    if (change.ResourceChange.Replacement == "True") {
                        return RESOURCES_BEING_DELETED_OR_REPLACED;
                    }
                }
            }
        }
        return CAN_SAFELY_UPDATE_EXISTING_STACK;
    }